Skip to content

Only plot Legend / Plot Legend seperately #4598

Answered by jkrumbiegel
mobergmann asked this question in Q&A
Discussion options

You must be logged in to vote

This should work I think, a legend does not need to be in the same figure as the content it gets its entries populated with:

fig1 = ...
stuff_for_legend = plot_things(fig1,...)

fig2 = Figure()
Legend(fig2[1,1], stuff_for_legend, some_labels, tellheight = true)
resize_to_layout!(fig2)
save("legend.svg", fig2)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mobergmann
Comment options

Answer selected by mobergmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants