The plot, using Gadfly.jl, that I am trying to make requires me to jitter the points in a grid plot. But I cannot figure out how? The code example below replicates my situation. Please suggest what may I be missing?
df_plot = DataFrame(
model = repeat([“M1”,“M2”, “M3”, “M4”, “M5”, “M6”,“M7”,“M8”],inner=5),
metric = repeat([“Me1”,“Me2”, “Me3”, “Me4”],outer=10),
sample = repeat(1:2,outer=20),
A plot with jitter but without a grid
I am putting this plot here to show how the jitter looks in my data
color = :model,
Now, if I add Geom.subplot_grid, the jitter functionality seems to stop working
Gadfly.plot(df_plot, x=:sample, color = :model, xgroup = :metric, # Added this new parameter y=:value, Geom.subplot_grid(Geom.point, Stat.x_jitter(range=0.4), free_x_axis = true), #Updated to subplot_grid Scale.x_discrete )
I also tried to put x_jitter out of subplot_grid, but it doesn’t work! Please advise.
free_x_axis = true), #Updated to subplot_grid