18
votes
Accepted
pgfplots - How to rotate extra x tick labels
Add a tick label style within the extra x tick style.
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
width=16.5cm,
height=7cm,
xmin=-0....
12
votes
Graph with cropped letters
I see that you set ticks=none, and then manually added something very much like axis ticks. If you use PGFPLOTS's own tick-placing system, the tick labels do not get clipped.
In this example, there'...
11
votes
Accepted
pgfplots - Remove tickmarks on right and top of plot
You want xtick pos=bottom,ytick pos=left, or alternatively tick pos=left which does the same thing. The length of the ticks is defined by the tickwidth parameter.
\documentclass[a4paper, 11 pt]{...
11
votes
Graph with cropped letters
Let me convert my comment to an answer. In your case clip=false will work just fine:
\documentclass[margin=3mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16,
axis lines=middle, % &...
10
votes
Accepted
Minor grid in pgfplot not showing when specifying ticks manualy
Setting all the ticks explicitly works:
\documentclass[border=2mm]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
grid=both,
minor tick num=1,
xtick={0,0.1,0....
9
votes
Accepted
Get the auto generated tick distance of a pgfplot (DIN 461)
You can give the tick labels numbered names that can then be used to position a label halfway between the last two labels.
\documentclass[border=5mm]{standalone}
\usepackage{pgfplots}
\usepackage{...
8
votes
Accepted
pgfplots: how to move extra x tick label vertically down
If the extra ticks should be longer, its tick labels shift automatically:
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}% <- set a compat!! (current version is 1.14)
\...
8
votes
Accepted
add extra tick labels pgfplot
extra x ticks and extra x tick labels can take lists of positions and labels, not just single values. So you should use:
extra x ticks={1000, 3000},
extra x tick style={%
grid=major,
},
extra x ...
8
votes
Accepted
Change position of individual tick label
If its only one tick label, you could use
x tick label style={yshift={(\ticknum==2)*2em}}
or
x tick label style={yshift={(\tick==-1)*2em}}
And you can add the following to remove the nodes near ...
8
votes
Accepted
Tikzpicture - how to make major ticks longer or thicker
On page 342 from the manual (version 1.16), it introduces every minor tick/.append style={...} and every major tick/.append style={...} options for customization. You need to use minor tick length = ...
7
votes
Minor grid in pgfplot not showing when specifying ticks manualy
You could also try
xtick distance=.1,
ytick distance=.1,
instead of xtick={0,0.1,...,1},ytick={0,0.1,...,1},.
Code:
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{...
6
votes
Accepted
Logarithmic kelvin colorbar
I admit that I have a couple of questions which may indicate that I did not understand/think through your question (for example, how to you want to display -1*10^9 on a log scale? Or do you mean 10^-9?...
6
votes
Accepted
How can I remove all tics except extra tics?
The automatic x ticks are suppressed by the special value \empty:
xtick=\empty
\documentclass[paper=a4,12pt,version=last,landscape]{scrartcl}
\usepackage{pgfplots}
\begin{document}
\begin{...
6
votes
How to color tick label background when curve overlaps it
Add xticklabel style = {fill=white}and set layers = axis on topto your axis :
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.13}
\begin{document}
\pgfplotsset{
standard/....
6
votes
Accepted
How to remove mantissa on semilogarithmic pgfplots graph (while retaining modifications for sans serif tick font)
If I understand correctly, you care about \mathsf, but not about the fixed point numbers.
In this case, you can modify the way pgfplots typesets the math labels. To this end, pgfplots offers the ...
6
votes
Accepted
yticklabels and ytick wont work
TL;DR:
You have to set the axis limits with ymin=0 to make the 0 appear because PGFPlots adjusts the limits automatically and it doesn't know that the 0 should appear.
Slightly wordier version (with ...
6
votes
Tikzpicture - how to make major ticks longer or thicker
With \pgfmathsetlengthmacro\MajorTickLength{...} you just created a length and stored some value to it, but you never applied that value somewhere. So by adding major tick length=\MajorTickLength to ...
6
votes
Accepted
pgfplots: Missing one group of bars
As ferahfeza already mentioned in the comment below the question the reason, that the last block of bars isn't shown, is the ybar interval statement. And here is why it so: That is because of the ...
5
votes
Accepted
How to color tick label background when curve overlaps it
To fill the background of the ticklabels you can use ticklabel style={fill=white}. But the are drawn before the plots ... To change this order you can define and use a new layer set.
\pgfplotsset{
...
5
votes
Accepted
Specify ticks as micro seconds
If fixed it using the following options to the axis environment:
scaled x ticks=base 10:6,
/pgf/number format/sci subscript,
Full working example below with output:
\documentclass[tikz,border=10pt]{...
5
votes
Accepted
Pgfplot with two y-axes not showing correct ytick values
Seems if you only specify the y-limits, and do not have any plots in the axis, pgfplots will fall back to default limits. It warns you about this in the log file:
Package pgfplots Warning: You have ...
4
votes
Accepted
ytick lists in loglogaxis and semilogyaxis
Using ytick and the exponential enotation you cannot use the ... shortcut. However, You can use ytickten, as in
ytickten={-15,...,8},
which is equivalent to specify ytick as the list 1e-15,...
4
votes
Accepted
Pgfplots: Labels from data table not working as expected
This should fix your problem:
\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepackage{filecontents}
\begin{filecontents}{data.dat}
fname foo
...
4
votes
Engineering notation (scientific) as tick labels with pgfplots (maybe via siunitx)?
I was facing a similar problem, except that I wanted to have SI prefixes. I adapted your code to that. Might not be the cleanest solution, but works so far. I also added a rounding capability so that ...
4
votes
Accepted
Extra yticks interfering with label distances
This indeed a bug which is caused by the combination of tick align=outside with extra ticks. There the major tick length is taken into account "two times to much". First from the normal major tick ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
ticks × 189pgfplots × 143
tikz-pgf × 77
axis × 27
labels × 26
bar-chart × 8
plot × 7
horizontal-alignment × 6
dateplot × 6
formatting × 5
diagrams × 5
tikz-styles × 5
matlab2tikz × 4
positioning × 3
fontsize × 3
nodes × 3
pgfplotstable × 3
graphs × 3
rotating × 3
scaling × 2
gnuplot × 2
sans-serif × 2
grids × 2
groupplots × 2
histogram × 2