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

Adding arbitrary legend_columns for python-backends #4678

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added column-major sorting for gr as a comment
  • Loading branch information
briederer committed Mar 3, 2023
commit 21c632910c5effa753e8dd39146fd14ef7d52e8a
5 changes: 4 additions & 1 deletion src/backends/gr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1093,9 +1093,12 @@ function gr_add_legend(sp, leg, viewport_area)
if vertical
ypos -= leg.dy
else
# println(string(series[:label]), " ", nentry, " ", nentry % legend_cols)
# row-major sorting
xpos += nentry % legend_cols == 0 ? -(legend_cols - 1) * leg.dx : leg.dx
ypos -= nentry % legend_cols == 0 ? leg.dy : 0
# column-major sorting
# xpos += nentry % legend_rows == 0 ? leg.dx : 0
# ypos -= nentry % legend_rows == 0 ? -(legend_rows - 1) * leg.dy : leg.dy
nentry += 1
end
end
Expand Down