Skip to content
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

xtick=data #175

Closed
chelseas opened this issue Jun 22, 2021 · 5 comments
Closed

xtick=data #175

chelseas opened this issue Jun 22, 2021 · 5 comments

Comments

@chelseas
Copy link

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
Copy link
Author

e.g. like

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

@mykelk
Copy link
Member

mykelk commented Jun 23, 2021

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

@chelseas
Copy link
Author

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

@tawheeler
Copy link
Member

tawheeler commented Jun 23, 2021

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
Copy link
Author

chelseas commented Jun 23, 2021

I ended up specifying:

xtickten={1,2,3}

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants