Skip to content

Feature for the HTML plots to link the x axis of all plots. - #348

Open
ZRPedro wants to merge 1 commit into
Energinet-SimTools:mainfrom
ZRPedro:Plotter_share_x_axis
Open

ZRPedro wants to merge 1 commit into
Energinet-SimTools:mainfrom
ZRPedro:Plotter_share_x_axis

Conversation

@ZRPedro

@ZRPedro ZRPedro commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

A new feature in the plotter where all the plots have linked their x axis. This means that if a plot is zoomed in the rest will be zoomed so that the x axis range is the same in all the plots on an HTML file.

This is useful as sometimes the user might want to check some modes where more than one plots are interesting and having both on the same axis can help comparing and analyzing the results.

This has been implemented as an optional feature in the config.ini file from the plotter.

Changes

  • Added a new boolean variable to link the x axis or not on the config.ini, also updated the read_configs to read the new variable.
  • Updated the plotter.py to pass this new variable and call the shared_xaxis.py function
  • Added a new .py file with the function that allows sharing the x axis.

Testing

This was tested with some results obtained from the setup example. Both for True and False values of the new variable called sharedXaxis.

A new feature in the plotter where all the plots have linked their x axis. This means that if a plot is zoomed in the rest will be zoomed so that the x axis range is the same in all the plots on an HTML file.
@PRWenerginet

Copy link
Copy Markdown
Collaborator

Sounds very nice!

Can't one have a interactive Ploty button were one can switch this on and off for each html plot individually, instead of doing globally for all html?

@ZRPedro

ZRPedro commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Hi Peter,

That is actually a nice idea. I will see if I can do that.

@JAFPEenerginet

Copy link
Copy Markdown
Contributor

Hi Pedro,
We will not merge this commit, as we believe Peter's idea is more suitable, as it also avoids changes to the config.ini and thus updates in the wiki.
I will let it remain open, if you decide to develop this. If not, then please close it, and we will have this on our list for future improvements which are not of a high priority :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants