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

outer legends for gr and pyplot and guide/margin improvements for gr #2018

Merged
merged 10 commits into from
May 5, 2019

Conversation

daschw
Copy link
Member

@daschw daschw commented May 2, 2019

This implements the following legend positions for GR and PyPlot: :outertopleft, :outertop, :outerright, :outerleft, :outerbottomright, :outerbottomleft, :outerbottom

GR:

plot(rand(10), legend = :outertopleft)

gr_outertopleft

plot(rand(10), legend = :outerbottom)

gr_outerbottom
PyPlot

plot(rand(10), legend = :outerright)

pyplot_outerright

plot(rand(10), legend = :outertop)

pyplot_outertop

I don't want to show all possibilities here. In GR axes mirroring is respected for outer legend positioning as well. PyPlot needs some improvements for axes mirroring in general.


Furthermore, this PR provides some improvemnets for guide positioning and margins in GR:

plot(100000rand(10), xformatter = x -> "my ticklabel $x", xrotation = 35, xlabel = "my x guide", yguide = "my y guide")

Old
guideold
New
guidenew

plot(rand(10), xguide = "my x guide", yguide = "my y guide", margin = 10mm)

Old
marginold
New
marginnew

plot(rand(10), title = "My big title", titlefont = font(30))

Old
titleold
New
titlenew

@daschw daschw changed the title outer legends for gr and pyplot and guide/margin improvements for gr WIP: outer legends for gr and pyplot and guide/margin improvements for gr May 2, 2019
@daschw
Copy link
Member Author

daschw commented May 2, 2019

Apparently I still have to update the reference images.

@blas-ko
Copy link

blas-ko commented May 3, 2019

Amazing! This was just what I was (desesperately) looking for!
Thank you :)

@daschw daschw changed the title WIP: outer legends for gr and pyplot and guide/margin improvements for gr outer legends for gr and pyplot and guide/margin improvements for gr May 5, 2019
@daschw daschw merged commit 3fe60b9 into JuliaPlots:master May 5, 2019
@daschw daschw deleted the legend branch October 13, 2019 17:21
@PowerUp77137
Copy link

how move legend for plotly() or plotlyjs() backend?

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.

None yet

3 participants