von Stefan Kottwitz » So 11. Aug 2024, 09:50
Du kannst Plots Namen geben, zur Achse hin füllen, und mit soft clip durch einen Bereich beschränken, hier mit einem Rechteck:
\path[name path=axis] (0.0001,0.1) -- (0.1,0.1);
\addplot[color=blue!20] fill between[of=data1 and axis,
soft clip = { (0.00039,0.1) rectangle (0.1,10) }];
Vollständiger Code, nur vertikal bisschen zusammengezogen damit es im Forum einfacher zu lesen ist ohne viel Scrollen, daher auch die Daten zum Online-Compiler kopiert:
\documentclass{standalone}
\usepackage{siunitx}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepgfplotslibrary{fillbetween}
\begin{document}
\begin{tikzpicture}
\begin{axis}
[
width=13cm, % Breite des Diagramms
height=8cm, % Höhe des Diagramms
xmin=1e-4, xmax=1e-1, % Skalierung der x-Achse
ymin=1e-1, ymax=1e1, % Skalierung der y-Achse
xlabel=Flüssigkeitsbelastung~$\dot{V}_L A_c^{-1}$ / \unit{\meter\per\second}, % Achsenbeschriftung der x-Achse
ylabel=Gasbelastung~$\dot{V}_G A_c^{-1}$ / \unit{\meter\per\second}, % Achsenbeschriftung der y-Achse
xmode=log, % x-Achse logarithmisch
ymode=log, % x-Achse logarithmisch
grid=both,
legend style={
at={(0.02,0.98)},
anchor=north west,
draw=none,
}]
\addplot[color=blue, thick, name path=data1] table {data1.txt};
\addplot[color=black, thick] table {data2.txt};
\path[name path=axis] (0.0001,0.1) -- (0.1,0.1);
\addplot[color=blue!20] fill between[of=data1 and axis,
soft clip = { (0.00039,0.1) rectangle (0.1,10) }];
\end{axis}
\end{tikzpicture}
\end{document}

Stefan
Du kannst Plots Namen geben, zur Achse hin füllen, und mit soft clip durch einen Bereich beschränken, hier mit einem Rechteck:
[code]\path[name path=axis] (0.0001,0.1) -- (0.1,0.1);
\addplot[color=blue!20] fill between[of=data1 and axis,
soft clip = { (0.00039,0.1) rectangle (0.1,10) }];[/code]
Vollständiger Code, nur vertikal bisschen zusammengezogen damit es im Forum einfacher zu lesen ist ohne viel Scrollen, daher auch die Daten zum Online-Compiler kopiert:
[code]\documentclass{standalone}
\usepackage{siunitx}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepgfplotslibrary{fillbetween}
\begin{document}
\begin{tikzpicture}
\begin{axis}
[
width=13cm, % Breite des Diagramms
height=8cm, % Höhe des Diagramms
xmin=1e-4, xmax=1e-1, % Skalierung der x-Achse
ymin=1e-1, ymax=1e1, % Skalierung der y-Achse
xlabel=Flüssigkeitsbelastung~$\dot{V}_L A_c^{-1}$ / \unit{\meter\per\second}, % Achsenbeschriftung der x-Achse
ylabel=Gasbelastung~$\dot{V}_G A_c^{-1}$ / \unit{\meter\per\second}, % Achsenbeschriftung der y-Achse
xmode=log, % x-Achse logarithmisch
ymode=log, % x-Achse logarithmisch
grid=both,
legend style={
at={(0.02,0.98)},
anchor=north west,
draw=none,
}]
\addplot[color=blue, thick, name path=data1] table {data1.txt};
\addplot[color=black, thick] table {data2.txt};
\path[name path=axis] (0.0001,0.1) -- (0.1,0.1);
\addplot[color=blue!20] fill between[of=data1 and axis,
soft clip = { (0.00039,0.1) rectangle (0.1,10) }];
\end{axis}
\end{tikzpicture}
\end{document}[/code]
[attachment=0]plot-gefuellt.png[/attachment]
Stefan