JuliaTeX / PGFPlots.jl

This library uses the LaTeX package pgfplots to produce plots.
Other
188 stars 36 forks source link

xtick=data #175

Closed chelseas closed 3 years ago

chelseas commented 3 years ago

I want to be able to use this pgfplots option: https://tex.stackexchange.com/questions/47345/specify-the-step-of-pgfplots-axis

xtick=data

is there a hack i can use to make this happen?

chelseas commented 3 years ago

e.g. like

Axis(...., other_plot_options="xtick=data, ytick=data")

mykelk commented 3 years ago

It would be Axis(..., style="xtick=data").

chelseas commented 3 years ago

thanks! hm....only seems to put ticks for the first line in the plot.... image

tawheeler commented 3 years ago

Apparently, when you use xtick=data, only the first \addplot command is used to determine the tick positions. You probably have to set the tick labels manually, ie xtick={10,30,40} etc.

chelseas commented 3 years ago

I ended up specifying:

xtickten={1,2,3}

which actually brought back the x-axis minor tick lines, which I liked.