-
Notifications
You must be signed in to change notification settings - Fork 253
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
subplot_grid + titles ? #840
Comments
Maybe: using RDatasets
data = dataset("datasets", "CO2")
labels=["Title 1", "Title 2", "Title 3","Title 4" ]
titledata = DataFrame(label=labels, x=500, y=58,
Type=unique(data[:Type])[[1,2,1,2]],
Treatment=unique(data[:Treatment])[[1,1,2,2]] )
coord = Coord.cartesian(ymin=0, ymax=60)
p=plot(data, xgroup=:Type, ygroup=:Treatment,
Geom.subplot_grid(coord,
layer(data, x=:Conc, y=:Uptake, xgroup=:Type, ygroup=:Treatment, Geom.point),
layer(titledata, x=:x, y=:y, label=:label, xgroup=:Type, ygroup=:Treatment, Geom.label(position=:centered)),
Guide.yticks(ticks=collect(0:10:50))
),
Guide.title("Title of Plot"),
Guide.xlabel("Concentration"),
Guide.ylabel("Uptake")
)
|
Note that because I have now added layer(x=:Conc, y=:Uptake, Geom.point) for tidier code. |
Perfect, thank you very much ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does it exist a way to associate to every plot of a subplot_grid its own title (eventually depending of the dataframe for instance) ?
The text was updated successfully, but these errors were encountered: