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

plotting Contours with non-grid data?

2 views
Skip to first unread message

Andreas Schulze

unread,
Mar 21, 2006, 10:38:30 AM3/21/06
to
Hi all,

is it possible to plot contour lines from following data set?
Data:

1.0000000e+03 1.0200000e+02 3.4
1.0000000e+03 7.6000000e+01 4.5
1.0000000e+03 5.1000000e+01 5.3
1.0000000e+03 2.5000000e+01 4.4


1.5000000e+03 1.0200000e+02 4.5
1.5000000e+03 7.6000000e+01 5.4
1.5000000e+03 5.1000000e+01 5.5
1.5000000e+03 2.5000000e+01 5.6

2.0000000e+03 1.0200000e+02 4.6
2.0000000e+03 1.2700000e+02 4.0

2.0000000e+03 7.6000000e+01 5.5
2.0000000e+03 5.1000000e+01 5.5
2.0000000e+03 2.5000000e+01 5.4

I have gnuplot Version 4.0 patchlevel 0.

Best regards,
Andreas

Steve Bickerton

unread,
Mar 21, 2006, 1:45:57 PM3/21/06
to
Hi Andreas,

I think you'll have to change your data file to be in grid format.
I've done that in the data i'm resending below (There was an extra point
in one of the lines that the other lines didn't have ... so i commented
it out):

Then for a simple (and pretty ungly) plot, try:

gnuplot> reset
gnuplot> set view map
gnuplot> set contour
gnuplot> unset surface
gnuplot> splot 'contour.dat'

For fancier things like smoother interpolation:

gnuplot> help contour
gnuplot> help cntrparam

will get you going. To be honest, that's not many points to work with
though ...

Hope that helps,
cheers,
steve

Andreas Schulze wrote:
> 1.0000000e+03 1.0200000e+02 3.4
> 1.0000000e+03 7.6000000e+01 4.5
> 1.0000000e+03 5.1000000e+01 5.3
> 1.0000000e+03 2.5000000e+01 4.4
>
>
> 1.5000000e+03 1.0200000e+02 4.5
> 1.5000000e+03 7.6000000e+01 5.4
> 1.5000000e+03 5.1000000e+01 5.5
> 1.5000000e+03 2.5000000e+01 5.6
>
> 2.0000000e+03 1.0200000e+02 4.6

> #2.0000000e+03 1.2700000e+02 4.0

Steve Bickerton

unread,
Mar 21, 2006, 1:50:16 PM3/21/06
to
... sorry ... didn't notice 'non-grid' was a critical requirement in the
subject line ... my bad. Can't help ya with that.
steve

Pedro J Caridade

unread,
Mar 22, 2006, 11:13:16 AM3/22/06
to
Hi Andreas
You can use a nice feature of gnuplot: set dgrid3d.
It uses a scheme to generate a regular grid from non-grid data. After this
contour or coloring surfaces are straightforward. Read the dgrid3d to see
the parameters.
Pedro
0 new messages