Placing labels with a rotation angle
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
To place the labels "m = 2", "p = 3" and "m + p = 2 + 3" as in the attached figure, I made some tests but the result is not yet the one expected. Is there a more rigorous method ?
documentclass[border=10pt]standalone
usepackageunicode-math
setmainfontXITS
setmathfontXITS Math
usepackagepgfplots
usepackagemathrsfs
pgfplotssetcompat=1.16
usetikzlibraryintersections
usepgfplotslibraryfillbetween
begindocument
begintikzpicture
beginaxis[
x=1cm,y=1cm,
xtick=0,1,...,7,ytick=0,1,...,6,
ymin=-2.5,ymax=7,xmin=-1,xmax=8,
ymin=-2.5,
axis on top=false,
enlargelimits=false,
axis x line=middle,
axis y line=middle,
tick align=outside,
tickwidth=0.12cm,
xticklabels=0,1,empty,empty,empty,empty,empty,
yticklabels=0,1,empty,empty,empty,empty,
major tick style = thick, black,
axis line style = ultra thick,
x tick label style=
/pgf/number format/1000 sep=
,
extra x ticks=8,
extra x tick label=null,
extra y ticks=7,
extra y tick label=null,
extra tick style=tick style=draw=none,
xlabel=,ylabel=,
every axis x label/.style=
at=(ticklabel* cs:1),
anchor=west
,
every axis y label/.style=
at=(ticklabel* cs:1),
anchor=south
,
>=stealth,
grid=none]
addplot+[
mark=+,
only marks,
mark options=thick,black
]
coordinates
(0,1) (1,1.3) (2,1.69) (3,2.197) (4,2.8561) (5,3.71293) (6,4.826809) (7,6.2748517) (8,8.157307209);
draw[black,->,thick] (2,0)-- node[above,rotate=90]$u_2$ (2,1.69);
draw[black,->,thick] (3,0)-- node[above,rotate=90]$u_3$ (3,2.197);
draw[black,->,thick] (5,0)-- node[above,rotate=90]$u_2 times u_3$(5,3.71293);
node[below,black,rotate=45] at (2,-0.4)$m=2$;
node[below,black,rotate=45] at (3,-0.4)$p=3$;
node[below,black,rotate=45] at (4,-0.8)$m+p=2+3$;
node[right,black] at (6,4.826809) $mathcalC_u_n$;
node[below left=2pt] at (0,0)$0$;
endaxis
endtikzpicture
enddocument
tikz-pgf
add a comment |Â
up vote
2
down vote
favorite
To place the labels "m = 2", "p = 3" and "m + p = 2 + 3" as in the attached figure, I made some tests but the result is not yet the one expected. Is there a more rigorous method ?
documentclass[border=10pt]standalone
usepackageunicode-math
setmainfontXITS
setmathfontXITS Math
usepackagepgfplots
usepackagemathrsfs
pgfplotssetcompat=1.16
usetikzlibraryintersections
usepgfplotslibraryfillbetween
begindocument
begintikzpicture
beginaxis[
x=1cm,y=1cm,
xtick=0,1,...,7,ytick=0,1,...,6,
ymin=-2.5,ymax=7,xmin=-1,xmax=8,
ymin=-2.5,
axis on top=false,
enlargelimits=false,
axis x line=middle,
axis y line=middle,
tick align=outside,
tickwidth=0.12cm,
xticklabels=0,1,empty,empty,empty,empty,empty,
yticklabels=0,1,empty,empty,empty,empty,
major tick style = thick, black,
axis line style = ultra thick,
x tick label style=
/pgf/number format/1000 sep=
,
extra x ticks=8,
extra x tick label=null,
extra y ticks=7,
extra y tick label=null,
extra tick style=tick style=draw=none,
xlabel=,ylabel=,
every axis x label/.style=
at=(ticklabel* cs:1),
anchor=west
,
every axis y label/.style=
at=(ticklabel* cs:1),
anchor=south
,
>=stealth,
grid=none]
addplot+[
mark=+,
only marks,
mark options=thick,black
]
coordinates
(0,1) (1,1.3) (2,1.69) (3,2.197) (4,2.8561) (5,3.71293) (6,4.826809) (7,6.2748517) (8,8.157307209);
draw[black,->,thick] (2,0)-- node[above,rotate=90]$u_2$ (2,1.69);
draw[black,->,thick] (3,0)-- node[above,rotate=90]$u_3$ (3,2.197);
draw[black,->,thick] (5,0)-- node[above,rotate=90]$u_2 times u_3$(5,3.71293);
node[below,black,rotate=45] at (2,-0.4)$m=2$;
node[below,black,rotate=45] at (3,-0.4)$p=3$;
node[below,black,rotate=45] at (4,-0.8)$m+p=2+3$;
node[right,black] at (6,4.826809) $mathcalC_u_n$;
node[below left=2pt] at (0,0)$0$;
endaxis
endtikzpicture
enddocument
tikz-pgf
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
To place the labels "m = 2", "p = 3" and "m + p = 2 + 3" as in the attached figure, I made some tests but the result is not yet the one expected. Is there a more rigorous method ?
documentclass[border=10pt]standalone
usepackageunicode-math
setmainfontXITS
setmathfontXITS Math
usepackagepgfplots
usepackagemathrsfs
pgfplotssetcompat=1.16
usetikzlibraryintersections
usepgfplotslibraryfillbetween
begindocument
begintikzpicture
beginaxis[
x=1cm,y=1cm,
xtick=0,1,...,7,ytick=0,1,...,6,
ymin=-2.5,ymax=7,xmin=-1,xmax=8,
ymin=-2.5,
axis on top=false,
enlargelimits=false,
axis x line=middle,
axis y line=middle,
tick align=outside,
tickwidth=0.12cm,
xticklabels=0,1,empty,empty,empty,empty,empty,
yticklabels=0,1,empty,empty,empty,empty,
major tick style = thick, black,
axis line style = ultra thick,
x tick label style=
/pgf/number format/1000 sep=
,
extra x ticks=8,
extra x tick label=null,
extra y ticks=7,
extra y tick label=null,
extra tick style=tick style=draw=none,
xlabel=,ylabel=,
every axis x label/.style=
at=(ticklabel* cs:1),
anchor=west
,
every axis y label/.style=
at=(ticklabel* cs:1),
anchor=south
,
>=stealth,
grid=none]
addplot+[
mark=+,
only marks,
mark options=thick,black
]
coordinates
(0,1) (1,1.3) (2,1.69) (3,2.197) (4,2.8561) (5,3.71293) (6,4.826809) (7,6.2748517) (8,8.157307209);
draw[black,->,thick] (2,0)-- node[above,rotate=90]$u_2$ (2,1.69);
draw[black,->,thick] (3,0)-- node[above,rotate=90]$u_3$ (3,2.197);
draw[black,->,thick] (5,0)-- node[above,rotate=90]$u_2 times u_3$(5,3.71293);
node[below,black,rotate=45] at (2,-0.4)$m=2$;
node[below,black,rotate=45] at (3,-0.4)$p=3$;
node[below,black,rotate=45] at (4,-0.8)$m+p=2+3$;
node[right,black] at (6,4.826809) $mathcalC_u_n$;
node[below left=2pt] at (0,0)$0$;
endaxis
endtikzpicture
enddocument
tikz-pgf
To place the labels "m = 2", "p = 3" and "m + p = 2 + 3" as in the attached figure, I made some tests but the result is not yet the one expected. Is there a more rigorous method ?
documentclass[border=10pt]standalone
usepackageunicode-math
setmainfontXITS
setmathfontXITS Math
usepackagepgfplots
usepackagemathrsfs
pgfplotssetcompat=1.16
usetikzlibraryintersections
usepgfplotslibraryfillbetween
begindocument
begintikzpicture
beginaxis[
x=1cm,y=1cm,
xtick=0,1,...,7,ytick=0,1,...,6,
ymin=-2.5,ymax=7,xmin=-1,xmax=8,
ymin=-2.5,
axis on top=false,
enlargelimits=false,
axis x line=middle,
axis y line=middle,
tick align=outside,
tickwidth=0.12cm,
xticklabels=0,1,empty,empty,empty,empty,empty,
yticklabels=0,1,empty,empty,empty,empty,
major tick style = thick, black,
axis line style = ultra thick,
x tick label style=
/pgf/number format/1000 sep=
,
extra x ticks=8,
extra x tick label=null,
extra y ticks=7,
extra y tick label=null,
extra tick style=tick style=draw=none,
xlabel=,ylabel=,
every axis x label/.style=
at=(ticklabel* cs:1),
anchor=west
,
every axis y label/.style=
at=(ticklabel* cs:1),
anchor=south
,
>=stealth,
grid=none]
addplot+[
mark=+,
only marks,
mark options=thick,black
]
coordinates
(0,1) (1,1.3) (2,1.69) (3,2.197) (4,2.8561) (5,3.71293) (6,4.826809) (7,6.2748517) (8,8.157307209);
draw[black,->,thick] (2,0)-- node[above,rotate=90]$u_2$ (2,1.69);
draw[black,->,thick] (3,0)-- node[above,rotate=90]$u_3$ (3,2.197);
draw[black,->,thick] (5,0)-- node[above,rotate=90]$u_2 times u_3$(5,3.71293);
node[below,black,rotate=45] at (2,-0.4)$m=2$;
node[below,black,rotate=45] at (3,-0.4)$p=3$;
node[below,black,rotate=45] at (4,-0.8)$m+p=2+3$;
node[right,black] at (6,4.826809) $mathcalC_u_n$;
node[below left=2pt] at (0,0)$0$;
endaxis
endtikzpicture
enddocument
tikz-pgf
tikz-pgf
asked 51 mins ago
Fabrice
1,3221822
1,3221822
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
You only have to replace below
by anchor=north east
, then you can use the coordinates in a much more intuitive way.
documentclass[border=10pt]standalone
% usepackageunicode-math
% setmainfontXITS
% setmathfontXITS Math
usepackagepgfplots
usepackagemathrsfs
pgfplotssetcompat=1.16
% usetikzlibraryintersections
% usepgfplotslibraryfillbetween
begindocument
begintikzpicture
beginaxis[
x=1cm,y=1cm,
xtick=0,1,...,7,ytick=0,1,...,6,
ymin=-2.5,ymax=7,xmin=-1,xmax=8,
ymin=-2.5,
axis on top=false,
enlargelimits=false,
axis x line=middle,
axis y line=middle,
tick align=outside,
tickwidth=0.12cm,
xticklabels=0,1,empty,empty,empty,empty,empty,
yticklabels=0,1,empty,empty,empty,empty,
major tick style = thick, black,
axis line style = ultra thick,
x tick label style=
/pgf/number format/1000 sep=
,
extra x ticks=8,
extra x tick label=null,
extra y ticks=7,
extra y tick label=null,
extra tick style=tick style=draw=none,
xlabel=,ylabel=,
every axis x label/.style=
at=(ticklabel* cs:1),
anchor=west
,
every axis y label/.style=
at=(ticklabel* cs:1),
anchor=south
,
>=stealth,
grid=none]
addplot+[
mark=+,
only marks,
mark options=thick,black
]
coordinates
(0,1) (1,1.3) (2,1.69) (3,2.197) (4,2.8561) (5,3.71293) (6,4.826809) (7,6.2748517) (8,8.157307209);
draw[black,->,thick] (2,0)-- node[above,rotate=90]$u_2$ (2,1.69);
draw[black,->,thick] (3,0)-- node[above,rotate=90]$u_3$ (3,2.197);
draw[black,->,thick] (5,0)-- node[above,rotate=90]$u_2 times u_3$(5,3.71293);
node[anchor=north east,black,rotate=45] at (2,-0.1)$m=2$;
node[anchor=north east,black,rotate=45] at (3,-0.1)$p=3$;
node[anchor=north east,black,rotate=45] at (5,-0.1)$m+p=2+3$;
node[right,black] at (6,4.826809) $mathcalC_u_n$;
node[below left=2pt] at (0,0)$0$;
endaxis
endtikzpicture
enddocument
add a comment |Â
up vote
2
down vote
If you're not actually using the extra ticks for anything, you could do
extra x ticks=2,3,5,
extra x tick labels=$m=2$,$p=3$,$m+p=2+3$,
extra x tick style=
ticklabel style=rotate=45,anchor=north east
,
instead of those nodes. `
documentclass[border=10pt]standalone
%usepackageunicode-math
%setmainfontXITS
%setmathfontXITS Math
usepackagepgfplots
%usepackagemathrsfs
pgfplotssetcompat=1.16
usetikzlibraryintersections
usepgfplotslibraryfillbetween
begindocument
begintikzpicture
beginaxis[
x=1cm,y=1cm,
xtick=0,1,...,7,
ytick=0,1,...,6,
ymin=-2.5,ymax=7,xmin=-1,xmax=8,
ymin=-2.5,
axis on top=false,
enlargelimits=false,
axis x line=middle,
axis y line=middle,
tick align=outside,
tickwidth=0.12cm,
xticklabels=0,1,
yticklabels=0,1,
major tick style = thick, black,
axis line style = ultra thick,
x tick label style=
/pgf/number format/1000 sep=
,
extra x ticks=2,3,5,
extra x tick labels=$m=2$,$p=3$,$m+p=2+3$,
extra x tick style=
ticklabel style=rotate=45,anchor=north east
,
extra y ticks=7,
extra y tick label=null,
extra tick style=tick style=draw=none,
xlabel=,ylabel=,
every axis x label/.style=
at=(ticklabel* cs:1),
anchor=west
,
every axis y label/.style=
at=(ticklabel* cs:1),
anchor=south
,
>=stealth,
grid=none
]
addplot+[
mark=+,
only marks,
mark options=thick,black
]
coordinates
(0,1) (1,1.3) (2,1.69) (3,2.197) (4,2.8561) (5,3.71293) (6,4.826809) (7,6.2748517) (8,8.157307209);
draw[black,->,thick] (2,0)-- node[above,rotate=90]$u_2$ (2,1.69);
draw[black,->,thick] (3,0)-- node[above,rotate=90]$u_3$ (3,2.197);
draw[black,->,thick] (5,0)-- node[above,rotate=90]$u_2 times u_3$(5,3.71293);
node[right,black] at (6,4.826809) $mathcalC_u_n$;
node[below left=2pt] at (0,0)$0$;
endaxis
endtikzpicture
enddocument
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
You only have to replace below
by anchor=north east
, then you can use the coordinates in a much more intuitive way.
documentclass[border=10pt]standalone
% usepackageunicode-math
% setmainfontXITS
% setmathfontXITS Math
usepackagepgfplots
usepackagemathrsfs
pgfplotssetcompat=1.16
% usetikzlibraryintersections
% usepgfplotslibraryfillbetween
begindocument
begintikzpicture
beginaxis[
x=1cm,y=1cm,
xtick=0,1,...,7,ytick=0,1,...,6,
ymin=-2.5,ymax=7,xmin=-1,xmax=8,
ymin=-2.5,
axis on top=false,
enlargelimits=false,
axis x line=middle,
axis y line=middle,
tick align=outside,
tickwidth=0.12cm,
xticklabels=0,1,empty,empty,empty,empty,empty,
yticklabels=0,1,empty,empty,empty,empty,
major tick style = thick, black,
axis line style = ultra thick,
x tick label style=
/pgf/number format/1000 sep=
,
extra x ticks=8,
extra x tick label=null,
extra y ticks=7,
extra y tick label=null,
extra tick style=tick style=draw=none,
xlabel=,ylabel=,
every axis x label/.style=
at=(ticklabel* cs:1),
anchor=west
,
every axis y label/.style=
at=(ticklabel* cs:1),
anchor=south
,
>=stealth,
grid=none]
addplot+[
mark=+,
only marks,
mark options=thick,black
]
coordinates
(0,1) (1,1.3) (2,1.69) (3,2.197) (4,2.8561) (5,3.71293) (6,4.826809) (7,6.2748517) (8,8.157307209);
draw[black,->,thick] (2,0)-- node[above,rotate=90]$u_2$ (2,1.69);
draw[black,->,thick] (3,0)-- node[above,rotate=90]$u_3$ (3,2.197);
draw[black,->,thick] (5,0)-- node[above,rotate=90]$u_2 times u_3$(5,3.71293);
node[anchor=north east,black,rotate=45] at (2,-0.1)$m=2$;
node[anchor=north east,black,rotate=45] at (3,-0.1)$p=3$;
node[anchor=north east,black,rotate=45] at (5,-0.1)$m+p=2+3$;
node[right,black] at (6,4.826809) $mathcalC_u_n$;
node[below left=2pt] at (0,0)$0$;
endaxis
endtikzpicture
enddocument
add a comment |Â
up vote
3
down vote
You only have to replace below
by anchor=north east
, then you can use the coordinates in a much more intuitive way.
documentclass[border=10pt]standalone
% usepackageunicode-math
% setmainfontXITS
% setmathfontXITS Math
usepackagepgfplots
usepackagemathrsfs
pgfplotssetcompat=1.16
% usetikzlibraryintersections
% usepgfplotslibraryfillbetween
begindocument
begintikzpicture
beginaxis[
x=1cm,y=1cm,
xtick=0,1,...,7,ytick=0,1,...,6,
ymin=-2.5,ymax=7,xmin=-1,xmax=8,
ymin=-2.5,
axis on top=false,
enlargelimits=false,
axis x line=middle,
axis y line=middle,
tick align=outside,
tickwidth=0.12cm,
xticklabels=0,1,empty,empty,empty,empty,empty,
yticklabels=0,1,empty,empty,empty,empty,
major tick style = thick, black,
axis line style = ultra thick,
x tick label style=
/pgf/number format/1000 sep=
,
extra x ticks=8,
extra x tick label=null,
extra y ticks=7,
extra y tick label=null,
extra tick style=tick style=draw=none,
xlabel=,ylabel=,
every axis x label/.style=
at=(ticklabel* cs:1),
anchor=west
,
every axis y label/.style=
at=(ticklabel* cs:1),
anchor=south
,
>=stealth,
grid=none]
addplot+[
mark=+,
only marks,
mark options=thick,black
]
coordinates
(0,1) (1,1.3) (2,1.69) (3,2.197) (4,2.8561) (5,3.71293) (6,4.826809) (7,6.2748517) (8,8.157307209);
draw[black,->,thick] (2,0)-- node[above,rotate=90]$u_2$ (2,1.69);
draw[black,->,thick] (3,0)-- node[above,rotate=90]$u_3$ (3,2.197);
draw[black,->,thick] (5,0)-- node[above,rotate=90]$u_2 times u_3$(5,3.71293);
node[anchor=north east,black,rotate=45] at (2,-0.1)$m=2$;
node[anchor=north east,black,rotate=45] at (3,-0.1)$p=3$;
node[anchor=north east,black,rotate=45] at (5,-0.1)$m+p=2+3$;
node[right,black] at (6,4.826809) $mathcalC_u_n$;
node[below left=2pt] at (0,0)$0$;
endaxis
endtikzpicture
enddocument
add a comment |Â
up vote
3
down vote
up vote
3
down vote
You only have to replace below
by anchor=north east
, then you can use the coordinates in a much more intuitive way.
documentclass[border=10pt]standalone
% usepackageunicode-math
% setmainfontXITS
% setmathfontXITS Math
usepackagepgfplots
usepackagemathrsfs
pgfplotssetcompat=1.16
% usetikzlibraryintersections
% usepgfplotslibraryfillbetween
begindocument
begintikzpicture
beginaxis[
x=1cm,y=1cm,
xtick=0,1,...,7,ytick=0,1,...,6,
ymin=-2.5,ymax=7,xmin=-1,xmax=8,
ymin=-2.5,
axis on top=false,
enlargelimits=false,
axis x line=middle,
axis y line=middle,
tick align=outside,
tickwidth=0.12cm,
xticklabels=0,1,empty,empty,empty,empty,empty,
yticklabels=0,1,empty,empty,empty,empty,
major tick style = thick, black,
axis line style = ultra thick,
x tick label style=
/pgf/number format/1000 sep=
,
extra x ticks=8,
extra x tick label=null,
extra y ticks=7,
extra y tick label=null,
extra tick style=tick style=draw=none,
xlabel=,ylabel=,
every axis x label/.style=
at=(ticklabel* cs:1),
anchor=west
,
every axis y label/.style=
at=(ticklabel* cs:1),
anchor=south
,
>=stealth,
grid=none]
addplot+[
mark=+,
only marks,
mark options=thick,black
]
coordinates
(0,1) (1,1.3) (2,1.69) (3,2.197) (4,2.8561) (5,3.71293) (6,4.826809) (7,6.2748517) (8,8.157307209);
draw[black,->,thick] (2,0)-- node[above,rotate=90]$u_2$ (2,1.69);
draw[black,->,thick] (3,0)-- node[above,rotate=90]$u_3$ (3,2.197);
draw[black,->,thick] (5,0)-- node[above,rotate=90]$u_2 times u_3$(5,3.71293);
node[anchor=north east,black,rotate=45] at (2,-0.1)$m=2$;
node[anchor=north east,black,rotate=45] at (3,-0.1)$p=3$;
node[anchor=north east,black,rotate=45] at (5,-0.1)$m+p=2+3$;
node[right,black] at (6,4.826809) $mathcalC_u_n$;
node[below left=2pt] at (0,0)$0$;
endaxis
endtikzpicture
enddocument
You only have to replace below
by anchor=north east
, then you can use the coordinates in a much more intuitive way.
documentclass[border=10pt]standalone
% usepackageunicode-math
% setmainfontXITS
% setmathfontXITS Math
usepackagepgfplots
usepackagemathrsfs
pgfplotssetcompat=1.16
% usetikzlibraryintersections
% usepgfplotslibraryfillbetween
begindocument
begintikzpicture
beginaxis[
x=1cm,y=1cm,
xtick=0,1,...,7,ytick=0,1,...,6,
ymin=-2.5,ymax=7,xmin=-1,xmax=8,
ymin=-2.5,
axis on top=false,
enlargelimits=false,
axis x line=middle,
axis y line=middle,
tick align=outside,
tickwidth=0.12cm,
xticklabels=0,1,empty,empty,empty,empty,empty,
yticklabels=0,1,empty,empty,empty,empty,
major tick style = thick, black,
axis line style = ultra thick,
x tick label style=
/pgf/number format/1000 sep=
,
extra x ticks=8,
extra x tick label=null,
extra y ticks=7,
extra y tick label=null,
extra tick style=tick style=draw=none,
xlabel=,ylabel=,
every axis x label/.style=
at=(ticklabel* cs:1),
anchor=west
,
every axis y label/.style=
at=(ticklabel* cs:1),
anchor=south
,
>=stealth,
grid=none]
addplot+[
mark=+,
only marks,
mark options=thick,black
]
coordinates
(0,1) (1,1.3) (2,1.69) (3,2.197) (4,2.8561) (5,3.71293) (6,4.826809) (7,6.2748517) (8,8.157307209);
draw[black,->,thick] (2,0)-- node[above,rotate=90]$u_2$ (2,1.69);
draw[black,->,thick] (3,0)-- node[above,rotate=90]$u_3$ (3,2.197);
draw[black,->,thick] (5,0)-- node[above,rotate=90]$u_2 times u_3$(5,3.71293);
node[anchor=north east,black,rotate=45] at (2,-0.1)$m=2$;
node[anchor=north east,black,rotate=45] at (3,-0.1)$p=3$;
node[anchor=north east,black,rotate=45] at (5,-0.1)$m+p=2+3$;
node[right,black] at (6,4.826809) $mathcalC_u_n$;
node[below left=2pt] at (0,0)$0$;
endaxis
endtikzpicture
enddocument
answered 46 mins ago
marmot
64.5k470139
64.5k470139
add a comment |Â
add a comment |Â
up vote
2
down vote
If you're not actually using the extra ticks for anything, you could do
extra x ticks=2,3,5,
extra x tick labels=$m=2$,$p=3$,$m+p=2+3$,
extra x tick style=
ticklabel style=rotate=45,anchor=north east
,
instead of those nodes. `
documentclass[border=10pt]standalone
%usepackageunicode-math
%setmainfontXITS
%setmathfontXITS Math
usepackagepgfplots
%usepackagemathrsfs
pgfplotssetcompat=1.16
usetikzlibraryintersections
usepgfplotslibraryfillbetween
begindocument
begintikzpicture
beginaxis[
x=1cm,y=1cm,
xtick=0,1,...,7,
ytick=0,1,...,6,
ymin=-2.5,ymax=7,xmin=-1,xmax=8,
ymin=-2.5,
axis on top=false,
enlargelimits=false,
axis x line=middle,
axis y line=middle,
tick align=outside,
tickwidth=0.12cm,
xticklabels=0,1,
yticklabels=0,1,
major tick style = thick, black,
axis line style = ultra thick,
x tick label style=
/pgf/number format/1000 sep=
,
extra x ticks=2,3,5,
extra x tick labels=$m=2$,$p=3$,$m+p=2+3$,
extra x tick style=
ticklabel style=rotate=45,anchor=north east
,
extra y ticks=7,
extra y tick label=null,
extra tick style=tick style=draw=none,
xlabel=,ylabel=,
every axis x label/.style=
at=(ticklabel* cs:1),
anchor=west
,
every axis y label/.style=
at=(ticklabel* cs:1),
anchor=south
,
>=stealth,
grid=none
]
addplot+[
mark=+,
only marks,
mark options=thick,black
]
coordinates
(0,1) (1,1.3) (2,1.69) (3,2.197) (4,2.8561) (5,3.71293) (6,4.826809) (7,6.2748517) (8,8.157307209);
draw[black,->,thick] (2,0)-- node[above,rotate=90]$u_2$ (2,1.69);
draw[black,->,thick] (3,0)-- node[above,rotate=90]$u_3$ (3,2.197);
draw[black,->,thick] (5,0)-- node[above,rotate=90]$u_2 times u_3$(5,3.71293);
node[right,black] at (6,4.826809) $mathcalC_u_n$;
node[below left=2pt] at (0,0)$0$;
endaxis
endtikzpicture
enddocument
add a comment |Â
up vote
2
down vote
If you're not actually using the extra ticks for anything, you could do
extra x ticks=2,3,5,
extra x tick labels=$m=2$,$p=3$,$m+p=2+3$,
extra x tick style=
ticklabel style=rotate=45,anchor=north east
,
instead of those nodes. `
documentclass[border=10pt]standalone
%usepackageunicode-math
%setmainfontXITS
%setmathfontXITS Math
usepackagepgfplots
%usepackagemathrsfs
pgfplotssetcompat=1.16
usetikzlibraryintersections
usepgfplotslibraryfillbetween
begindocument
begintikzpicture
beginaxis[
x=1cm,y=1cm,
xtick=0,1,...,7,
ytick=0,1,...,6,
ymin=-2.5,ymax=7,xmin=-1,xmax=8,
ymin=-2.5,
axis on top=false,
enlargelimits=false,
axis x line=middle,
axis y line=middle,
tick align=outside,
tickwidth=0.12cm,
xticklabels=0,1,
yticklabels=0,1,
major tick style = thick, black,
axis line style = ultra thick,
x tick label style=
/pgf/number format/1000 sep=
,
extra x ticks=2,3,5,
extra x tick labels=$m=2$,$p=3$,$m+p=2+3$,
extra x tick style=
ticklabel style=rotate=45,anchor=north east
,
extra y ticks=7,
extra y tick label=null,
extra tick style=tick style=draw=none,
xlabel=,ylabel=,
every axis x label/.style=
at=(ticklabel* cs:1),
anchor=west
,
every axis y label/.style=
at=(ticklabel* cs:1),
anchor=south
,
>=stealth,
grid=none
]
addplot+[
mark=+,
only marks,
mark options=thick,black
]
coordinates
(0,1) (1,1.3) (2,1.69) (3,2.197) (4,2.8561) (5,3.71293) (6,4.826809) (7,6.2748517) (8,8.157307209);
draw[black,->,thick] (2,0)-- node[above,rotate=90]$u_2$ (2,1.69);
draw[black,->,thick] (3,0)-- node[above,rotate=90]$u_3$ (3,2.197);
draw[black,->,thick] (5,0)-- node[above,rotate=90]$u_2 times u_3$(5,3.71293);
node[right,black] at (6,4.826809) $mathcalC_u_n$;
node[below left=2pt] at (0,0)$0$;
endaxis
endtikzpicture
enddocument
add a comment |Â
up vote
2
down vote
up vote
2
down vote
If you're not actually using the extra ticks for anything, you could do
extra x ticks=2,3,5,
extra x tick labels=$m=2$,$p=3$,$m+p=2+3$,
extra x tick style=
ticklabel style=rotate=45,anchor=north east
,
instead of those nodes. `
documentclass[border=10pt]standalone
%usepackageunicode-math
%setmainfontXITS
%setmathfontXITS Math
usepackagepgfplots
%usepackagemathrsfs
pgfplotssetcompat=1.16
usetikzlibraryintersections
usepgfplotslibraryfillbetween
begindocument
begintikzpicture
beginaxis[
x=1cm,y=1cm,
xtick=0,1,...,7,
ytick=0,1,...,6,
ymin=-2.5,ymax=7,xmin=-1,xmax=8,
ymin=-2.5,
axis on top=false,
enlargelimits=false,
axis x line=middle,
axis y line=middle,
tick align=outside,
tickwidth=0.12cm,
xticklabels=0,1,
yticklabels=0,1,
major tick style = thick, black,
axis line style = ultra thick,
x tick label style=
/pgf/number format/1000 sep=
,
extra x ticks=2,3,5,
extra x tick labels=$m=2$,$p=3$,$m+p=2+3$,
extra x tick style=
ticklabel style=rotate=45,anchor=north east
,
extra y ticks=7,
extra y tick label=null,
extra tick style=tick style=draw=none,
xlabel=,ylabel=,
every axis x label/.style=
at=(ticklabel* cs:1),
anchor=west
,
every axis y label/.style=
at=(ticklabel* cs:1),
anchor=south
,
>=stealth,
grid=none
]
addplot+[
mark=+,
only marks,
mark options=thick,black
]
coordinates
(0,1) (1,1.3) (2,1.69) (3,2.197) (4,2.8561) (5,3.71293) (6,4.826809) (7,6.2748517) (8,8.157307209);
draw[black,->,thick] (2,0)-- node[above,rotate=90]$u_2$ (2,1.69);
draw[black,->,thick] (3,0)-- node[above,rotate=90]$u_3$ (3,2.197);
draw[black,->,thick] (5,0)-- node[above,rotate=90]$u_2 times u_3$(5,3.71293);
node[right,black] at (6,4.826809) $mathcalC_u_n$;
node[below left=2pt] at (0,0)$0$;
endaxis
endtikzpicture
enddocument
If you're not actually using the extra ticks for anything, you could do
extra x ticks=2,3,5,
extra x tick labels=$m=2$,$p=3$,$m+p=2+3$,
extra x tick style=
ticklabel style=rotate=45,anchor=north east
,
instead of those nodes. `
documentclass[border=10pt]standalone
%usepackageunicode-math
%setmainfontXITS
%setmathfontXITS Math
usepackagepgfplots
%usepackagemathrsfs
pgfplotssetcompat=1.16
usetikzlibraryintersections
usepgfplotslibraryfillbetween
begindocument
begintikzpicture
beginaxis[
x=1cm,y=1cm,
xtick=0,1,...,7,
ytick=0,1,...,6,
ymin=-2.5,ymax=7,xmin=-1,xmax=8,
ymin=-2.5,
axis on top=false,
enlargelimits=false,
axis x line=middle,
axis y line=middle,
tick align=outside,
tickwidth=0.12cm,
xticklabels=0,1,
yticklabels=0,1,
major tick style = thick, black,
axis line style = ultra thick,
x tick label style=
/pgf/number format/1000 sep=
,
extra x ticks=2,3,5,
extra x tick labels=$m=2$,$p=3$,$m+p=2+3$,
extra x tick style=
ticklabel style=rotate=45,anchor=north east
,
extra y ticks=7,
extra y tick label=null,
extra tick style=tick style=draw=none,
xlabel=,ylabel=,
every axis x label/.style=
at=(ticklabel* cs:1),
anchor=west
,
every axis y label/.style=
at=(ticklabel* cs:1),
anchor=south
,
>=stealth,
grid=none
]
addplot+[
mark=+,
only marks,
mark options=thick,black
]
coordinates
(0,1) (1,1.3) (2,1.69) (3,2.197) (4,2.8561) (5,3.71293) (6,4.826809) (7,6.2748517) (8,8.157307209);
draw[black,->,thick] (2,0)-- node[above,rotate=90]$u_2$ (2,1.69);
draw[black,->,thick] (3,0)-- node[above,rotate=90]$u_3$ (3,2.197);
draw[black,->,thick] (5,0)-- node[above,rotate=90]$u_2 times u_3$(5,3.71293);
node[right,black] at (6,4.826809) $mathcalC_u_n$;
node[below left=2pt] at (0,0)$0$;
endaxis
endtikzpicture
enddocument
answered 36 mins ago
Torbjørn T.
152k13244427
152k13244427
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f454802%2fplacing-labels-with-a-rotation-angle%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password