Using pgfplots, I often want to label the horizontal axis major ticks in units of pi or pi/2, or pi/3. Is it possible to have such "trigonometric major ticks" use minor tick num = &lt;value&gt; to specify the number of minor ticks?  Currently my approach for "trigonometric major ticks" is to make a style wholes that specifies the xtick=&lt;integer multiples of pi&gt; and xticklabels=&lt;labels&gt;. I specify the ticks for a range -4*pi to +4*pi, and crop the graph as needed. I similarly have a style called halves for half-integer multiples of pi:  \documentclass{standalone}  \usepackage{pgfplots} %This package also loads tikz  \pgfplotsset{     % Global Styles     axis lines = middle,     xlabel = $x$,     ylabel = $y$,     no markers,     samples=50,     grid = both,     trig format plots=rad,     enlargelimits = false,     axis line style = {line width=0.5pt},     every axis plot/.append style={         line width = 1.25pt,         smooth,         },     % Label every pi     halves/.style={     xtick = {-12.5664, -10.9956, -9.42478, -7.85398, -6.28319, -4.71239, -3.14159, -1.5708, 0, 1.5708, 3.14159, 4.71239, 6.28319, 7.85398, 9.42478, 10.9956, 12.5664, 14.1372, 15.708, 17.2788, 18.8496, 20.4204, 21.9911, 23.5619, 25.1327},     xticklabels = {$-4\pi$,$-\frac{7\pi}{2}$,$-3\pi$,$-\frac{5\pi}{2}$,$-2\pi$,$-\frac{3\pi}{2}$,$-\pi$,$-\frac{\pi}{2}$,$0$,$\frac{\pi}{2}$,$\pi$,$\frac{3\pi}{2}$,$2\pi$,$\frac{5\pi}{2}$,$3\pi$,$\frac{7\pi}{2}$,$4\pi$,$\frac{9\pi}{2}$,$5\pi$,$\frac{11\pi}{2}$,$6\pi$,$\frac{13\pi}{2}$,$7\pi$,$\frac{15\pi}{2}$,$8\pi$}     },     % Label every pi     wholes/.style={     xtick = {-12.5664, -9.42478, -6.28319, -3.14159, 0., 3.14159, 6.28319, 9.42478, 12.5664, 15.708, 18.8496, 21.9911, 25.1327},     xticklabels = {$-4\pi$,$-3\pi$,$-2\pi$,$-\pi$,$0$,$\pi$,$2\pi$,$3\pi$,$4\pi$,$5\pi$,$6\pi$,$7\pi$,$8\pi$}     } }  \begin{document}  \begin{tikzpicture} \begin{axis}[wholes,domain=-pi:3*pi,ymin=-2,ymax=+4,minor tick num = 1]     \addplot {1-2*cos(2*x)};     \legend{$1-2\cos(2x)$} \end{axis} \end{tikzpicture}  \begin{tikzpicture} \begin{axis}[halves,domain=-pi:pi,ymin=-2,ymax=+4,minor tick num = 1]     \addplot[red] {2+0.5*sin(4*x)};     \legend{$2+0.5\sin(4x)$} \end{axis} \end{tikzpicture}  \end{document}    with output     Problem: I'm fairly happy with this solution, except minor tick num=1 is not working on the x-axis. I think this is due to rounding errors.   Certainly I could specify the minor ticks manually. I really don't want to do this---I need to create many graphs like this, some times I want minor tick num = 1, sometimes I want minor tick num = 3.  Is there a better approach?
30787
How do I make the axis labels use multiples of \pi in PGFPlots?
80718
With pgfplots, I am creating a simple coordinate plot with error bars like this:    \documentclass[crop,10pt]{standalone} \usepackage[english]{babel} \usepackage{pgfplots}      \begin{document}%         \setlength{\linewidth}{246pt}%              \begin{tikzpicture}             \begin{axis}[             width=\linewidth,             ytick pos = left,             xtick pos = left,             clip=false,             axis on top,             tick align = outside,             yticklabel style={%             /pgf/number format/fixed,             /pgf/number format/precision=1,             /pgf/number format/fixed zerofill         },             ytick scale label code/.code={},             xlabel={X},             ylabel={Y},     ]             \addplot[mark=*]             plot[             error bars/.cd,             y dir=both,             y fixed=0.0001     ]             coordinates{(1,0.0005) (1.1,0.0013) (5,0.0015)};             \end{axis}             \end{tikzpicture}     \end{document}   In the original plot I have a lot more points. I would now like the line and the markers (including the error bars) to have different colors to better distinguish the line from the error bars. Is that somehow possible? The only way I found so far is to plot the data just as a line in one color and then plot it again just as markers in another color. This works, but I guess there must be some better solution to this. Thanks for the support, John
61896
In a plot with pgfplots I would like to draw, from background to foreground, in the following order:   (background) grid; (intermediate layer) plot; (foreground) axis.   As specified ,     Adding axis on top to the axis options means axis lines, ticks and   grids are printed on top of the stuff inside the environment.   So, this is not the correct option for this. This code  \documentclass{article} \usepackage{pgfplots} \usetikzlibrary{shapes.geometric,arrows,arrows.meta} \pgfplotsset{     /pgfplots/layers/Bowpark/.define layer set={         axis background,axis grid,main,axis ticks,axis lines,axis tick labels,         axis descriptions,axis foreground     }{/pgfplots/layers/standard}, }  \begin{document}  \begin{tikzpicture} \begin{axis}[/pgfplots/layers/Bowpark,              width=\textwidth,              xmin=-0.5, xmax=6,              ymin=-0.5, ymax=4,              axis line style = thin,              axis lines=middle,              axis line style={-{Stealth[length=2.5mm]}},              thick,              grid=major, grid style={dashed,gray!30}]      \addplot[blue, samples = 100] {x^2};  \end{axis} \end{tikzpicture}  \end{document}   doesn't work neither (plot is above grid, but also above the axis). I used \addplot[blue, samples = 100] {x^2}; instead of \addplot[samples = 100] {x^(1/2)}; to better highlight the superposition of the plot, the grid and the axis.      What's wrong? Note that also trying  \pgfplotsset{     /pgfplots/layers/Bowpark/.define layer set={         axis background,main,axis grid,axis ticks,axis lines,axis tick labels,         axis descriptions,axis foreground     }{/pgfplots/layers/standard}, }   (switched the order of main and axis grid) produces the same output.  Maybe something in my configuration ignores the layers order?
117204
Consider this 3D plot:  \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}   \begin{axis}     \addplot3[surf,domain=-4.5:4.5]{(x^2)-(y^2)};   \end{axis} \end{tikzpicture} \end{document}     How can I alter the rendering style of the ticks so that   ticks are only drawn next to their labels, not on the opposite axis? ticks are only drawn on the background faces of the 3D box, not the on the invisible foreground faces?   Here is the resulting picture I have in mind (I erased the unwanted ticks in the bitmap):
59834
I've just started to play with pgfplot. I'm trying to prepare a plot like to following   \begin{figure}[h] \centering \begin{tikzpicture} \begin{axis}[minor tick num=1,  axis x line=middle, axis y line=middle, xlabel=$k$, ylabel=$\omega$, ymin=0,xmin=-2,ymax=60] \addplot[blue,domain=0:5, line width=1.5pt] {x^2+25}; \addplot[orange,domain=0:5,line width=1pt]{3*x+22.75}; \addplot[cyan,domain=0:1.5, line width=1pt,dashed]{18.166*x}; \node[coordinate,pin=right:{$v_{\phi}=\frac{\omega}{k}$}]     at (axis cs:1,17) {}; \node[coordinate,pin=right:{$v_{g}=\frac{d\omega}{dk}$}]     at (axis cs:2.5,30) {}; \node[coordinate,pin=left:{dispersion relation}]     at (axis cs:4.5,47) {}; \end{axis} \end{tikzpicture} \caption{Wave dispersion relation with phase and group velocity} \label{fig:2} \end{figure}   What I would like to do is dropping the x-y tick labels so that we just maintaing the x-y title. How can I obtain it?
124193
I have made a chart using pgfplots as written below and I want to have the y-axis in logarithmic scale. This code works fine but the base of the logarithm is 10. How can I change it to base 2?  \begin{tikzpicture}     \begin{axis}[         height=0.5\textwidth,         width=\textwidth,         xlabel=LabelX,         xtick={1,...,10},         ylabel=LabelY,         ymode=log,     ]         \addplot[mark=*,blue] table[x=V,y=R] {data1.data};         \addplot[mark=x,red] table[x=V,y=E] {data2.data};     \end{axis} \end{tikzpicture}
82156
I have a figure on an axis and want to add descriptive text and signs to it with tikz. However, I need to do the alignment of the text with respect to the axis by visually observing if it matches. Is there a way to tell tikz to use the alignment with respect to the axis. I tried using (axis cs:x,y) command but did not help.   \documentclass{standalone} \usepackage{pgfplots} \begin{document}     \begin{tikzpicture}         \begin{axis}[             width=10cm,             height=4cm,             x axis line style={-stealth},             y axis line style={-stealth},             title={this is my title},             xticklabels={},             ymax = 1.5, xmax=7.5,             axis lines*=center,             ytick={1},             xlabel={f},             ylabel={H(f)},             xlabel near ticks,             ylabel near ticks,             every axis x label/.style={at={(current axis.right of origin)},anchor=west},             every axis y label/.style={at={(ticklabel* cs:1.05)},anchor=south}             ]             \addplot+[thick,mark=none,const plot]             coordinates             {(0,0) (4,1) (5,0) (7,0)};         \end{axis}         % I want this to be aligned with axis' 4 and 5         \draw[&lt;-&gt;] (4.0,-0.3) -- (5.0,-0.3) \end{tikzpicture} \end{document}
108916
I'm having some trouble with polar plots. I generate the plot coordinates using Scilab and then plot them in Latex. I can't figure out how to remove the points (mark = \empty does nothing, but changing the mark with mark=x for example does nothing either), nor can I move the ticks out of the picture. Can anyone help please?  I want to add units to the ticks as well, degrees for the x ticks and dB for the y ticks.  My code is as follows:  \begin{tikzpicture} \begin{polaraxis}[xmin=-90,xmax=90,rotate=90]     \addplot table [x index=0, y index=1,col sep = comma, data cs=polarrad,mark = \empty]{mydata05.csv}; \end{polaraxis} \end{tikzpicture}
105800
I have created a bar diagram similar to:   But at a certain width the symbolic x coords are plotted twice. How can I manage the x axis correctly?  Here is my mini example:  \documentclass[12pt,a4paper,]{scrartcl} \usepackage{a4wide} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage{graphicx} \usepackage{tikz} \usepackage[miktex]{gnuplottex}  \usepackage{pgfplots}    \begin{document}     \begin{figure}         \begin{tikzpicture}         \begin{axis}[%         width=1\linewidth,         height=0.5\linewidth,         axis x line=center,         axis y line=left,         symbolic x coords={CP-Schelle,Mistel-Schelle V2,Mistel-Schelle V4,Mistel-Schelle V4.2D,Gewickelt nach Inspire},         enlargelimits=true,         ymin=0,         nodes near coords,         x tick label style={         font=\small,         text width=1cm,         align=center         },         ybar]         \addplot[color=gray, fill] coordinates {(CP-Schelle,1.000)};         \addplot[color=blue, fill] coordinates {(Mistel-Schelle V2,2.459)(Mistel-Schelle V4,3.318)(Mistel-Schelle V4.2D,2.243)(Gewickelt nach Inspire,1.782)};         \end{axis}         \end{tikzpicture}     \end{figure}      \begin{figure}         \begin{tikzpicture}         \begin{axis}[%         width=0.6\linewidth,         height=0.5\linewidth,         axis x line=center,         axis y line=left,         symbolic x coords={CP-Schelle,Mistel-Schelle V2,Mistel-Schelle V4,Mistel-Schelle V4.2D,Gewickelt nach Inspire},         enlargelimits=true,         ymin=0,         nodes near coords,         x tick label style={             font=\small,             text width=1cm,             align=center         },         ybar]         \addplot[color=gray, fill] coordinates {(CP-Schelle,1.000)};         \addplot[color=blue, fill] coordinates {(Mistel-Schelle V2,2.459)(Mistel-Schelle V4,3.318)(Mistel-Schelle V4.2D,2.243)(Gewickelt nach Inspire,1.782)};         \end{axis}         \end{tikzpicture}     \end{figure}  \end{document}
33045
I would like to have the unit circle, centered at the origin, on the Cartesian plane drawn.  The origin is to be marked with a dot and labeled "O" and five dots are to be drawn on the circle, one on the x-axis, and the others at k(2\pi/5) radians from the positive x-axis for each integer 1 \leq k &lt; 5, and they are to be labeled "w_{k}".  Arrows are to be drawn from the origin to each w_{k}, too. One angle is to be drawn and labeled - the one from the positive x-axis to the ray through w_{1}.  I have included some of the code.  It starts with the following commands.  \tikzset{mydot/.style={fill,circle,inner sep=1.5pt}}   Is there a manual that explains each of these commands?  I guess that this is instructing LaTeX how to make the dots indicating the coordinates each time "\mydot" is in the code.  \documentclass{amsart} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsthm} \usepackage{newlfont} \usepackage{mathtools} \usepackage{tikz}  \tikzset{ mydot/.style={   fill,   circle,   inner sep=1.5pt   } }  \begin{document}  \begin{tikzpicture}[&gt;=latex]   % the coordinates of the vertices \coordinate (O) at (0,0); \coordinate (w_{1}) at (\cos(2\pi/5), \sin(2\pi/5));  % the axes \draw[help lines,-&gt;] (-1.5,0) -- (1.5,0); \draw[help lines,-&gt;] (0,-1.5) -- (0,1.5);  % labelling the vertices \node[mydot,label={below:$O$}] at (O) {}; \node[mydot,label={right:$w_{1} = \bigl(\cos(2\pi/5), \sin(2\pi/5)\bigr)$}] at (w_{1}) {};   % the arcs for the angle \begin{scope}[gray] \draw[-&gt;]   (1,0) +(0:0.5cm) arc [radius=1cm,start angle=0,end angle=2\pi/5] node[midway,right] {$2\pi/5$}; \end{scope}  \end{tikzpicture} \end{document}
13797
Is it possible to tell pgfplots to put tick labels between the tick marks instead of at the tick marks?  MWE:  \documentclass[margin=5pt]{standalone}  \usepackage{tikz} \usepackage{pgfplots}  \begin{document}      \begin{tikzpicture}          \begin{axis}[             width=5in,             height=3in,             axis lines=middle,             scaled ticks=false,             xtick=\empty,             xmin=0,             xmax=3,             extra x ticks={0,1,2,3},             extra x tick labels={low,high,med},         ]          \addplot [mark=*,draw] coordinates {(0.5,2) (1.5,4) (2.5,3)};          \end{axis}     \end{tikzpicture}  \end{document}   Result:    I can do it manually by adding  xticklabel style = {xshift=1.9cm,align=center},     but this seems unsatisfying, unreliable, and requires too much trial and error.
103590
I am trying to plot a graph with the the following x-values:  0.01, 0.05, 0.1, 0.2, 0.3, 0.5, 0.6, 0.7, 0.8, and 0.9  When I set them to my xtick values, the numbers get pushed to the left, since they grow at different rates. I'm wondering if there's a way to have the values align to the x-axis properly.  This is how it looks, and my code follows:    \begin{tikzpicture}  \begin{axis}[     title={Throughput vs. Arrival Rate (N = 10)},     xlabel={$\lambda$ (Arrival Rate)},     ylabel={Throughput},     xmin=0.01, xmax=0.9,     ymin=0, ymax=10,     xtick={0.01,0.05,0.1,0.2,0.3,0.5,0.6,0.7,0.8,0.9},     ytick={0,1,2,3,4,5,6,7,8,9,10},     legend pos=north west,     ymajorgrids=true,     grid style=dashed, ]  % Simulated \addplot[     color=blue,     mark=square,     line width = 1.2pt,     ]     coordinates {     (0.01,0.111)(0.05,0.0833)(0.1,0.267)(0.2,0.672)(0.3,1.027)(0.5, 3.2)(0.6, 8.1)(0.7,3.2)(0.8, 0)(0.9,0)     };   \end{axis} \end{tikzpicture}
111259
I have two questions concerning pgfplotstable and number formatting with pgf. Consider the following piece of code:  \documentclass{article} \usepackage{pgfplotstable} \usepackage{amsmath}  \begin{document} \pgfplotstableread{ A     B        C 1.1   12       1300000 21.1  200000   214300000 }\mytable \pgfplotstabletypeset[columns={A, B, C},   columns/A/.style={postproc cell content/.append style={     /pgfplots/table/@cell content/.add={}{ s}}, fixed zerofill, precision=1   },   columns/C/.style={postproc cell content/.append style={     /pgfplots/table/@cell content/.add={}{ s${}^{-1}$}}, fixed zerofill, precision=1   }  ]\mytable  \end{document}   I would like to:   align the content of the column A at the decimal separator (obviously I've tried dec sep align but the it messes up with the postproc cell content (it adds the " s" before the dec sep "." - e.g. : 21 s.1 s), other than that it aligns fine, print the number using engineering notation (the powers of ten must be multiples of three) for the column B - e.g. : $200\:\cdot\:10^{3}$ instead of $2\:\cdot\:10^{5}$) do all these for the column C: append content, print using engineering notation, align on the \cdot of the engineering notation (like sci sep align)   Do you know some way(s) to achieve any of those goals ?  EDIT Thanks to Jake's answer, I've got almost what I want, however I have one last problem with siunitx. The following piece of code compiles (note the alias to make it compile, otherwise siunitx fails..)  \documentclass{article} \usepackage{pgfplotstable} \usepackage{siunitx} \usepackage{booktabs}  \begin{document} \pgfplotstableset{   alias/as/.initial=d, } \pgfplotstableread{ d 7000000 }\loadedtable \pgfplotstabletypeset[columns={as},   columns/as/.style={     column name={$2 \times 3d$},   } ]\loadedtable \end{document}   This next piece doesn't:  \documentclass{article} \usepackage{pgfplotstable} \usepackage{siunitx} \usepackage{booktabs}  \begin{document} \pgfplotstableset{   alias/as/.initial=d, } \pgfplotstableread{ d 7000000 }\loadedtable \pgfplotstabletypeset[columns={as},   columns/as/.style={     column name={$2 \times 3d$},     column type={S[round-mode=places, round-precision=1, scientific-notation=engineering, table-format=5.1e1, exponent-product = \cdot]},     string type   } ]\loadedtable \end{document}   How to avoid siunitx parse the headers ? (that would also, I guess, make it possible to use column identifiers with the letters 'e' and 'd')
7670
The unique style of the diagrams at  has an informative but nice hand-drawn touch. I guess they are actually drawn by hand but just recently on our partner site for Mathematica someone asked how to draw a similar diagram such as this one with Mathematica's plot functions ().    Now without Mathematica this should be possible as well but I have a hard time getting the details right. Can such a diagram be created in TeX with a similar design? My first attempt does not look particularly great but here it is (the font is from ):      \documentclass{standalone}     \usepackage{tikz,color}     \usepackage{pgfplots}     \usepackage{fontspec}     \setmainfont{Humor-Sans}      \begin{document}     \begin{tikzpicture}     \pgfplotsset{every axis/.append style={line width=1pt}}      \begin{axis}[%         axis x line=bottom,         axis y line=left,         xtick={1.2, 2.9, 4.5},         xticklabels={-3 days, -1 day, 5 minutes},         yticklabels={}     ]     % 1st plot     \addplot [cyan!80!white, samples=200, domain=0:6] {0.05*rnd+3+(sin(deg(x))^2)/sqrt(x)*exp(-(x-2))};     % white background for 2nd plot     \addplot [white, samples=200, domain=0:6,line width=4pt] {0.05*rnd+0.4*x+2+x^2*sin(deg(x))^2*exp(-x)};      % 2nd plot     \addplot [red!80!white, samples=200, domain=0:6] {0.05*rnd+0.4*x+2+x^2*sin(deg(x))^2*exp(-x)};      \end{axis}       \node at (2.7,4.6) {downhill};     \draw  plot[smooth, tension=.7,line width=2pt] coordinates {(1.2679,5.5206) (1.9454,5.493) (2.4017,4.9261)};      \end{tikzpicture}      \end{document}
6831
Tufte advocates to "minimize the ink-to-data ratio" for charts. I am trying to style a multi data series bar chart, that can have a grid and axes as shown below (chart at the left is from the Economist and on the right my attempt).      Here is the code:  \documentclass[justified]{tufte-book} \usepackage{pgfplots,lipsum} \pgfplotsset{compat=newest} \begin{document} \section{Bar Charts}  \lipsum[1-2]\vfill   \begin{figure*}[htbp]   \fbox{  \begin{tikzpicture}   \centering   \begin{axis}[         ybar,           title={Cumulative Progress of Works},         height=8cm,         width=15.5cm,         bar width=0.4cm,         ymajorgrids, tick align=inside,         enlarge  y limits={value=.2,auto}, % see the upper          ymin=0,         ymax=100,         axis x line=bottom,          axis y line=right,         %enlarge x limits =e,         legend style={at={(0.5,-0.2)},         anchor=north,legend columns=-1},         ylabel={Percentage (\%)},         symbolic x coords={            Sep-11,Oct-11,Nov-11,Dec-11,            Jan-12,Feb-12,            Mar-12,           Apr-12},        xtick=data,        nodes near coords,        every node near coord/.append style={         anchor=mid west,         rotate=70       }     ]     \addplot coordinates {       (Sep-11,75.4064)       (Oct-11, 72.7961)        (Nov-11,94.4597)       (Dec-11,66.6786)        (Jan-12,67.5600)        (Feb-12,88.2339)       (Mar-12,78.6138)        (Apr-12,58.9129) };    \addplot coordinates {       (Sep-11,75.4064)       (Oct-11, 89.7961)        (Nov-11,94.4597)       (Dec-11,76.6786)        (Jan-12,77.5600)        (Feb-12,78.2339)       (Mar-12,88.6138)        (Apr-12,78.9129) };    \addplot coordinates {       (Sep-11,75.4064)       (Oct-11, 89.7961)        (Nov-11,94.4597)       (Dec-11,76.6786)        (Jan-12,77.5600)        (Feb-12,78.2339)       (Mar-12,88.6138)        (Apr-12,78.9129) };      \legend{First Fix,Second Fix,Third Fix}   \end{axis}   \end{tikzpicture} }  \caption{\protect\raggedright Cumulative progress for all MEP works. Notice the slower rate of production during the last three months.} \end{figure*}  \lipsum[1-3] \end{document}   I have moved the y-axis to the right, but cannot get rid of the axis line. The plot is also not fitting within the plot width, despite using \enlarge.   Edit  And thanks to Jake the ugly duckling has been transformed to the following, with minor variations to the code as suggested by Jake. I have only added a stronger color for one of the bars in order to highlight it:
44109
I am drawing some graphs with tangents. I calculated the tangent should be centered at x=57/27 which is approximately x=2.11. I'm currently using the pos and sloped keys for nodes to draw tangents, but I'm not happy about the result; the tangents don't really align.   I think this is because the pos key calculates the actual length of the graph while the graphs don't have the same length.  I'm sure I can somehow let LaTeX do the calculations for me so as to align the slopes vertically at an x value of my choice. But how?  PS: The below document requires a working installation of gnuplot to compile.    \documentclass{standalone}   \usepackage{pgfplots} \pgfplotsset{compat=1.10} \usetikzlibrary{arrows, decorations.markings,intersections}  \makeatletter \tikzset{     nomorepostaction/.code=\makeatletter\let\tikz@postactions\pgfutil@empty,      my axis/.style={         postaction={             decoration={                 markings,                 mark=at position 1 with {                     \arrow[ultra thick]{latex}                 }             },             decorate,             nomorepostaction         },         thin,         -,         every path/.append style=my axis     } } \makeatother  \definecolor{headtitle}{RGB}{167,63,63}  \begin{document} \begin{tikzpicture}   \begin{axis}[%       axis line style={my axis},       xlabel = $U_A$,       ylabel = $S$,       xmin = 0, xmax = 3.25,       ymin = 0,       xtick={1,1.5},       xticklabels={$U_{B,\mathrm{initial}}$,$U_{A,\mathrm{initial}}$},       xticklabel style={             inner sep=0pt,             anchor=north east,             rotate=35         },       ytick=\empty,       height=.66\linewidth, width=\linewidth-4.5\tabcolsep,       axis lines*=left,       every axis y label/.style={at=(current axis.above origin),anchor=east},       every axis x label/.style={at=(current axis.right of origin),anchor=west}]%     \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%       set samples 51;       plot [0:3] log(3*(3-x)+1);       } node[sloped,above,pos=.63333,       minimum height=1cm,minimum width=1cm] (SB) {} node[pos=0.6,pin=45:{\color{black}{$S_B$}}] {};      \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%       set samples 51;       plot [0:3] log(9*x^2+6*x+1);       } node[sloped,above,pos=.83333,       minimum height=1cm,minimum width=1cm] (SA) {} node[pos=0.25,pin=-15:{\color{black}{$S_A$}}] {};       \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%       set samples 51;       plot [0:3] log(9*x^2+6*x+1)+log(3*(3-x)+1);       } node[sloped,above,pos=.775,       minimum height=1cm,minimum width=1cm] (St) {} node[pos=0.525,pin=165:{\color{black}{$S_\mathrm{total}$}}] {};      \path (SB.south east) edge[headtitle,very thick] node {} (SB.south west);      \path (SA.south east) edge[headtitle,very thick] node {} (SA.south west);      \path (St.south east) edge[headtitle,very thick] node {} (St.south west);   \end{axis}% \end{tikzpicture}% \end{document}
56358
When i use scale ticks in my plots i can't get those multiplicators to move anywhere. So basically i use plots like:   \documentclass[border=5mm]{standalone} \usepackage{pgfplots}  \begin{document}   \begin{tikzpicture}      \begin{axis}[scaled ticks=true]     \addplot coordinates { (20000,0.0005) (40000,0.0010) (60000,0.0020)};      \end{axis}   \end{tikzpicture}%  \end{document}   which gives:     So my Question is: How can i get this x tick scale label to move onto the right side of the right y-axis? So that it is above the x-axis?  (The mind behind this question is, that i sometimes have large x-labels, which then are very close to the scale label)