Feste Achsenskalierung Log-Achse

Tabellen und Grafiken erstellen und anordnen


Zaladon
Forum-Newbie
Forum-Newbie
Beiträge: 8
Registriert: Di 7. Nov 2017, 10:57

Feste Achsenskalierung Log-Achse

Beitrag von Zaladon »

Moin Moin ich möchte die beiden Diagramme mit einer fest Skalierung ausführen und die Hilfslinien sollen in beiden Diagrammen logarithmisch dargestellt werden.

Danke für die Mühen...
\documentclass[11pt, a4paper, bibliography=totocnumbered, listof=nochaptergap]{scrreprt}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{figure}
	\begin{tikzpicture}
	\begin{axis}
		[
		height=8cm,
		width=14cm,
		ybar,
		symbolic x coords={octenisept,octeniderm,octenisan,S\&M Waschlotion,octenidol,kodan farblos},
		xtick={octenisept,octeniderm,octenisan,S\&M Waschlotion,octenidol,kodan farblos},
		x tick label style={rotate=45,anchor=east},
		ymode=log,		
		log origin=infty,
		minor tick num=1,
		minor tick length=0,
		grid=both,
		xlabel={Produktname},
		ylabel={Fehlerquote in \%},
		]		
		\addplot +[fill=red] coordinates 
		{(octenisept,7.71)(octeniderm,45.106)(octenisan,2.089)(S\&M Waschlotion,1.878)(octenidol,26.089)(kodan 					farblos,48.045)};
		\addplot +[fill=yellow] coordinates 	
		{(octenisept,0.361)(octeniderm,62.872)(octenisan,2.15)(S\&M Waschlotion,2.645)(octenidol,27.556)(kodan 					farblos,47.473)};
		\addplot +[fill=green] coordinates 
		{(octenisept,0.058)(octeniderm,58.667)(octenisan,0.334)(S\&M Waschlotion,0.034)(octenidol,13.723)(kodan 				farblos,56.239)};
		\end{axis}
		\end{tikzpicture}
\caption{Genauigkeit bestehendes Messsystem Kabinett 3 Teil 1}
\end{figure}
\begin{figure}
	\begin{tikzpicture}
	\begin{axis}
		[
		height=8cm,
		width=14cm,
		ybar,
		symbolic x coords={kodan gefärbt,mikrozid,desderman pure,desderman pure gel,esemtan aktiv gel,Sagrotan MED},
		xtick={kodan gefärbt,mikrozid,desderman pure,desderman pure gel,esemtan aktiv gel,Sagrotan MED},
		x tick label style={rotate=45,anchor=east},
		ymode=log,		
		log origin=infty,
		minor tick num=1,
		minor tick length=0,
		grid=both,
		xlabel={Produktname},
		ylabel={Fehlerquote in \%},
		]		
		\addplot +[fill=red] coordinates 
		{(kodan gefärbt,27.35)(mikrozid,45.795)(desderman pure,66.256)(desderman pure gel,27.039)(esemtan aktiv gel,			11.778)(Sagrotan MED,50.961)};
		\addplot +[fill=yellow] coordinates 	
		{(kodan gefärbt,24.461)(mikrozid,41.723)(desderman pure,56.917)(desderman pure gel,22.85)(esemtan aktiv gel,			14.133)(Sagrotan MED,55.911)};
		\addplot +[fill=green] coordinates 
		{(kodan gefärbt,23.561)(mikrozid,43.428)(desderman pure,69.228)(desderman pure gel,17.712)(esemtan aktiv gel,			20.706)(Sagrotan MED,44.933)};
		\end{axis}
		\end{tikzpicture}
\caption{Genauigkeit bestehendes Messsystem Kabinett 3 Teil 2}
\end{figure}
\end{document}

Rolli
Forum-Guru
Forum-Guru
Beiträge: 382
Registriert: Mi 15. Feb 2017, 08:50
Wohnort: Mittelfranken

Beitrag von Rolli »

Hallo Zaladon,

Verzeihung ... so ganz verstehe ich Deine Frage nicht.

Wenn Du möchtest, dass die Ordinaten in beiden Bildern gleich skaliert werden, dann musst Du in beide Bilder in der axis-Präambel rein schreiben:
ymin=1e-2,
ymax=1e2,
Allerdings hast Du dann am zweiten Bild keine richtige Freude mehr ...

Und wie man das logarithmisch hin bekommt, kannst Du doch (siehe erstes Bild).

Gruß vom Rolli

Zaladon
Forum-Newbie
Forum-Newbie
Beiträge: 8
Registriert: Di 7. Nov 2017, 10:57

Beitrag von Zaladon »

Ja es geht darum das ich die Diagramme nebeneinander legen kann und diese auf einen Blick einschätzen kann, leider funktioniert das nicht er gibt mir einen Fehler aus das diese Funktion unbekannt ist.

Die Hilfslinien tauchen nur im 1. Diagramm auf im zweiten nicht. Ob wohl ich das einfach kopiert habe.

Rolli
Forum-Guru
Forum-Guru
Beiträge: 382
Registriert: Mi 15. Feb 2017, 08:50
Wohnort: Mittelfranken

Beitrag von Rolli »

Also so ganz verstehe ich Dein Problem immer noch nicht. Bei mir compiliert es ohne Fehler und macht auch beide Ordinatenskalierungen logarithmisch.
Gruß vom Rolli
\documentclass[DIV=20,11pt, a4paper, bibliography=totocnumbered, listof=nochaptergap]{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{capt-of}

\usepackage{lscape}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{landscape}
\begin{minipage}{0.7\textwidth}
   \begin{tikzpicture}[scale=0.88, every node/.style={scale=0.88}]
   \begin{axis}
      [
      height=8cm,
      width=14cm,
      ymin=10e-2,
      ymax=10e1,
      ybar,
      symbolic x coords={octenisept,octeniderm,octenisan,S\&M Waschlotion,octenidol,kodan farblos},
      xtick={octenisept,octeniderm,octenisan,S\&M Waschlotion,octenidol,kodan farblos},
      x tick label style={rotate=45,anchor=east},
      ymode=log,      
      log origin=infty,
      minor tick num=1,
      minor tick length=0,
      grid=both,
      xlabel={Produktname},
      ylabel={Fehlerquote in \%},
      ]      
      \addplot +[fill=red] coordinates
      {(octenisept,7.71)(octeniderm,45.106)(octenisan,2.089)(S\&M Waschlotion,1.878)(octenidol,26.089)(kodan farblos,48.045)};
      \addplot +[fill=yellow] coordinates    
      {(octenisept,0.361)(octeniderm,62.872)(octenisan,2.15)(S\&M Waschlotion,2.645)(octenidol,27.556)(kodan farblos,47.473)};
      \addplot +[fill=green] coordinates
      {(octenisept,0.058)(octeniderm,58.667)(octenisan,0.334)(S\&M Waschlotion,0.034)(octenidol,13.723)(kodan farblos,56.239)};
      \end{axis}
      \end{tikzpicture}
\captionof{figure}{Genauigkeit bestehendes Messsystem Kabinett 3 Teil 1}
\end{minipage}
\begin{minipage}{0.7\textwidth}
   \begin{tikzpicture}[scale=0.88, every node/.style={scale=0.88}]
   \begin{axis}
      [
      height=8cm,
      width=14cm,
      ymin=10e-2,
      ymax=10e1,      
      ybar,
      symbolic x coords={kodan gefärbt,mikrozid,desderman pure,desderman pure gel,esemtan aktiv gel,Sagrotan MED},
      xtick={kodan gefärbt,mikrozid,desderman pure,desderman pure gel,esemtan aktiv gel,Sagrotan MED},
      x tick label style={rotate=45,anchor=east},
      ymode=log,      
      log origin=infty,
      minor tick num=1,
      minor tick length=0,
      grid=both,
      xlabel={Produktname},
      ylabel={Fehlerquote in \%},
      ]      
      \addplot +[fill=red] coordinates
      {(kodan gefärbt,27.35)(mikrozid,45.795)(desderman pure,66.256)(desderman pure gel,27.039)(esemtan aktiv gel,         11.778)(Sagrotan MED,50.961)};
      \addplot +[fill=yellow] coordinates    
      {(kodan gefärbt,24.461)(mikrozid,41.723)(desderman pure,56.917)(desderman pure gel,22.85)(esemtan aktiv gel,         14.133)(Sagrotan MED,55.911)};
      \addplot +[fill=green] coordinates
      {(kodan gefärbt,23.561)(mikrozid,43.428)(desderman pure,69.228)(desderman pure gel,17.712)(esemtan aktiv gel,         20.706)(Sagrotan MED,44.933)};
      \end{axis}
      \end{tikzpicture}
\captionof{figure}{Genauigkeit bestehendes Messsystem Kabinett 3 Teil 2}
\end{minipage}
\end{landscape}
\end{document}

Zaladon
Forum-Newbie
Forum-Newbie
Beiträge: 8
Registriert: Di 7. Nov 2017, 10:57

Beitrag von Zaladon »

Ja musst Du auch nicht, das Problem lag zwischen meinen Ohren!!!

habe nicht 1e gelesen sondern le so kann das auch nicht funktionieren^^

Vielen Dank für die geduldige Unterstützung :)

Antworten