Paul Smith wrote:
On 2/2/06, Herbert Voss <[EMAIL PROTECTED]> wrote:
Yes, that is what I mean. An illustration is at
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/spy.html
tell me the structure of your data file?
Are the values also saved as a matrix?
Thanks to all. An example of a data file is attached. It is a text
file with a matrix. Each column corresponds to x-coordinate, whereas
each row corresponds to y-coordinate. Both x and y have the same
range: [0,1]. From column to column, x increases 0.1. From row to row,
y increases 0.1. First column corresponds to x=0 and first row to y=0.
Paul
------------------------------------------------------------------------
0 1 1 0 0 0 0 1 1 1
0 1 1 0 1 1 1 0 1 0
understood. Here an example if you could have your textfile
as
/matrix [
0 1 1 0 0 0 0 1 1 1
0 1 1 0 1 1 1 0 1 0
....
] def
\documentclass[a4paper]{article}
\usepackage{pst-plot}
\makeatletter
\def\specialPlot#1{%
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(#1) run % load the data file
/n 0 def % index for element
[EMAIL PROTECTED]
/Dot { DS 0 360 arc fill } bind def
0 0.1 1 {
/y exch def
0 0.1 1 {
/x exch def
matrix n get
dup 0 gt {
x [EMAIL PROTECTED] mul y [EMAIL PROTECTED] mul Dot%
} { pop } ifelse
/n n 1 add def
} for
} for
}%
[EMAIL PROTECTED]
}
\makeatother
\begin{document}
\psset{unit=10}
\begin{pspicture}(-0.1,-0.1)(1.1,1.1)
\psaxes[Dx=0.1,Dy=0.1]{->}(1,1)
\psset{dotsize=5pt}
\specialPlot{matrix.txt}
\end{pspicture}
\end{document}
Herbert
