-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
[feature request] support multi-column y with automatic legend #302
Comments
sorry, I have no idea what you are requesting |
@mkborregaard It's quite common when the plot data is a matrix, each column of which corresponding to a line to be plotted. For example, using Plots:
plots all columns of y against xspan, automatically using different colors and plot labels in Makie, to achieve the same thing, there needs to be additional codes for color, and a loop to go through all columns:
I'm requesting something like Thanks! |
Could you use convert_arguments? See #307 (comment) for now, but we should have the docs up as soon as JuliaPlots/MakieGallery.jl#13 is merged. |
@asinghvi17 thanks! can you give a more concrete example, e.g. an example for the figures above? not sure how to use
I think a full
returns
whereas |
You're right that it needs a recipe, I think I was thinking of the old I'm not sure why exactly the recipe is failing, but I'll definitely look into it tomorrow. |
Right now, looks like it'll be simpler to define a new function (although it feels like the "makie" way is to handle it through recipes and not by defining/overloading functions), e.g.
however, currently the legends are printed backwards, i.e. from the last column of y to the 1st. Maybe fixed when we have better documentation of |
Perhaps the |
This has been implemented as |
e.g. when
x
of sizen
and one has calculated/read in y as an*m
matrix; Plots.jl allows for something liketo plot the columns of y against x, then label them as y1...yn in the legend; I can use a loop to plot
lines!(x,y[:,i])
manually but something like lines(x,y) where y can be a multi-column matrix can be helpful/make the code look cleaner. Thanks!The text was updated successfully, but these errors were encountered: