- Questo topic ha 9 risposte, 5 partecipanti ed è stato aggiornato l'ultima volta 10 anni, 11 mesi fa da .
-
Topic
-
Buongiorno,
spero che sia l’ultima domanda per finire questo articolo!! 🙁 🙁
Sullo stesso grafico devo mettere due linee che hanno scostamenti veramente minimi e soprattutto sono su due livelli diversi (l’asse delle y è in kg, uno si aggira intorno ai 40 kg, mentre l’altro intorno ai 50). E’ possibile dividere l’asse in due mettendo un segno di divisione tipo 38-42Kg, segno, 53-57Kg?
Il codice che uso ora è:
`\documentclass{standalone}\usepackage{pgfplots}
\pgfplotsset{/pgf/number format/use comma,compat=1.12}\usepackage{siunitx}
\DeclareSIUnit\chelsius{\degree C}\begin{document}
\begin{tikzpicture}
\begin{axis}[
xmin = 0,
xmax = 1440,
ymin = 38,
ymax = 55,
% width=19cm,
xtick={0,120,240,360,480,600,720,840,960,1080,1200,1320,1440},
xticklabels={0,2,4,6,8,10,12,14,16,18,20,22,24},
xlabel=Time (hour),
ylabel=Load (\si{\kilo\gram}),
%grid=major,
xtick scale label code/.code={},
%hide x axis,
%axis y line*=right,
legend pos=south east,
]
% \addplot [red, thick,mark=*,mark repeat=100] file [x=num,y=AccTwo]
\addplot [green,thick] table [x=Num, y=Load1]
{day197.csv};
\addplot [red, thick] table [x=Num, y=Load2]
{day197.csv};
% \addplot [green, thick] file [x=Num, y=H2]
% {load.csv};
% \legend{Hive 1}
\legend{Wooden Hive, Plastic Hive}
\end{axis}
\end{tikzpicture}\end{document}`
ed ottengo
[attachment=1423]day197-load.pdf[/attachment]Grazie
Marco
- Devi essere connesso per rispondere a questo topic.