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


Groups > comp.graphics.apps.gnuplot > #2829 > unrolled thread

Contour interpolated plot from scattered data

Started byronsnetquest@gmail.com
First post2015-03-19 14:32 -0700
Last post2015-03-23 09:04 -0700
Articles 8 — 2 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  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

#2829 — Contour interpolated plot from scattered data

Fromronsnetquest@gmail.com
Date2015-03-19 14:32 -0700
SubjectContour interpolated plot from scattered data
Message-ID<da8d07a4-b7d6-4ebd-aac7-0942aa0f4052@googlegroups.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

[toc] | [next] | [standalone]


#2830

FromKarl <mail.kfr@gmx.net>
Date2015-03-19 22:55 +0100
Message-ID<mefglc$tdc$1@news.rz.uni-karlsruhe.de>
In reply to#2829
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

[toc] | [prev] | [next] | [standalone]


#2831

Fromronsnetquest@gmail.com
Date2015-03-19 15:05 -0700
Message-ID<a09b411a-22b1-4fa3-b6d5-532cc365508b@googlegroups.com>
In reply to#2830
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!

[toc] | [prev] | [next] | [standalone]


#2832

Fromronsnetquest@gmail.com
Date2015-03-19 15:40 -0700
Message-ID<deba8047-7bb3-40cb-8195-cd4012b8c13a@googlegroups.com>
In reply to#2831
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

[toc] | [prev] | [next] | [standalone]


#2833

Fromronsnetquest@gmail.com
Date2015-03-19 18:15 -0700
Message-ID<77097d28-8760-4c01-8643-6cf7f2f6d741@googlegroups.com>
In reply to#2832
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.

[toc] | [prev] | [next] | [standalone]


#2834

Fromronsnetquest@gmail.com
Date2015-03-19 19:01 -0700
Message-ID<2971a7f5-4858-40bb-b0eb-64767789f920@googlegroups.com>
In reply to#2833
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

[toc] | [prev] | [next] | [standalone]


#2835

FromKarl <mail.kfr@gmx.net>
Date2015-03-20 08:47 +0100
Message-ID<megj9s$bbc$1@news.rz.uni-karlsruhe.de>
In reply to#2834
Am 20.03.2015 um 03:01 schrieb ronsnetquest@gmail.com:
> 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
> 


The 2D plot "with image" seemingly ignores dgrid3d mode.

How about this?

(gnuplot 5.0 syntax, for older versions you have to plot the table to a
temporary file instead of "$interpol")

set dgrid3d 20,30
set table $interpol
splot dataf using 1:2:3
unset table

plot $interpol using 1:2:3 with image


[toc] | [prev] | [next] | [standalone]


#2843

Fromronsnetquest@gmail.com
Date2015-03-23 09:04 -0700
Message-ID<e9785ca1-2f41-4ed4-91b4-90304ec3a464@googlegroups.com>
In reply to#2835
On Friday, March 20, 2015 at 3:47:09 AM UTC-4, Karl wrote:
> Am 20.03.2015 um 03:01 schrieb ronsnetquest@gmail.com:
> > 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
> > 
> 
> 
> The 2D plot "with image" seemingly ignores dgrid3d mode.
> 
> How about this?
> 
> (gnuplot 5.0 syntax, for older versions you have to plot the table to a
> temporary file instead of "$interpol")
> 
> set dgrid3d 20,30
> set table $interpol
> splot dataf using 1:2:3
> unset table
> 
> plot $interpol using 1:2:3 with image

Thanks, but dgrid3d doesn't do the type of interpolation that is needed.  I still haven't found a solution.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web