pgfplots: Fläche zwischen zwei Graphen und x-Achse füllen
Verfasst: So 11. Aug 2024, 00:09
Hallo zusammen,
ich habe folgenden Code:
Ich würde gerne die Fläche, die sowohl von der blauen Kurve, als auch von der senkrechten schwarzen Linie eingeschlossen ist, mit einer Farbe füllen. Leider habe ich dazu keine Möglichkeit gefunden.
Würde mich über eure Hilfe sehr freuen!
ich habe folgenden Code:
\documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \pgfplotsset{compat=1.18} \usepackage{filecontents} \begin{filecontents}{data1.txt} x y 0.0001 3.6448 0.00012 3.64611 0.00014 3.64705 0.00016 3.64799 0.00018 3.64892 0.00021 3.64986 0.00024 3.6508 0.00027 3.65174 0.00031 3.65268 0.00035 3.65362 0.00041 3.6505 0.00046 3.63322 0.00053 3.63415 0.0006 3.63509 0.00069 3.63602 0.00079 3.6168 0.0009 3.59768 0.00103 3.59461 0.00118 3.57561 0.00135 3.54881 0.00154 3.51049 0.00176 3.46679 0.00201 3.41604 0.0023 3.3679 0.00263 3.28922 0.003 3.21237 0.00343 3.13036 0.00392 3.04197 0.00448 2.94133 0.00512 2.8314 0.00586 2.71651 0.00669 2.59761 0.00765 2.46602 0.00874 2.32555 0.00999 2.17728 0.01142 2.00923 0.01306 1.83672 0.01492 1.66415 0.01705 1.4986 0.01949 1.3413 0.02228 1.19121 0.02546 1.05146 0.02893 0.92045 0.03246 0.80267 0.03599 0.69681 0.03943 0.60844 0.04293 0.53057 0.04646 0.46239 0.04997 0.40344 0.05342 0.35056 0.05677 0.30499 0.06032 0.26244 0.06372 0.22582 0.06689 0.19472 0.07022 0.16638 0.07328 0.1431 0.076 0.12459 0.08009 0.10035 \end{filecontents} \begin{filecontents}{data2.txt} x y 0.00039 0.10026 0.00039 3.9916 \end{filecontents} \begin{document} \begin{figure}[ht] \centering \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, ] table {data1.txt}; \addplot[ color=black, thick, ] table {data2.txt}; \end{axis} \end{tikzpicture} \end{figure} \end{document}
Würde mich über eure Hilfe sehr freuen!