[pstricks] excluding data region with correction of axes tick labels

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Wed Jun 9 07:49:10 CEST 2004


Patrick Drechsler wrote:

> At the moment I'm using \listdata twice to plot the portions on
> the left and the right side of the data I wish to include (having
> to adjust the right side of the data with \rput).  Then I have to
> manually adjust the axes tick labels (\multido) and delete the
> part of the axes being excluded.  At the end I have to create an
> `exclude' symbol. Time consuming, to say the least.
> 
> Is there a more flexible way of doing this?

scaling per axis is possible without redefining the
scaling macro. See example, the scaling is done with
listplot and the parameters

Herbert


\documentclass[12pt]{article}
\usepackage{pstricks-add}

\begin{document}

% normally done with \readdata and nStep=...:
\def\dataB{%
    0.0000000e+00   0.0000000e+00   0.0000000e+00
    1.0000000e+00   0.0000000e+00   0.0000000e+00
    2.0000000e+00   0.0000000e+00   2.4000000e+04
    3.6000000e+00   0.0000000e+00   2.4000000e+04
    4.5000000e+00   0.0000000e+00   0.0000000e+00
    14.5		   0		   0
    111.55	   0		   0
    1.2400000e+02   0.0000000e+00   0.0000000e+00
    1.2700000e+02  -1.2000000e+04   0.0000000e+00
    1.2750000e+02  -6.0000000e+03   2.4000000e+04
    1.2800000e+02   0.0000000e+00   0.0000000e+00
}

\psset{xunit=2.75cm,yunit=0.5mm}
\begin{pspicture}(-0.55,-15)(1.4,33)
 
\psaxes[labels=y,Dy=10,tickstyle=bottom,xAxes=false]{<->}(0,0)(0,-15)(1.45,30)%
   \psaxes[tickstyle=bottom,yAxes=false](0,0)(0,-15)(1.45,30)%
   \rput{70}(1.45,0){\psline(-0.1,0)(0.1,0)}%
   \listplot[plotstyle=line,linestyle=solid,xunit=2.75mm,yunit=0.0005mm,%
       plotNo=1,plotNoMax=2,xEnd=14.5]{\dataB}%
 
\listplot[plotstyle=line,linestyle=solid,linecolor=blue,xunit=2.75mm,yunit=0.0005mm,%
   plotNo=2,plotNoMax=2,xEnd=14.5]{\dataB}%
\end{pspicture}\hspace{0.75em}
%
\begin{pspicture}(-0.5,-15)(4,33)
   \rput{70}(-0.5,0){\psline(-0.1,0)(0.1,0)}
   \psaxes[Ox=11,tickstyle=bottom,yAxes=false]{->}(0,0)(-0.5,-15)(1.4,30)
   \listplot[Ox=11,plotstyle=line,xunit=0.275mm,yunit=0.0005mm,%
     plotNo=1,plotNoMax=2,xStart=10]{\dataB}
   \listplot[plotstyle=line,linecolor=blue,xunit=0.275mm,yunit=0.0005mm,%
     plotNo=2,plotNoMax=2,xStart=10]{\dataB}
\end{pspicture}

\end{document}


-- 
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes




More information about the PSTricks mailing list