PGFPLOTS-Achsen Stellenweise vergrössern

Antwort erstellen


Diese Frage dient dazu, das automatisierte Versenden von Formularen durch Spam-Bots zu verhindern.
Smilies
:D :) :( :o :shock: :? 8) :lol: :-x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:

BBCode ist eingeschaltet
[img] ist eingeschaltet
[flash] ist ausgeschaltet
[url] ist eingeschaltet
Smilies sind eingeschaltet

Die letzten Beiträge des Themas

Ich habe die Datenschutzerklärung gelesen und bin damit einverstanden.

   

Wenn du eine Datei oder mehrere Dateien anhängen möchtest, gib die Details unten ein.

Ansicht erweitern Die letzten Beiträge des Themas: PGFPLOTS-Achsen Stellenweise vergrössern

von feuerfalke2005 » So 5. Jun 2016, 21:07

Danke
Genau was ich gesucht habe


Danke

von esdd » So 5. Jun 2016, 20:48

Du könntest einen groupplot verwenden, in dem unterhalb des ersten Plots ein vergrößerter Ausschnitt dargestellt wird.
\begin{filecontents*}{data.dat}
0 0 
5.09 -0.85    
7.50 -1.66    
9.90 -2.19    
12.30 -2.85   
8.46 -2.84    
3.84 -2.67    
6.15 -2.74    
9.61 -2.84    
13.07 -3.20   
16.53 -4.79   
21.14 -6.48   
%26.91 -8.26   
%38.44 -14.28   
%57.66 -22.34  
%79.19 -32.18  
%0 0.384 
%0 -20  
\end{filecontents*}


\documentclass[margin=5mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}% newest für Online-Editor, sonst derzeit 1.13
\usepackage{pgfplotstable}
\usepgfplotslibrary{groupplots}
\begin{document}
\begin{tikzpicture}
 \begin{groupplot}[
     group style = {
      group size = 1 by 2,
      xlabels at= edge top
     },
     width = 12cm,
     scale only axis, 
     xmin=0, 
     xmax=20, 
     xlabel={Kraft [kN]}, 
     ylabel={Setzungen $\Delta$h2 [mm]}, 
     axis x line*=top, %bottom, %top, 
     axis y line*=left,
     every axis plot/.append style={
      line width=1.5pt,
      mark size=2pt,
      mark=ball,
      mark options=solid,
      forget plot
     }
    ]
    \nextgroupplot[height=4cm,ymin=-6,ymax=0]
      \addplot [color= blue] table{data.dat};
      \draw[orange,dashed,thick](0,-4)rectangle(20,-2);
      \coordinate(s)at(10,-4);
      
    \nextgroupplot[height=6cm,ymin=-3.2,ymax=-2.5]
      \addplot [color= blue] table{data.dat};
  \end{groupplot}
  
  \draw[very thick, orange, ->, shorten >=2pt+\baselineskip, shorten <=2pt] (s)
  -- (group c1r2.north);
\end{tikzpicture}
\end{document}
Bild
Dateianhänge
gl_ausschnitt.png
gl_ausschnitt.png (19.7 KiB) 1125 mal betrachtet

PGFPLOTS-Achsen Stellenweise vergrössern

von feuerfalke2005 » Sa 4. Jun 2016, 21:41

Hallo liebe Forenmitglieder.

Könnte mir von euch jemand sagen wie ich einen Achsen Abschnittsweise vergrössern war.
Ich würde gerne einen Graphen darstellen der zwischen den Zahlen -2 und -3 eine Grössere Auflösung darstellen.
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\pgfplotsset{compat=1.13}
\usetikzlibrary{decorations.pathreplacing}

\begin{document}

\begin{figure}
\begin{tikzpicture}
\begin{axis}[
width=12cm,
height=4cm,
scale only axis,
xmin=0,
xmax=20,
xlabel={Kraft [kN]},
ymin=-6,
ymax=0,
ylabel={Setzungen $\Delta$h2 [mm]},
axis x line*=top, %bottom, %top,
axis y line*=left
]
\addplot [
color= blue,
line width=1.5pt,
mark size=2.0pt,
%only marks,
mark=ball,
mark options={solid},
forget plot
]
table[row sep=crcr]{
	0 0\\
	5.09 -0.85   \\
	7.50 -1.66   \\
	9.90 -2.19   \\
	12.30 -2.85  \\
	8.46 -2.84   \\
	3.84 -2.67   \\
	6.15 -2.74   \\
	9.61 -2.84   \\
	13.07 -3.20  \\
	16.53 -4.79  \\ 
	21.14 -6.48  \\
%	26.91 -8.26  \\
%	38.44 -14.28 \\ 
%	57.66 -22.34 \\
%	79.19 -32.18 \\
%	0 0.384\\
%	0 -20\\ 
};
\draw [very thick,red](0.384,0) -- (0.384,-6);
\end{axis}
\end{tikzpicture}\vspace{-2ex}
\caption{Kraftsetzungs Diagramm}
\label{KraftSetzDia}
\end{figure}
\end{document}
Bild

Danke für Eure Hilfe
Bin in der Letzten zeit viel im Forum und lese mir viel hilfreich ding durch
Ich danke euch allen sehr für eure unterstützung
Dateianhänge
Druckdarstellung.jpg
Druckdarstellung.jpg (43.58 KiB) 1130 mal betrachtet

Nach oben