APS-USAXS / livedata

live data from the APS USAXS instrument
https://usaxslive.xray.aps.anl.gov/
0 stars 0 forks source link

Improve Plot look #49

Closed jilavsky closed 2 years ago

jilavsky commented 3 years ago

Remote users requested recently modifications to plot of last 10 data sets. Something to consider, if it can be done easily.

  1. Move legend top right corner and make smaller font
  2. Remove S numbers (Users do not understand them anymore)

The good news is, that this clearly shows users need this image and are using it.

prjemian commented 3 years ago

I believe the legend location under our control, as is the S character. Before using absolute positioning, I might see if MatPlotLib can use its own smarts to position the legend.

The legend was placed in lower-left corner since the box width is variable (depends on the longest length label text) so it is harder to position the top-right corner of the box. Lower-Left is deterministic.

prjemian commented 3 years ago

The long length of the current labels is exceptional. Clipboard01

Tell the users to write their abstracts somewhere else.

prjemian commented 3 years ago

It may be possible to ask MatPlotLib to auto-place the legend box. Perhaps using the tight_layout method or perhaps not specifying the loc= kwarg: https://github.com/APS-USAXS/livedata/blob/089e75cd97af02d549904f99019d7e0bb072c0b8/plot_mpl.py#L85

prjemian commented 2 years ago

This was easier than expected. MatPlotLib will decide where to place the legend (in the most open space).