Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with pm3d maps, blank lines have been added in to the data file

408 views
Skip to first unread message

jeff...@gmail.com

unread,
Nov 29, 2005, 5:26:17 PM11/29/05
to
Hi,
I met a problem when I am trying to plot a data file with pm3d.
The data file consists of three columes, the first two are the
coordinates of the datapoints and the third colume is like the
'population' of each points. My idea was to use "set view 180,0' so
that the distribution of the population could be viewed in a 2D map.
However, when I plot the datafile, I found some missing region, i.e.
some of the region on the map are empty while some regions do have
color.
Here's part of my datafile
-4.37114E-08 0.0000 38.000

5.23360E-02 0.0000 114.00

1.61901E-02 4.97688E-02 153.00
-4.23192E-02 3.07919E-02 115.00
-4.23729E-02 -3.07180E-02 203.00
1.61032E-02 -4.97970E-02 111.00
0.10453 0.0000 84.000

8.79440E-02 5.64981E-02 77.000
4.34535E-02 9.50683E-02 84.000
-1.48275E-02 0.10347 241.00
-6.83976E-02 7.90440E-02 109.00
-0.10027 2.95302E-02 113.00
-0.10032 -2.93551E-02 276.00
-6.85355E-02 -7.89245E-02 295.00
-1.49990E-02 -0.10345 156.00
4.32808E-02 -9.51471E-02 120.00
8.78433E-02 -5.66546E-02 66.000
0.15643 0.0000 56.000

0.14588 5.64967E-02 72.000
0.11563 0.10537 86.000
6.97714E-02 0.14001 161.00
1.44989E-02 0.15576 289.00
-4.27254E-02 0.15049 275.00
-9.41882E-02 0.12490 70.000
-0.13294 8.24573E-02 135.00
-0.15374 2.88837E-02 163.00
-0.15380 -2.86153E-02 481.00
-0.13308 -8.22251E-02 514.00
-9.44061E-02 -0.12474 199.00
-4.29879E-02 -0.15041 108.00
1.42324E-02 -0.15579 75.000
6.95319E-02 -0.14013 66.000
0.11545 -0.10556 56.000
0.14578 -5.67487E-02 50.000
0.20791 0.0000 30.000
And the command I typed are:
set pm3d
splot "data"

You may notice that I added a blank line every time after the Y value
becomes 0, and each block is acctully a circle.

My guess is that the way I put in the blank line was incorret

Please give me some help!
Thanks!!

Hans-Bernhard Broeker

unread,
Nov 30, 2005, 7:04:36 AM11/30/05
to
jeff...@gmail.com wrote:

> My idea was to use "set view 180,0' so that the distribution of the
> population could be viewed in a 2D map.

It's usually better to 'set view map' instead.

> However, when I plot the

> You may notice that I added a blank line every time after the Y value


> becomes 0, and each block is acctully a circle.

> My guess is that the way I put in the blank line was incorret

Not necessarily. But it's somewhat unusual. Read 'help splot
datafile' and 'help glossary' to find out what blank lines actually
mean to gnuplot. And 'help pm3d' to cross-check whether that's a good
idea for your case at hand.

Generally, surface data sets need to have some structure to allow
gnuplot to know what is supposed to be connected to what. This
structure is created by blank records in the file, but you must be
careful how you use them.

--
Hans-Bernhard Broeker (bro...@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

0 new messages