von neuLing2024 » Di 13. Feb 2024, 16:32
Hallo!
Ich habe bei angehängtem Beispiel das Problem, dass die Labels auf meiner y-Achse nicht korrekt angezeigt werden. Alle aufgeführten Labels (2000, 20000,usw) will ich im Format 2*10^3, 2*10^4 etc haben. Mit den angezeigten Werten wie "10^3.3"(=2000) kann ich leider nichts anfangen. Ich bin mir ziemlich sicher, dass das Problem an "ymode = log" liegt, weiß aber nicht zu helfen.
Wie es bei mir momentan angezeigt wird:
Beispiel:
\documentclass{article}
\usepackage{graphicx}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepackage{tikz}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}
\begin{axis}[width=\textwidth,height=0.4\textheight,
xmajorgrids,
xmode = log,
ymode = log,
%loglogaxis,
%log ticks with fixed point,
x tick label style={/pgf/number format/.cd,sci,precision=2},
y tick label style={/pgf/number format/.cd,sci,precision=2},
xlabel near ticks,
ylabel near ticks,
xlabel = {Beschriftung x},
ylabel = {Beschriftung y},
xmin=10, xmax=100000,
ymin=1000, ymax=2000000,
ytick={2000, 20000, 100000, 700000, 1000000, 1600000},
]
% Daten
\addplot+ [mark=none, color=teal] coordinates{(100,1000000) (1000,1000000)};
\addplot+ [mark=none, color=teal] coordinates{(100,100000) (1000,100000)};
\addplot+ [mark=none, color=teal] coordinates{(100,100000) (100,1000000)};
\addplot+ [mark=none, color=teal] coordinates{(1000,100000) (1000,1000000)};
\node at (axis cs: 300,150000) {Beschreibung Daten};
\fill[color=teal, ultra nearly transparent](100,100000) rectangle (1000,1000000);
\end{axis}
\end{tikzpicture}
\caption{Bildunterschrift}\label{fig:test}
\end{figure}
\end{document}
Liebe Grüße
Hallo!
Ich habe bei angehängtem Beispiel das Problem, dass die Labels auf meiner y-Achse nicht korrekt angezeigt werden. Alle aufgeführten Labels (2000, 20000,usw) will ich im Format 2*10^3, 2*10^4 etc haben. Mit den angezeigten Werten wie "10^3.3"(=2000) kann ich leider nichts anfangen. Ich bin mir ziemlich sicher, dass das Problem an "ymode = log" liegt, weiß aber nicht zu helfen.
Wie es bei mir momentan angezeigt wird:
[attachment=1]test.png[/attachment]
Beispiel:
[code]\documentclass{article}
\usepackage{graphicx}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepackage{tikz}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}
\begin{axis}[width=\textwidth,height=0.4\textheight,
xmajorgrids,
xmode = log,
ymode = log,
%loglogaxis,
%log ticks with fixed point,
x tick label style={/pgf/number format/.cd,sci,precision=2},
y tick label style={/pgf/number format/.cd,sci,precision=2},
xlabel near ticks,
ylabel near ticks,
xlabel = {Beschriftung x},
ylabel = {Beschriftung y},
xmin=10, xmax=100000,
ymin=1000, ymax=2000000,
ytick={2000, 20000, 100000, 700000, 1000000, 1600000},
]
% Daten
\addplot+ [mark=none, color=teal] coordinates{(100,1000000) (1000,1000000)};
\addplot+ [mark=none, color=teal] coordinates{(100,100000) (1000,100000)};
\addplot+ [mark=none, color=teal] coordinates{(100,100000) (100,1000000)};
\addplot+ [mark=none, color=teal] coordinates{(1000,100000) (1000,1000000)};
\node at (axis cs: 300,150000) {Beschreibung Daten};
\fill[color=teal, ultra nearly transparent](100,100000) rectangle (1000,1000000);
\end{axis}
\end{tikzpicture}
\caption{Bildunterschrift}\label{fig:test}
\end{figure}
\end{document}
[/code]
[attachment=0]test_code.txt[/attachment]
Liebe Grüße