Seite 1 von 1

TiKz darstellung mit halblogaritmischen Teilung

Verfasst: Do 30. Jun 2016, 12:24
von feuerfalke2005
Hallo Forum
Ich muss noch mal an euch ein Frage stellen Bezügel Diagramme mit Tikz

ich brauche hier zu eine Halblogaritmische teilung.
X Achse Logaritmisch 10er
y Achse normal dezimal teilung
Wäre net wenn mir hier zu jemand eine Lösung sagen kann wie ich das eingeben muss damit x Achse Logaritmisch geteilt wird.
Danke
\begin{filecontents*}{DSF1.dat}
%X      Y
0       0.00	
10      -0.01	
20	-0.048	
50	-0.078
100	-0.158	
150	-0.178	
200	-0.202	
\end{filecontents*}

\begin{filecontents*}{DSF2.dat}
%X      Y
200	-0.202
150	-0.196  
100	-0.130	
\end{filecontents*}

\begin{filecontents*}{DSF3.dat}
%X      Y
100	-0.130
150	-0.244	
300	-0.400	
\end{filecontents*}

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{mathrsfs}
\usepackage{rotating}
\usepackage{pgfplots}              % Grafikprogramm
\usepackage{pgfplotstable}
%\pgfplotsset{compat=1.13}
\usepgfplotslibrary{groupplots}

\begin{document}
	\begin{figure}		\begin{tikzpicture}%[decoration=brase]
		\begin{axis}[
		width=14cm,
		height=10cm,
		scale only axis,
		xtick={0,25,...,310},
		xmin=0,
		xmax=310,% <- 325 ist seeehr viel zu groß
		xlabel={Normalspannung $\sigma$ in [$\frac{kN}{m^2}$]},
		ytick={0,-0.01,...,-0.40},
		ymin=-0.4,
		ymax=0,%2.5,% <- 2.5 ist seeehr viel zu klein
		ylabel={Setzun s' mm},
		axis x line*=top, %bottom, %top,
		axis y line*=left,
		grid=major,
		every axis plot/.append style={
			line width=1.5pt,
			mark size=1pt,
			mark=ball,
			%forget plot,
		},
		]
		\addplot [red] table[restrict expr to domain={\thisrowno{0}}{0:200}]    {DSF1.dat};
		\addlegendentry{Ersbelastung}
		\addplot [orange] table[restrict expr to domain={\thisrowno{0}}{100:200}]{DSF2.dat};
		\addlegendentry{Entlastung}
		\addplot [blue] table[restrict expr to domain={\thisrowno{0}}{100:300}] {DSF3.dat};
		\addlegendentry{Wiederbelastung}
		%\legend{Erstbelastung, Entlastung, Widerbelastung};
		\end{axis}
		\end{tikzpicture}
		\caption{Normal-Scherspannungs - Diagramm}
		\label{NSF}
	\end{figure}
\end{document}

Verfasst: Do 30. Jun 2016, 14:09
von Bartman
Suchst Du den Abschnitt 4.2 der Dokumentation von pgfplots?

Verfasst: Do 30. Jun 2016, 16:08
von feuerfalke2005
Danke für die schnelle Antwort hilft soweit gut weiter
habe nur ein Problem ich muss meine Ausarbeitung morgen abgeben und
bräuchte Praktische Beispiele
am Besten auf Log(10) und Ln = Log(e)

Bitte könnte mir Jemand da weiter Helfen wie ich die Einteilung der XAchse besser gestallten kann.

Danke

Hier noch ein Minimal Beispiel für ein Diagramm was ich gerne erstellen will mit LN Teilung.
\begin{filecontents*}{ZS.dat}
%X      Y
0      5.761
0.52   6.250
1.05   6.294
2.12   6.314
4.25   6.327
8.52   6.338
17.1   6.350
40     6.362
60     6.368
120    6.379
240    6.389
480    6.399
1200   6.412
1260   6.413
1320   6.414
1380   6.415
1440   6.415
\end{filecontents*}

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{mathrsfs}
\usepackage{rotating}
\usepackage{pgfplots}              % Grafikprogramm
\usepackage{pgfplotstable}
%\pgfplotsset{compat=1.13}
\usepgfplotslibrary{groupplots}

\begin{document}
   \begin{figure}      \begin{tikzpicture}%[decoration=brase]
      \begin{semilogxaxis}[
      	width=12cm,
		height=6cm,
		%scale only axis,
		xmode=log,
		ymode=normal,
		xmin=0,
		xmax=1440, 
		xlabel={Zeit in Sekunden [s] },
		ymin= 6.0,
		ymax= 6.5,%2.5,% <- 2.5 ist seeehr viel zu klein
		ylabel={Setzung s' in mm},
		axis x line*=bottom, %top,
		axis y line*=left,
		grid=major,
		every axis plot/.append style={
			line width=1.5pt,
			mark size=1pt,
			mark=ball,
			%forget plot,
		},
		]
\addplot [red] table[restrict expr to domain={\thisrowno{0}}{0:1440}]    {ZS.dat};
		\end{semilogxaxis}
		\end{tikzpicture}
		\caption{Zeit - Setzungs - Diagramm}
		\label{Zeit setzung}
	\end{figure}
\end{document}