# What-is-the-difference-between-\psaxes in the following cases?

\documentclass[border=15pt,pstricks]{standalone}
\usepackage{pst-plot,pst-calculate}
\begin{document}
\begin{pspicture}[showgrid,algebraic](-5,-1)(5,5)
\def\hamso{-1*x^2+4}
\def\hs{sqrt(-1*x^2+4)}
\def\k{\pscalculate{sqrt(3)}}
\psplot{-2}{2}{\hamso}
\pscustom[fillstyle=hlines]{%
\psplot{-\k}{\k}{\hs}
\psplot{\k}{-\k}{\hamso}}%
\pscustom[fillstyle=solid,fillcolor=red!50]{%
\psline(0,0)(+\k,\hs)
\psplot{\k}{-\k}{\hs}
\psline(+-\k,\hs)(0,0)
}
%%%\psaxes{->}(0,0)(-3,-1)(3,5)[$x$,-90][$y$,0]
\end{pspicture}
\end{document}


Without \psaxes...

With \psaxes...

Another question: How to plot of function without "\pscalculate"?

Done!

\documentclass[border=15pt,pstricks]{standalone}
\usepackage{pst-plot}
\begin{document}
\begin{pspicture}[showgrid,algebraic](-5,-1)(5,5)
\def\hamso{-1*x^2+4}
\def\hs{sqrt(-1*x^2+4)}
\psplot{-2}{2}{\hamso}
\pscustom[fillstyle=hlines]{%
\psplot{3 sqrt}{3 sqrt neg}{\hs}
\psplot{3 sqrt neg}{3 sqrt}{\hamso}}%
\pscustom[fillstyle=solid,fillcolor=red!50]{%
\psline(0,0)(*{3 sqrt} \hs)
\psplot{3 sqrt}{3 sqrt neg}{\hs}
\psline(*{3 sqrt neg} \hs)(0,0)}
\psaxes[showgrid=false,showorigin=false]{->}(0,0)(-3,-1)(3,5)[$x$,-90][$y$,0]
\end{pspicture}
\end{document}


If showgrid is true, \psaxes uses style=gridstyleA

\documentclass[border=15pt,pstricks]{standalone}
\usepackage{pst-plot}
\begin{document}
\begin{pspicture}[showgrid,algebraic](-5,-1)(5,5)
\def\hamso{-1*x^2+4}
\def\hs{sqrt(-1*x^2+4)}
\def\k{1.732}
\psplot{-2}{2}{\hamso}
\pscustom[fillstyle=hlines]{%
\psplot{-\k}{\k}{\hs}
\psplot{\k}{-\k}{\hamso}}%
\pscustom[fillstyle=solid,fillcolor=red!50]{%
\psline(0,0)(+\k,\hs)
\psplot{\k}{-\k}{\hs}
\psline(+-\k,\hs)(0,0)
}
\psaxes[labels=none,showgrid=false]{->}(0,0)(-3,-1)(3,5)[$x$,-90][$y$,0]
\end{pspicture}
\end{document}


• \psplot{\k}{-\k}{\hs}. Why can't we use \psplot{sqrt(3)}{-sqrt(3}{\hs} or \psplot{! 3 sqrt}{! 0 3 sqrt sub}{\hs} or \pstVerb{/ds 3 sqrt def} ... \psplot{! -ds}{! ds}{\hs} or etc...?
– user173875
May 10, 2019 at 10:37
• \psplot{3 sqrt}{3 sqrt neg}{\hs} May 10, 2019 at 11:18