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

Matplotlib aspect fixes #1209

Merged
merged 5 commits into from
Mar 16, 2017
Merged

Matplotlib aspect fixes #1209

merged 5 commits into from
Mar 16, 2017

Conversation

philippjfr
Copy link
Member

Fixes #199, #996 and #1144. Plots in Layouts are no longer forced to square, semilog/loglog plots correctly apply aspects, and axis ranges are set after ticks.

@philippjfr philippjfr force-pushed the mpl_aspect_fixes branch 2 times, most recently from d4909c9 to a72fb35 Compare March 15, 2017 23:15
@jlstevens
Copy link
Contributor

Good to see three issues sorted with so little code! I guess the test data will now need to be updated...

@philippjfr
Copy link
Member Author

Maybe, don't know yet, made a typo.

@philippjfr
Copy link
Member Author

Continuous Coordinates

Before:

image

Now:

image

Elements

Before:

image

Now:

image

Sampling Data

Before:

image

Now:

image

I also still need to make sure that polar plots are forced to be square.

@jlstevens
Copy link
Contributor

I think the original reason we tried to force everything to be square is that it made layouts easier.

@philippjfr
Copy link
Member Author

I think the original reason we tried to force everything to be square is that it made layouts easier.

Absolutely and without the layout fix that I added these examples would have really odd spacing I'm sure.

@philippjfr
Copy link
Member Author

Ready to merge whenever, rebuilt the test data and PR build is passing.

@jbednar
Copy link
Member

jbednar commented Mar 16, 2017

Excellent; thanks so much for fixing this previously very surprising behavior. That said, even though these are surely reasonable to consider as bug fixes, they will affect the look and feel of existing notebooks, so they should be mentioned under compatibility changes. Basically, if someone was relying on Layout to make things square, they will now have to force them to be square, and it will be helpful to mention how to do that in the release notes.

@philippjfr philippjfr added this to the v1.7.0 milestone Mar 16, 2017
@jlstevens
Copy link
Contributor

jlstevens commented Mar 16, 2017

Sorry if I missed it but that is a good point - is there any easy way to restore the old behavior if necessary?

@philippjfr
Copy link
Member Author

philippjfr commented Mar 16, 2017

Not really no, except setting hv.plotting.mpl.RasterPlot = 'square', which will also affect plots not in Layouts. You can always explicitly set %%opts Image [aspect='square'] though.

@jlstevens
Copy link
Contributor

Ok, then as Jim said it will need to be mentioned in the release notes.

The pr build is passing, is it ready to merge?

@philippjfr
Copy link
Member Author

Yes, ready.

@jlstevens
Copy link
Contributor

Great. Merging.

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

Successfully merging this pull request may close these issues.

None yet

3 participants