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

Integrate SVG-plotter in e-neutrons platform #225

Open
willend opened this issue Jun 6, 2019 · 8 comments
Open

Integrate SVG-plotter in e-neutrons platform #225

willend opened this issue Jun 6, 2019 · 8 comments

Comments

@willend
Copy link
Contributor

willend commented Jun 6, 2019

Enable interactive svg-plots via mcplot-svg - to be used on single-view of monitor plots (i.e. not in overview or sweep settings)

@climbcat
Copy link
Contributor

climbcat commented Jun 17, 2019

Currently, gize takes precedence over pgplot, our only png plotter option (besides matplotlib, which quickly becomes unreadable for overview plots). Our modern plotters can not output a png!

This could be alleviated if the svg plotter were to be run through nodejs (/ phantomjs) to output an svg directly from the terminal. Found some people doing it here: https://stackoverflow.com/questions/18240391/exporting-d3-js-graphs-to-static-svg-files-programmatically. We could post-process this into a png somehow...

However, first the svg plotter needs enhancements, as it is quite bare-bones atm. Also a few imports from IFL, which has improved the plotting functions somewhat.

@climbcat
Copy link
Contributor

The mcplot-svg code has been improved somewhat. We can now hook events to click/right-click/ctrl-click on the plot area, and the plotter will generate a .html file for every file in a data folder (iterate the plot graph).

@willend
Copy link
Contributor Author

willend commented Jun 27, 2019

Looks like the y-axis might be mirrored on the 2D plots, investigate

@willend
Copy link
Contributor Author

willend commented Jun 27, 2019

Here are a couple of example screenshots that illustrate the above mirroring, but also that the multi-line graph titles are mixed up.

Screenshot 2019-06-27 at 14 53 34
Screenshot 2019-06-27 at 14 53 38

For the "overview" plot with multiple monitors, a way to reduce the "clutter" would be to a) make tics invisible and b) Reduce the font size to something minuscule when the graph size is less than "some value"

@willend
Copy link
Contributor Author

willend commented Jun 27, 2019

mcweb plotter navigation:

It seems the most relevant case is from overview plot to "zoom", the same for the "sweep" case. Browser back is enough to go back

@climbcat
Copy link
Contributor

climbcat commented Aug 2, 2019

An updated version of the svg plotter has been somewhat integrated, see the branch htmlplotter on mcweb. Some missing bits and pieces are:

  • review and release
  • slim-text version of the plotter, the plotter should adjust to small screen sizes
  • scan sweep overview page not yet plotted by the svg plotter - how exactly do we do this? (Only missing svg plots)

@climbcat
Copy link
Contributor

climbcat commented Aug 5, 2019

Slim-text / small mode has been implemented, see McStasMcXtrace/McCode@b818d32. This mode is automatically enabled for plots smaller than 300px width or height.

NOTE: The [arbitrary] slit-text mode switch condition is easily changed by editing the function "_is_small_mode" in plotfuncs.js, found in the tools/Python/mcplot/svg folder in mccode.

@climbcat
Copy link
Contributor

climbcat commented Oct 1, 2019

The svg plotter has been updated to plot mccode.dat files, in addition to individual monitor files. The result is a single html page with multiple plots. McWeb simrunner has been updated to make use of this feature. In combination with various other minor changes, the integration can be seen as complete.

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

No branches or pull requests

2 participants