Gadfly.jl
Gadfly.jl copied to clipboard
How to shows the axis ticks little line?
So, basically I want to make plot that shows the axis ticks little line but doesn't show the grid lines inside the panel. Is it possible?
wow, what an omission.
i was hoping grid_color
or grid_line_width
in Theme
could be used as a hack, but those both effect the axis ticks as well.
relevant code is here.
need to think about the user interface. perhaps adding a boolean grid
keyword argument to Guide.{x,y}ticks
.
I encountered same problem recently. I used the following code to make a plot that has a border and no grids inside the polt, which is quite common in a lot of academic papers. However, I don't know how to add ticks on the x-axis and y-axis without having grids. Is this possible? If not, will it be added as a feature in the future? I think it would be a useful one. Thank you!
using Compose, DataFrames, Gadfly, RDatasets
D = dataset("datasets", "iris")
p = plot(D,
x=:SepalLength, y=:SepalWidth,
color=:Species,
Theme(panel_stroke=colorant"black",
grid_line_width=0mm))
Adding tick marks is not on my current Roadmap #1385, but there is PR #792 which appears abandoned, so someone could modify/update.
For what it's worth, I would also find this very helpful
@frankwswang Thanks for the solution but, I do not need the upper and right panel stroke. Is it possible?
I don't know how to resolve that issue. Sorry!