Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2834

Re: Contour interpolated plot from scattered data

Newsgroups comp.graphics.apps.gnuplot
Date 2015-03-19 19:01 -0700
References <da8d07a4-b7d6-4ebd-aac7-0942aa0f4052@googlegroups.com> <mefglc$tdc$1@news.rz.uni-karlsruhe.de> <a09b411a-22b1-4fa3-b6d5-532cc365508b@googlegroups.com> <deba8047-7bb3-40cb-8195-cd4012b8c13a@googlegroups.com> <77097d28-8760-4c01-8643-6cf7f2f6d741@googlegroups.com>
Message-ID <2971a7f5-4858-40bb-b0eb-64767789f920@googlegroups.com> (permalink)
Subject Re: Contour interpolated plot from scattered data
From ronsnetquest@gmail.com

Show all headers | View raw


On Thursday, March 19, 2015 at 9:15:06 PM UTC-4, ronsne...@gmail.com wrote:
> On Thursday, March 19, 2015 at 6:40:52 PM UTC-4, ronsne...@gmail.com wrote:
> > On Thursday, March 19, 2015 at 6:05:23 PM UTC-4, ronsne...@gmail.com wrote:
> > > On Thursday, March 19, 2015 at 5:55:57 PM UTC-4, Karl wrote:
> > > > Am 19.03.2015 um 22:32 schrieb ronsnetquest@gmail.com:
> > > > > How do you do a color contour plot (map view) with interpolation
> > > > > between values from a data set when the values don't follow a
> > > > > consistent matrix?  The x axis is time (a date), the y axis is water
> > > > > depth (e.g., 0-20 meters), and the z value is water temperature
> > > > > (0-30C).
> > > > > 
> > > > > The data is scattered enough that it cannot be put into a matrix
> > > > > usable by pm3d (AFAIK).  This is because the time values are not
> > > > > always consistently spaced and may have large gaps in them and there
> > > > > are some missing values here and there for water temperatures at
> > > > > various depths.
> > > > > 
> > > > > Thanks much for any insight you can provide!
> > > > > 
> > > > > Ron
> > > > > 
> > > > 
> > > > Have you tried "set dgrid3d"? I also has several options to control the
> > > > interpolation algorithm.
> > > > 
> > > >   Karl
> > > 
> > > No I hadn't.  But I see now that that may be what I was missing.  I'll keep working on it.  Thanks!
> > 
> > OK, yes I have this working now!!  Thanks for the quick response.
> > 
> > Ron
> 
> Scratch that.  The dgrid3d interpolation will change the values themselves--not the missing values between the values which is what I need.

Here's my best attempt.  To simplify setting this up, I'm not using time data but a simple x value and some test data values.  If I do a simple plot:

    splot "test.dat" notitle

This looks fine.  But when I try to make this a color image, I can't get accurate results:

    splot "test.dat" using 1:2:3 with image notitle

Here's my best attempt:

    set xrange [0:10]
    set yrange [130:100]
    set xlabel "July"
    set ylabel "Depth (m)"
    set cblabel "Temperature (C)"
    set cbrange [0:30]

    set view map
    set hidden3d
    splot "test.dat" using 1:2:3 with image notitle

And this is the test.dat file (indented for clarity):

    1.5 110 30
    1.5 120 30
    2.5 110 30
    2.5 120 30
    3.5 110 30
    3.5 120 30
    4.5 110 30
    4.5 120 30
    5.5 110 30
    5.5 120 30
    6.0 110 25
    6.0 120 30
    6.25 110 20
    6.25 120 30
    6.5 110 15
    6.5 120 30
    6.75 110 10
    6.75 120 30
    7.5 110 0
    7.5 120 30
    8.5 110 0
    8.5 120 30
    9.5 110 0
    9.5 120 30

Let me know if anyone has done this and how you did it.

Thanks,
Ron

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Contour interpolated plot from scattered data ronsnetquest@gmail.com - 2015-03-19 14:32 -0700
  Re: Contour interpolated plot from scattered data Karl <mail.kfr@gmx.net> - 2015-03-19 22:55 +0100
    Re: Contour interpolated plot from scattered data ronsnetquest@gmail.com - 2015-03-19 15:05 -0700
      Re: Contour interpolated plot from scattered data ronsnetquest@gmail.com - 2015-03-19 15:40 -0700
        Re: Contour interpolated plot from scattered data ronsnetquest@gmail.com - 2015-03-19 18:15 -0700
          Re: Contour interpolated plot from scattered data ronsnetquest@gmail.com - 2015-03-19 19:01 -0700
            Re: Contour interpolated plot from scattered data Karl <mail.kfr@gmx.net> - 2015-03-20 08:47 +0100
              Re: Contour interpolated plot from scattered data ronsnetquest@gmail.com - 2015-03-23 09:04 -0700

csiph-web