Placing labels with a rotation angle

The name of the pictureThe name of the pictureThe name of the pictureClash 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 ?



enter image description here



 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


enter image description here










share|improve this question

























    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 ?



    enter image description here



     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


    enter image description here










    share|improve this question























      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 ?



      enter image description here



       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


      enter image description here










      share|improve this question













      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 ?



      enter image description here



       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


      enter image description here







      tikz-pgf






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 51 mins ago









      Fabrice

      1,3221822




      1,3221822




















          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


          enter image description here






          share|improve this answer



























            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





            share|improve this answer




















              Your Answer







              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "85"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              convertImagesToLinks: false,
              noModals: false,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













               

              draft saved


              draft discarded


















              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






























              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


              enter image description here






              share|improve this answer
























                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


                enter image description here






                share|improve this answer






















                  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


                  enter image description here






                  share|improve this answer












                  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


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 46 mins ago









                  marmot

                  64.5k470139




                  64.5k470139




















                      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





                      share|improve this answer
























                        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





                        share|improve this answer






















                          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





                          share|improve this answer












                          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






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 36 mins ago









                          Torbjørn T.

                          152k13244427




                          152k13244427



























                               

                              draft saved


                              draft discarded















































                               


                              draft saved


                              draft discarded














                              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













































































                              Comments

                              Popular posts from this blog

                              Long meetings (6-7 hours a day): Being “babysat” by supervisor

                              What does second last employer means? [closed]

                              One-line joke