0

I would like to shift the second right y-axis label to the right along with the ticks so it does not interfere with the first right y-axis label and ticks. Here is the code and its output:

    \begin{figure}[!ht]
    \centering
\begin{tikzpicture}
  \begin{axis}[
   ymin=0, ymax=2.75,
  xmin=20, xmax=41,
  grid,
  xtick={20,22,24,26,28,30,32,34,36,38,40},
  ytick={0,0.5,1,1.5,2,2.5},
  axis y line*=left, % the '*' avoids arrow heads
 xlabel={$t$ [s]},
 xlabel near ticks,
ylabel={$v_{fuente}$ [V]},
ylabel near ticks,
width=\textwidth, 
height=0.7\textwidth,   
    ]
\addplot[teal] table[x=t, y=v_DC,col sep=semicolon]{torque_de_desprendimiento.csv};

\end{axis}

\begin{axis}[ ymin=0, ymax=1.375, xmin=20, xmax=41, ytick={0,0.25,0.5,0.75,1,1.25}, hide x axis, axis y line*=right, ylabel={$i_a$ [A]}, ylabel near ticks, width=\textwidth, height=0.7\textwidth,
]

\addplot[orange] table[x=t, y=i_DC,col sep=semicolon]{torque_de_desprendimiento.csv};

\end{axis}

\begin{axis}[ ymin=0, ymax=137.5, xmin=20, xmax=41, ytick={0,25,50,75,100,125}, hide x axis, axis y line*=right, ylabel={$\theta _m$ [grados]}, ylabel near ticks, width=\textwidth, height=0.7\textwidth,
]

\addplot[ultra thick,violet!17] table[x=t, y=pos_DCPM,col sep=semicolon]{torque_de_desprendimiento.csv};

\end{axis}

\end{tikzpicture} \caption{Torque de fricción de la parte de la cadena de transmisión factible de ser rotada en los dos sentidos} \label{fig:torque_de_desprendimiento} \end{figure} \FloatBarrier

Output

If you find a better way to do this without the use of a third dimension, it is welcome.

Here is the data I used in my code:

.csv

Thanks in advance!

el_maxx
  • 163

0 Answers0