因此,我尝试创建一个图,其中 y 轴在值 2 以上每厘米缩放 2,在值 2 以下每厘米缩放 0.4。换句话说,我想在某个区域拉伸图。我说的不仅仅是改变刻度,还要在该区域拉伸图。
类似于下面的内容,显然是标准的 pgfplots 风格。
我会给你我试图局部拉伸的图,我只想拉伸负 y 轴部分(因此图不会在那里拥抱 x 轴)。
\documentclass[11pt,
paper=a4,
footinclude,
oneside
]{scrbook}
\usepackage{xltxtra}
\usepackage{mathtools}
\usepackage[ngerman]{babel}
\usepackage{graphicx}
\usepackage{caption}
\usepackage[european]{circuitikz}
\usepackage{float}
\usepackage{pgfplots}
\usepackage{amssymb}
\usepackage{pst-all}
\usepackage{xcolor}
\usepackage{siunitx}
\begin{document}
\begin{figure}[H]
\begin{center}
\begin{tikzpicture}
\begin{axis}[
axis lines = middle,
ticks = none,
xlabel = ${U}$,
ylabel = ${I}$,
width = 11cm,
height = 8cm,
ylabel style={at=(rotate = -90},
every axis x label/.style={
at={(ticklabel* cs:1.0)},
anchor=west,
},
every axis y label/.style={
at={(ticklabel* cs:1.0)},
anchor=south,
},
xmin = -0.5,
xmax = 0.8,
ymin = -1,
%ymax = 2,
]
\addplot[
domain = -0.25:0.69,
samples = 100,
thick,
color = blue,
]
gnuplot{
0.00000000001 * (exp(x/(0.026)) - 1)
}
node[left, pos = 0.9]{$I_D$}
;
\addplot[
domain = -0.5:-0.3,
samples = 40,
thick,
color = blue,
]
gnuplot{
-0.000000001118 * exp(-41.005 * x)
}
;
\draw[color = blue]
(axis cs: -0.2,0.5)
node[]{$I_S(U < 0) \neq 0$}
;
\draw[thick, color = blue,]
(axis cs: -0.25,0.1)
--
(axis cs: -0.25,-0.1)
;
\draw[thick, color = blue,]
(axis cs: -0.3,0.1)
--
(axis cs: -0.3,-0.1)
;
%\draw[dashed]
%(axis cs: 0.6,0)
%(axis cs: 0.6,
\end{axis}
\end{tikzpicture}
\end{center}
\caption{}
\end{figure}
\end{document}
到目前为止我所发现的只是如何转换整个轴而不仅仅是部分轴。