0

As per a suggestion, I'm splitting my previous (multiple) question into separate parts.

I'm trying to create a two graph Figure with pgfplots but the result is not exactly what I want. I want part of the area below a curve to be shaded, but using \closedcycle results in the appearance of some extraneous lines (the vertical line in the gray area and a horizontal line on top of the x-axis which is barely visible). enter image description here My code is

\documentclass{article}
\usepackage{tikz,pgfplots}

\usepgfplotslibrary{fillbetween}

\pgfplotsset{compat = newest}

\begin{document}

\begin{figure} \begin{tikzpicture} \begin{axis}[ ticks=none, axis x line=bottom, axis y line=left, axis y discontinuity=crunch, xmin=0,xmax=1.3, ymin=0.5,ymax=1.3] \addplot[ domain = 0:sqrt(1/3), samples =200, ] {sqrt(7/6-x^2)}; \addplot[ domain = sqrt(1/3):sqrt(7/6), fill = gray, fill opacity = 0.1, samples =200, y filter/.expression={x==sqrt(7/6 )?0:y}, ] {sqrt(7/6-x^2)}\closedcycle; \addplot[ domain = 0:1.3, samples =200, ] {sqrt(5/6)}; \fill[gray, opacity = 0.1] (0,0) -- (0,0.9129) -- (0.5774,0.9129) -- (0.5774,0); \end{axis} \end{tikzpicture} \end{figure}

\end{document}

Patricio
  • 339

0 Answers0