- Questo topic ha 3 risposte, 2 partecipanti ed è stato aggiornato l'ultima volta 5 anni, 10 mesi fa da .
-
Topic
-
Buongiorno, sto avendo molti problemi con grouplot.
Vorrei avere un grafico come in figura, dove l’asse delle ascisse è comune e varia da (19.0 a 19.2), mentre quello delle ordinate, pur restando sempre nello stesso intervallo (0.651 0.6535) sia diverso per le 5 curve da plottare.[attachment=2539]plots.jpg[/attachment]
i file di dati .txt sono in allegato.
Finora sono semplicemente riuscito a scriverli in maniera distinta come sotto:
`\documentclass[a4paper,12pt]{book}
%\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,italian]{babel}
\usepackage{url,amsfonts,epsfig}
\usepackage{amsmath}
\usepackage{caption}
\usepackage{subcaption}\usepackage{matlab-prettifier}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\footrulewidth}{0.5pt}
\fancyhead[]{}
\fancyhead[LO]{\nouppercase{\rightmark}}
\fancyhead[RE]{\nouppercase{\leftmark}}
\fancyfoot{}
\fancyfoot[LO,RE]{\thepage}\renewcommand{\sectionmark}[1]{\markright{#1}}
\parindent 0ex\usepackage{tikz}
\usepgflibrary{arrows.meta}
\usetikzlibrary{calc,quotes,angles}
\usepackage{pgfplots}
\usetikzlibrary{calc}\begin{document}
\begin{figure}[h]
\centering
\begin{tikzpicture}[yscale=0.6]
\begin{axis}[name=plot,
xmin=19, xmax=19.2, xlabel={$$}, ylabel={$Ampiezza$},
ymin=0.651,ymax=0.6535,width=1\textwidth]
\addplot[black,mark=.] table{20Hz.txt};
\end{axis}
\end{tikzpicture}
\caption{\textit{Oscillazioni a 20Hz}}
\label{fig:20Hz}
\end{figure}\begin{figure}[h]
\centering
\begin{tikzpicture}[yscale=0.6]
\begin{axis}[name=plot,
xmin=19, xmax=19.2, xlabel={$$}, ylabel={$Ampiezza$},
ymin=0.651,ymax=0.6535,width=1\textwidth]
\addplot[black,mark=.] table{30Hz.txt};
\end{axis}
\end{tikzpicture}
\caption{\textit{Oscillazioni a 30Hz}}
\label{fig:30Hz}
\end{figure}\begin{figure}[h]
\centering
\begin{tikzpicture}[yscale=0.6]
\begin{axis}[name=plot,
xmin=19, xmax=19.2, xlabel={$$}, ylabel={$Ampiezza$},
ymin=0.651,ymax=0.6535,width=1\textwidth]
\addplot[black,mark=.] table{40Hz.txt};
\end{axis}
\end{tikzpicture}
\caption{\textit{Oscillazioni a 40Hz}}
\label{fig:40Hz}
\end{figure}\begin{figure}[h]
\centering
\begin{tikzpicture}[yscale=0.6]
\begin{axis}[name=plot,
xmin=19, xmax=19.2, xlabel={$$}, ylabel={$Ampiezza$},
ymin=0.651,ymax=0.6535,width=1\textwidth]
\addplot[black,mark=.] table{50Hz.txt};
\end{axis}
\end{tikzpicture}
\caption{\textit{Oscillazioni a 50Hz}}
\label{fig:50Hz}
\end{figure}\end{document}`
ringrazio chiunque mi aiuti, non ne riesco a venire a capo, eppure dovrebbe essere una cosa semplice:
- Devi essere connesso per rispondere a questo topic.