You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it's very common that one wants to plot multiple different pieces of a dataset by layering visuals on top of each other. Here are a few examples of this scenario from a quick google search:
The problem is that AlgebraOfGraphics doesn't have this notion of separate-but-together as far as I understand. All data being plotted should come from the same source columns and can be grouped in different nesting levels, but the grouping factors should not be separate. I hope the images make clear what I'm after, just a way to "layer" multiple visuals onto the same plot, and sequentially list them in the legend. It doesn't have to be in separate legend sections, for many plots, a simple list is also sufficient.
This usually arises when one wants to augment a facet plot with let's say, one hlines in each facet which also needs to be described, but doesn't further participate in the grouping and therefore shouldn't be merged into the existing legend entries.
Here's an example, how it currently works:
using AlgebraOfGraphics
using CairoMakie
using DataFrames
df =DataFrame(x =1:10, y =rand(10), group ="Z")
df2 =DataFrame(x =repeat(1:10, 4), y =rand(40), name =repeat(["A", "B", "C", "D"], inner =10))
data(df) *mapping(:x, :y, color =:group) +data(df2) *mapping(:x, :y, color =:name) *visual(Lines) |> draw
As you can see, the scatter was merged together with the lines in the legend, instead of four lines and one scatter.
The text was updated successfully, but these errors were encountered:
I think it's very common that one wants to plot multiple different pieces of a dataset by layering visuals on top of each other. Here are a few examples of this scenario from a quick google search:
The problem is that AlgebraOfGraphics doesn't have this notion of separate-but-together as far as I understand. All data being plotted should come from the same source columns and can be grouped in different nesting levels, but the grouping factors should not be separate. I hope the images make clear what I'm after, just a way to "layer" multiple visuals onto the same plot, and sequentially list them in the legend. It doesn't have to be in separate legend sections, for many plots, a simple list is also sufficient.
This usually arises when one wants to augment a facet plot with let's say, one
hlines
in each facet which also needs to be described, but doesn't further participate in the grouping and therefore shouldn't be merged into the existing legend entries.Here's an example, how it currently works:
As you can see, the scatter was merged together with the lines in the legend, instead of four lines and one scatter.
The text was updated successfully, but these errors were encountered: