Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] [plotting] Colorbar for Line Loading Not Displayed Correctly in pf_res_plotly #2552

Open
6 tasks done
TheBigFudge opened this issue Mar 11, 2025 · 3 comments
Open
6 tasks done
Labels

Comments

@TheBigFudge
Copy link

TheBigFudge commented Mar 11, 2025

Bug report checklis

  • Read the relevant sections of the documentation

  • Searched the issues page for similar reports

  • Browse the tutorials and tests for usefull code snippets and examples of use

  • Reproduced the issue after updating with pip install --upgrade pandapower (or git pull)

  • Tried basic troubleshooting (if a bug/error) like restarting the interpreter and checking the pythonpath

Reproducible Example

import pandapower as pp
import pandapower.networks as pn
from pandapower.plotting.plotly import pf_res_plotly

# Create a sample network
net = pn.mv_oberrhein()
pp.runpp(net)

# Plot the results
pf_res_plotly(net, filename='test.html')

Issue Description and Traceback

Description:
I am using pandapower==3.0 and plotly==6.0 to visualize power flow results with pf_res_plotly. However, the colormap legend for line loading does not appear correctly. I have tried different values for cpos_load, but the issue persists. The expected behavior is that the colorbar for line loading should be displayed correctly according to the climits_load range.

Steps to Reproduce:

  1. Run a power flow calculation in a Pandapower network.
  2. Use pf_res_plotly() to visualize the results.
  3. Observe that the line loading colorbar is either missing or incorrectly positioned.

Observed Behavior:

  • The colorbar does not appear correctly.
  • Changing cpos_load does not fix the issue.
  • The bus voltage legend is displayed correctly, but the loading map is missing.

see plot example

Image

Expected Behavior

Expected Behavior:
The colorbar for line loading should be displayed at the correct position as defined by cpos_load.

Installed Versions

I have tested this with pandapower==3.0 and plotly==6.0.

also tested older version of plotly

Label

  • Relevant labels are selected
@vogt31337
Copy link
Contributor

@TheBigFudge plotly seems to have changed there js api and things are breaking. Could you by any chance try an earlier plotly version and check if this also happens?

@TheBigFudge
Copy link
Author

TheBigFudge commented Mar 19, 2025

hey! i have tried it with some plotly 5.X versions, but that didn't help. However, when I switched back to older pandapower version 2.14.x, both colour bars were visible again

@vogt31337
Copy link
Contributor

I am currently experiencing similar issued, i think the internal conversion Routine does Not Like empty fields. I will probably soon build a Patch and repair this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants