2

I'm working on the graph of a direction field of an ODE along with some of the solutions. As a starting point I used user2478's solution posted here running with xelatex which produces a graph with axesstyle=frame where the axis labels are missing.

\documentclass[border=1cm]{standalone}
\usepackage{pst-plot,pst-ode}
\begin{document}

\psset{unit=3} \begin{pspicture}(-1.2,-1.2)(1.1,1.1) \psaxesticksize=0 4pt,axesstyle=frame,Ox=-1,Oy=-1(1,1) \psset{algebraic} \psVectorfieldarrows=-(0.9,0.9){ x^2+y^2-1 } %y0_a=-0.5 \pstODEsolve[algebraicOutputFormat]{y0_a}{t | x[0]}{-1}{1}{100}{-0.5}{t^2+x[0]^2-1} %y0_b=0.0 \pstODEsolve[algebraicOutputFormat]{y0_b}{t | x[0]}{-1}{1}{100}{0.0}{t^2+x[0]^2-1} %y0_c=0.5 \pstODEsolve[algebraicOutputFormat]{y0_c}{t | x[0]}{-1}{1}{100}{0.5}{t^2+x[0]^2-1}

\psset{arrows=-,linewidth=1pt}% \listplot[linecolor=red ]{y0_a} \listplot[linecolor=green]{y0_b} \listplot[linecolor=blue ]{y0_c} \end{pspicture}

\end{document}

no axis labels

From what I read in the documentation, it should be possible to use the xAxisLabelPos and yAxisLabelPos options in \psset. According to this answer, pspicture and psgraph should be interchangeable but I can only get these to work when I use psgraph instead of pspicture, where the position of labels is off. I tried modifying it with xlabelPos and ylabelPos but it doesn't seem to do what I want it to.

\documentclass[border=1cm]{standalone}
\usepackage{pst-plot,pst-ode}
\begin{document}

\psset{algebraic,xAxisLabel=$x$,yAxisLabel=$y$,xAxisLabelPos={-0.5cm,-1.1}, yAxisLabelPos={-1.1,-0.5cm}} \begin{psgraph}ticks=none,axesstyle=frame,xlabelPos=bottom, xLabels={-1,,1},yLabels={-1,,1}(-1,-1)(1,1){6cm}{6cm}

\psVectorfieldarrows=-(0.9,0.9){ x^2+y^2-1 } %y0_a=-0.5 \pstODEsolve[algebraicOutputFormat]{y0_a}{t | x[0]}{-1}{1}{100}{-0.5}{t^2+x[0]^2-1} %y0_b=0.0 \pstODEsolve[algebraicOutputFormat]{y0_b}{t | x[0]}{-1}{1}{100}{0.0}{t^2+x[0]^2-1} %y0_c=0.5 \pstODEsolve[algebraicOutputFormat]{y0_c}{t | x[0]}{-1}{1}{100}{0.5}{t^2+x[0]^2-1}

\psset{arrows=-,linewidth=1pt}% \listplot[linecolor=red ]{y0_a}

\listplot[linecolor=green]{y0_b} \listplot[linecolor=blue ]{y0_c} \end{psgraph}

\end{document}

wrong label positions

What is the best way to get both the label positions for ticks from the top picture and the axis labels of the bottom one?

Lina
  • 35

0 Answers0