GiovineItalia / Gadfly.jl

Crafty statistical graphics for Julia.
http://gadflyjl.org/stable/
Other
1.91k stars 251 forks source link

The setting of axis range in Geom.subplot_grid does not work #1597

Open dongzhiming opened 2 years ago

dongzhiming commented 2 years ago

As you can see by running the following code, Coord.cartesian(ymin=1.5, ymax=2.6) does not work.

using Gadfly, DataFrames

df = DataFrame(:AAA=>[2.2, 1.8, 2.0, 2.3, 1.8, 1.9],
               :BBB=>[1, 2, 3, 1, 2, 3],
               :CCC=>["#", "#", "#", "&", "&", "&"])

p = Gadfly.plot(df, x=:CCC, y=:AAA, xgroup=:BBB, color=:CCC, 
Geom.subplot_grid(Geom.bar(position=:dodge), Coord.cartesian(ymin=1.5, ymax=2.6)),
Gadfly.Theme(alphas=[1.0], discrete_highlight_color=identity))

image

bjarthur commented 2 years ago

i can confirm that ymin is ignored, but curiously ymax works, and both work for Geom.bar without Geom.subplot_grid.

Mattriks commented 1 year ago

See also #730