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


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

Re: Samples, isosamples, and how they affect contour lines

From Karl Ratzsch <mail.kfr@gmx.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Samples, isosamples, and how they affect contour lines
Date 2018-07-11 11:26 +0200
Organization solani.org
Message-ID <pi4igh$v3p$1@solani.org> (permalink)
References <884eb2ab-a118-41a9-aaa1-bfcdd71f0d0e@googlegroups.com>

Show all headers | View raw


Am 11.07.2018 um 09:02 schrieb nawridlz@gmail.com:
> Contour lines generated by gnuplot can look pretty strange (unexpected) if you do not set both `samples` and `isosamples` to appropriate values. I struggled for hours to find out how exactly `set samples` and `set isosamples` affect the appearance of contour lines, however, all I observed is that setting both to sufficiently large values will generate good-looking contours.. Still, I want to understand how exactly this works.
> 
> 1. What is the difference between `set samples` and `set isosamples` in the context of contour lines?
> 2. How does `set samples` affect the generation of contour lines?
> 3. How does `set isosamples` affect the generation of contour lines?
> 
> For example, consider the following simple case:
> 
>     unset surface
>     set contour
>     set cntrparam levels discrete 10, 20
>     set samples 250, 2
>     set isosamples 2, 250
>     set view map
>     splot x**2 + y**2
> 
> To generate correct contour lines, it appears you need to set the first parameter of `samples` and the second parameter of `isosamples` to sufficiently large values. However, setting the second parameter of `samples` and the first parameter of `isosamples` to the smallest possible value does no harm.. This is not exactly intuitive. So how does this work?
> 
> I note that I asked this question before on Stack Overflow, but got no answers.
> 

I think you are confused between the generation of xy values and the
contour generation.

You should generate a dataset with a fixed sampling, and then look how
"set sample" influences the look of contours.

set samp 40
set isos 40
set table $dat
splot x**2+y**2
unset table
set view map
splot $dat title "an evenly spaced grid of datapoints"
reset

Now if you try to plot contours on this dataset, you will find that the
sampling settings just have no influence on the contour appearance. The
contour points are generated from the grid.

hth,

   Karl

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


Thread

Samples, isosamples, and how they affect contour lines nawridlz@gmail.com - 2018-07-11 00:02 -0700
  Re: Samples, isosamples, and how they affect contour lines Karl Ratzsch <mail.kfr@gmx.net> - 2018-07-11 11:26 +0200
    Re: Samples, isosamples, and how they affect contour lines nawridlz@gmail.com - 2018-07-11 22:39 -0700
      Re: Samples, isosamples, and how they affect contour lines Karl Ratzsch <mail.kfr@gmx.net> - 2018-07-12 08:08 +0200
        Re: Samples, isosamples, and how they affect contour lines nawridlz@gmail.com - 2018-07-11 23:50 -0700
          Re: Samples, isosamples, and how they affect contour lines Karl Ratzsch <mail.kfr@gmx.net> - 2018-07-12 17:18 +0200
            Re: Samples, isosamples, and how they affect contour lines nawridlz@gmail.com - 2018-07-13 00:22 -0700
              Re: Samples, isosamples, and how they affect contour lines Karl Ratzsch <mail.kfr@gmx.net> - 2018-07-13 12:39 +0200
  Re: Samples, isosamples, and how they affect contour lines Karl Ratzsch <mail.kfr@gmx.net> - 2018-07-13 09:53 +0200

csiph-web