[pstricks] Graph incorrect if \input is used.
Christer Gustafsson
gustaf at powertech.no
Fri Aug 11 16:59:38 CEST 2006
The examples below show as step one the desired form of a graph. I uses
a \input and has the desired simple form
but the graph is not the intended one. When the \input is replaced by
its contents (Step 2), the file
the graph is still incorrect. Now when the last \include is replaced by
its contents, then the correct
graph appears (Step 3).
Can anyone explain how to avoid this behaviour? Can I modify so that the
\input can be retained (the actual files are
quite long, and several zooms are used. This would make the input file
most messy if only the step 3 is possible)?
Regards,
ChG
Step 1
The line \input figures/graftest/norm-max/undeformed.dei contains
\begin{figure} ... \end{figure}
It is meant to show a rectangle and a circle as well as a grid. The
centre of the circle is on the
intersection of two gridlines. The rectangle is horizontally
symmetric with repsect to x=0
The rectangle and the filled circle are not correctly aligned with
the lines of the grid
\documentclass[10pt,a4paper]{article}
\usepackage{a4wide}
\usepackage{epsfig}
\usepackage{pstricks}
\usepackage{pst-plot}
\begin{document}
\input figures/graftest/norm-max/undeformed.dei
\end{document}
Step 2
The line \input figures/graftest/norm-max/undeformed.dei replaced by
its contents
The rectangle and the filled circle are not correctly aligned with
the lines
\documentclass[10pt,a4paper]{article}
\usepackage{a4wide}
\usepackage{epsfig}
\usepackage{pstricks}
\usepackage{pst-plot}
\begin{document}
\begin{figure}
\psset{xunit= 2.00000cm,yunit= 2.00000cm}
\begin{pspicture}( -4.00000, 0.00000)( 3.00000, 10.00000)
\rput[bl]( 0.00000,0.00000){%
\begin{psclip}{\psframe[linecolor=white]( -4.00000, 0.00000)(
3.00000, 10.00000)}
\pscircle[linestyle=none,fillstyle=solid,fillcolor=black](
-1.00000, 5.00000){0.10000}
\input{figures/graftest/NORM-MAX/000000.pst}
{\footnotesize%
\psaxes[axesstyle=axes,ticks=none,Ox=0,Dx=1,Oy=2,Dy=2](0.00000,2.00000)(-4.00000,0.00000)(3.00000,10.00000)
\multirput( -4.00000, 0.00000)( 1.00000,
0.00000){8}{\psline[linewidth=0.2pt,linestyle=dotted]( 0.00000,
10.00000)}
\multirput( -4.00000, 0.00000)( 0.00000,
1.00000){11}{\psline[linewidth=0.2pt,linestyle=dotted]( 7.00000,
0.00000)}
}% footnotesize
\end{psclip}%
}% End rput
\end{pspicture}
\caption[Incs 0..0 layout Undeformed]{HeidrunNF undeformed
0.000$\ldots$ 0.000}
\end{figure}
\end{document}
Step 3 The line \input figures/graftest/NORM-MAX/000000.pst
replaced by its contents
The rectangle and the filled circle are correctly aligned
\documentclass[10pt,a4paper]{article}
\usepackage{a4wide}
\usepackage{epsfig}
\usepackage{pstricks}
\usepackage{pst-plot}
\listfiles
\begin{document}
\begin{figure}
\psset{xunit= 2.00000cm,yunit= 2.00000cm}
\begin{pspicture}( -4.00000, 0.00000)( 3.00000, 10.00000)
\rput[bl]( 0.00000,0.00000){%
\begin{psclip}{\psframe[linecolor=white]( -4.00000, 0.00000)( 3.00000,
10.00000)}
\pscircle[linestyle=none,fillstyle=solid,fillcolor=black]( -1.00000,
5.00000){0.10000}
\pspolygon*[showpoints=false,linecolor=black]%
( 0.16540, 5.58000)( 0.16540, 5.48933)( 0.16540, 5.39867)
( 0.16540, 5.30800)( -0.16540, 5.30800)( -0.16540, 5.39867)
( -0.16540, 5.48933)( -0.16540, 5.58000)
{\footnotesize%
\psaxes[axesstyle=axes,ticks=none,Ox=0,Dx=1,Oy=2,Dy=2](0.00000,2.00000)(-4.00000,0.00000)(3.00000,10.00000)
\multirput( -4.00000, 0.00000)( 1.00000,
0.00000){8}{\psline[linewidth=0.2pt,linestyle=dotted]( 0.00000,
10.00000)}
\multirput( -4.00000, 0.00000)( 0.00000,
1.00000){11}{\psline[linewidth=0.2pt,linestyle=dotted]( 7.00000,
0.00000)}
}% footnotesize
\end{psclip}%
}% End rput
\end{pspicture}
\caption[Incs 0..0 layout Undeformed]{HeidrunNF undeformed
0.000$\ldots$ 0.000}
\end{figure}
\end{document}
*File List*
article.cls 2004/02/16 v1.4f Standard LaTeX document class
size10.clo 2004/02/16 v1.4f Standard LaTeX file (size option)
a4wide.sty 1994/08/30
a4.sty 2004/04/15 v1.2g A4 based page layout
epsfig.sty 1999/02/16 v1.7a (e)psfig emulation (SPQR)
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
graphics.sty 2001/07/07 v1.0n Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2001/08/31 v1.1 graphics configuration of teTeX/TeXLive
dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
pstricks.sty 2005/10/07 v0.25 LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex 2005/10/25 v1.12 `PSTricks' (tvz)
xcolor.sty 2005/10/15 v2.06 LaTeX color extensions (UK)
color.cfg 2001/08/31 v1.1 color configuration of teTeX/TeXLive
pst-plot.sty 2004/07/15 package wrapper for pst-plot.tex
pst-plot.tex 2004/05/18 1.41 `pst-plot' (tvz)
***********
--
Christer Gustafsson
Grevlingveien 49
N-3029 Drammen
Tel. : +47 3282 0728
email : gustaf at powertech in no (replace at=@, in=.)
More information about the PSTricks
mailing list