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

add functionality to declarative plotting #1026

Merged
merged 1 commit into from
May 15, 2019

Conversation

kgoebber
Copy link
Collaborator

@kgoebber kgoebber commented Apr 4, 2019

An initial attempt to address some of the functionality desired in issue #1016 by adding contour labels, colorbar, colorfill plots, and linetypes to contours. Added a test and a few elements to other tests to hopefully get coverage of the new elements.

  • labels (Boolean)
  • colorbar (Unicode string of orientation)
  • linetype (Unicode string of matplotlib linestyles)
  • ContourFillPlot() creates a class to do filled contours, based on the ContourPlot() class

For both labels and colobar I would love to add more options to how they plot, but I don't currently understand the traitlets well enough to figure it out. This is a start anyway.

Only issue I have had is when I plot contours with an ImagePlot, the spacing of the contour labels gets HUGE! But I was able to fix the issue when I reversed the order in the panel call.

This works

panel = MapPanel()
panel.plots = [contour, img]

But this does not work as desired

panel = MapPanel()
panel.plots = [img, contour]

Unable to fully diagnose why the ordering changes the impact, but it does.

Looking for any feedback on this PR.

Copy link
Member

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general this is going in the right direction. I think there are a few things that need cleaning up, and I'm concerned that the changed test isn't failing.

Huge 👍 on the addition, thanks for putting this together.

@kgoebber kgoebber force-pushed the add_to_declarative branch from 311e75e to 129265d Compare April 5, 2019 14:59
@kgoebber
Copy link
Collaborator Author

kgoebber commented Apr 5, 2019

Don't know why the test_declarative_contour_options is failing - passes on my machine.

@kgoebber kgoebber force-pushed the add_to_declarative branch 2 times, most recently from eb925d4 to f4afbc5 Compare April 7, 2019 15:40
@kgoebber kgoebber force-pushed the add_to_declarative branch from d7250c1 to 5653e90 Compare May 15, 2019 21:23
@kgoebber kgoebber merged commit 7370163 into Unidata:master May 15, 2019
@dopplershift dopplershift added Area: Plots Pertains to producing plots Type: Feature New functionality labels Jun 6, 2019
@dopplershift dopplershift added this to the 0.11 milestone Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Plots Pertains to producing plots Type: Feature New functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants