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

Improve legends #344

Merged
merged 11 commits into from
Sep 27, 2021
Merged

Improve legends #344

merged 11 commits into from
Sep 27, 2021

Conversation

rayosborn
Copy link
Contributor

  • Adds legend options to use the full signal path, group, or name, in addition to a customized label.
  • Allows the NXPlotView legend function to apply to PyPlot figures, whose ax instance is given as a keyword.
  • Allows the addition of legends to the output of the mpl_plot function.
  • Uses the correct grid defaults and 1D color cycler when the Matplotlib style is changed.
  • Adds grid customization to 1D plots and includes the grid alpha value.

This makes it possible to use the NXPlotView legend function to generate legends based on the 'plots' dictionary.
It's necessary to convert the text to a valid Hex color before going any further.
If this is set manually to, e.g., a Matplotlib cycler color, it needs to be converted to a Hex color.
If no models have been added, there is nothing to plot. This prevents an exception being triggered.
This is done by calling the NXPlotView legend function with the PyPlot axis.
Matplotlib changes the color cycler values with each style. This ensures that NeXpy uses the current style.
This is in the Customize Panel. It also adds fields for grid alpha values.
@rayosborn rayosborn merged commit 9e20ae0 into nexpy:master Sep 27, 2021
@rayosborn rayosborn deleted the improve-legends branch September 27, 2021 13:27
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.

1 participant