Liste der Anhänge anzeigen (Anzahl: 1)
Unterbrochene Y Achse
Hallo zusammen,
ich bin neu hier und hoffe mein Problem so zu Stellen das es verständlich ist.
Ich würde gerne die Y Achse eines Plots unterbrechen um sowohl einige hohe Werte als auch einige niedrige Werte hoch aufgelöst darstellen zu können. Hier wie der es bis jetzt aussieht:
Code:
\documentclass[12pt,a4paper]{article}
\usepackage{pgfplots}
\usepackage{tikz}
\usepackage[ngerman]{babel}
\begin{document}
\begin{figure} [H]
\centering
\begin{tikzpicture}
\begin{axis}[
xlabel= xlabel,
ylabel= ylabel,
width=\textwidth,
height=8cm,
xmin=25,
]
\addplot plot coordinates {
(25,27.568)
(30,27.464)
(40,27.264)
(50,27.083)
(55,26.989)
(60,26.909)
(70,26.736)
(80,26.577)
(85,26.499)};
\addplot plot coordinates {
(25,3.2246)
(55,3.1092)
(85,3.0165)};
\end{axis}
\end{tikzpicture}
\end{figure}
\end{document}
und hier wie es aussehen sollte (Paint):
Anhang 6129
Ich habe schon mal Google bemüht weiß aber nicht recht wie man diese "Unterbrechung" bezeichnet. Auf Englisch heißt es wohl break bzw. broken aber die wenigen Lösungen waren ein schlimmes gefrickel mit manuellen Ticks ....
Liste der Anhänge anzeigen (Anzahl: 1)
Die Pfeile an den x-Achsen bekommst Du weg, wenn Du axis x line* verwendest, also den Stern ergänzt. Die vielen Leerzeichen vor dem y Label verursachen auch den Leerraum unter der Zeichnung. Füge das y-Label einfach erst nach den Plots ein. Zum Ausrichten kannst Du innerhalb der Groupplots Koordinaten setzen. Die einzelnen Plots kannst Du mit \label speichern und hinterher die Legende von Hand einfügen.
Code:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{pgfplots}
\pgfplotsset{compat=1.9}
\usetikzlibrary{
pgfplots.groupplots,
matrix
}
\usepackage{siunitx}
\begin{document}
\begin{figure}[htb]
\centering
\begin{tikzpicture}
\begin{groupplot}[
group style={
group size=1 by 2,
xticklabels at=edge bottom,
vertical sep=0pt
},
legend cell align=left,
legend pos=north east,
width=0.9\textwidth,
height = 4cm,
xmin=24, xmax= 86,
extra x ticks={25,85},
]
\nextgroupplot[
ymin=25.8, ymax=27.7,
ytick={26.5,27,27.5},
axis x line*=top,
height = 4.5cm,
axis y discontinuity=crunch,
]
\addplot[blue,mark=*] plot coordinates {
(25,27.568)
(30,27.464)
(40,27.264)
(50,27.083)
(55,26.989)
(60,26.909)
(70,26.736)
(80,26.577)
(85,26.499)};\label{plots:plot1}
\coordinate (top) at (rel axis cs:0,1);
\nextgroupplot[
ymin=2.98,ymax=3.24,
axis x line*=bottom,
xlabel=Temperatur in \si{\degree}C,
height = 4cm,
]
\addplot[red,mark=triangle*,dashed] plot coordinates {
(25,3.2246)
(55,3.1092)
(85,3.0165)};\label{plots:plot2}
\coordinate (bot) at (rel axis cs:1,0);
\end{groupplot}
% y Label
\path (top-|current bounding box.west)--
node[anchor=south,rotate=90] {Vorwärtsspannung in V}
(bot-|current bounding box.west);
% Legende
\path (top|-current bounding box.north)--
coordinate(legendpos)
(bot|-current bounding box.north);
\matrix[
matrix of nodes,
anchor=south,
draw,
inner sep=0.2em,
draw
]at([yshift=1ex]legendpos)
{
\ref{plots:plot1}& Amber, Weiß&[5pt]
\ref{plots:plot2}& Weiß
\\};
\end{tikzpicture}
\label{polt:Auswertung_1_1_Amber}
\caption{Vorwärtsspannung zweier LED's in Abhängigkeit der Temperatur an dessen Rückseite.}
\end{figure}
\end{document}
http://www.mrunix.de/forums/attachme...0&d=1432149699
Gruß
Elke