-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
GR margin 0-point set to allow no padding #3942
base: master
Are you sure you want to change the base?
Conversation
For the tests, I suggest just changing the specified margin rather than changing the test images? |
Would be good to make this consistent accross the backends |
Checking to see where GR - fixed in this PR |
I fixed the pgfplotsx case, @ma-laforge can you comment on InspectDR? |
I just saw this question (I haven't had much time look at Github issues). The intent of InspectDR wasn't originally to have fully controllable plots visuals, but rather have a Plots.jl compatible interface to a fast, interactive, GUI-enabled plotting tool. So I'm pretty sure I ignore many of the margin parameters. That said, InspectDR probably does have the ability to control these margins - so it would be a good idea to support this feature. I simply do not forsee having the time to fix this in the next few weeks. It would probably have to wait until January. Sorry that wasn't the answer you were hoping to get - but thanks for pinging me to let me know. |
No worries, we can just move forward with the rest. |
The more I think about this, the more I think we should keep that for 2.0, since I think there will be many people who currently have negative margins or the like who will get broken plots after this change. |
Yeah, I suppose that makes sense. |
I have spent a couple of days trying to deal with something I suspect is related (see second image here) but now that I chanced across this issue here; I think I should switch to a different backend ( Can someone confirm that the default GR behavior of not truly doing zero-padding or margins (especially visible as shown in gridded layouts) is what this PR is trying to fix? |
Yeah, there are hard-coded offsets. You can provide a negative offset to compensate, it's just annoying. |
Just to confirm ... is it the |
Currently, a 2mm pad is added to all plots, and the user-provided margin is added to it.
I propose that the 0-point for margins should be the box where all ink is visible and no larger. If a user wants no padding,
0mm
is the natural choice to indicate that.This change makes the user-provided margins override the default, rather than add to it.
Borderless plots can be generated with:
plot([1, 2, 3], [5, 3, 6], widen = false, axis = false, ticks = false, margin=0(Plots.mm))