Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #1616 > unrolled thread
| Started by | neurino <lelli.luca@googlemail.com> |
|---|---|
| First post | 2013-02-10 04:13 +0100 |
| Last post | 2013-02-10 16:49 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
splot with dgrid3d / pm3d? neurino <lelli.luca@googlemail.com> - 2013-02-10 04:13 +0100
Re: splot with dgrid3d / pm3d? sfeam <sfeam@users.sourceforge.net> - 2013-02-09 20:28 -0800
Re: splot with dgrid3d / pm3d? neurino <lelli.luca@googlemail.com> - 2013-02-10 15:52 +0100
Re: splot with dgrid3d / pm3d? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2013-02-10 16:49 +0100
| From | neurino <lelli.luca@googlemail.com> |
|---|---|
| Date | 2013-02-10 04:13 +0100 |
| Subject | splot with dgrid3d / pm3d? |
| Message-ID | <kf7393$7fb$1@tdi.cu.mi.it> |
Dear gnuplotters, i have 3D data, which look like this # x y z 1996-12 68 -0.09928498 1996-12 69 -0.1597349 1996-12 70 -0.009438827 ... ... 1997-01 68 -0.09928498 1997-01 69 -0.1597349 1997-01 70 -0.009438827 and so on, 192 data (x) blocks, each of 141 values (y). The following plot http://img39.imageshack.us/img39/8113/cthanzonalfull.jpg has been created with (relevant commands): set pm3d map set isosample 1200 set xdata time set timefmt "%Y-%m-%d" splot f1 u 1:2:3 notitle However, i'd like to smooth them and highlight patterns. I am having difficult times with set dgrid3d, because if i set set dgrid3d 40,40,16 i get this result http://img16.imageshack.us/img16/1641/testiiq.jpg So, from the demos i don't get how the non-gridded data should be preprocessed, having set dgrid3d instead of pm3d, given that the nice demos are achieved with splot 1:2:3 too. Thanks for the help.
[toc] | [next] | [standalone]
| From | sfeam <sfeam@users.sourceforge.net> |
|---|---|
| Date | 2013-02-09 20:28 -0800 |
| Message-ID | <kf77jq$997$1@dont-email.me> |
| In reply to | #1616 |
neurino wrote:
> Dear gnuplotters,
>
> i have 3D data, which look like this
> # x y z
> 1996-12 68 -0.09928498
> 1996-12 69 -0.1597349
> 1996-12 70 -0.009438827
> ...
> ...
> 1997-01 68 -0.09928498
> 1997-01 69 -0.1597349
> 1997-01 70 -0.009438827
>
> and so on, 192 data (x) blocks, each of 141 values (y).
I may not understand the question.
It looks from the *.jpg you point to that you aren't really
trying for a 3D plot, but a 2D heatmap. Is that correct?
If so then neither pm3d nor isosamples are needed.
Try
plot "data" using 2:1:3 with image
There are actually quite a few ways to create a heatmap.
You might have a look at the demos here
http://gnuplot.sourceforge.net/demo_cvs/heatmaps.html
As to smoothing and highlighting, I'd have to know a lot
more about the data structure and what you are looking
for. Maybe a Fourier transform + high frequency filter?
Or just output the heatmap as a PNG image and read it into
an image processing tool like Photoshop or GIMP.
Ethan
>
> The following plot
> http://img39.imageshack.us/img39/8113/cthanzonalfull.jpg
>
> has been created with (relevant commands):
>
> set pm3d map
> set isosample 1200
> set xdata time
> set timefmt "%Y-%m-%d"
> splot f1 u 1:2:3 notitle
>
> However, i'd like to smooth them and highlight patterns.
> I am having difficult times with set dgrid3d, because if i set
>
> set dgrid3d 40,40,16
>
> i get this result
> http://img16.imageshack.us/img16/1641/testiiq.jpg
>
> So, from the demos i don't get how the non-gridded data should be
> preprocessed, having set dgrid3d instead of pm3d, given that the nice
> demos are achieved with splot 1:2:3 too.
>
> Thanks for the help.
[toc] | [prev] | [next] | [standalone]
| From | neurino <lelli.luca@googlemail.com> |
|---|---|
| Date | 2013-02-10 15:52 +0100 |
| Message-ID | <kf8c82$aoj$1@tdi.cu.mi.it> |
| In reply to | #1617 |
On 2013-02-10 05:28:10 +0100, sfeam said: Hello Ethan, thanks for the prompt reply. > I may not understand the question. > It looks from the *.jpg you point to that you aren't really > trying for a 3D plot, but a 2D heatmap. Is that correct? > If so then neither pm3d nor isosamples are needed. > > Try > plot "data" using 2:1:3 with image line 0: warning: Number of pixels cannot be factored into integers matching grid. N = 52555 K = 50 > There are actually quite a few ways to create a heatmap. > You might have a look at the demos here > > http://gnuplot.sourceforge.net/demo_cvs/heatmaps.html Indeed. What i always thought was that a 3D plot, in map view perspective, is the analogue of a 2D heatmap. I realize only now that this might be wrong, though. With the following: set pm3d implicit at s set contour base set cntrparam bspline set cntrparam order 4 min = -0.5; max = 0.5 step=(max-min)/4 set cntrparam level discrete min,step,max splot "data" using 1:2:3 w pm3d notitle The result is here: http://img825.imageshack.us/img825/5368/testpm3dimplicit.jpg > As to smoothing and highlighting, I'd have to know a lot > more about the data structure and what you are looking > for. Maybe a Fourier transform + high frequency filter? Physically, the data are timeseries, sampled on a monthly basis (192 months, the data blocks, the x-axis) and gridded from north to south at 0.5 deg resolution (281 y-values). So, while a FFT + Filter might be a sound option, but i wonder whether is overkill. It's just for visualization purpose. I achieve scientific insight with PCA (empirical orthogonal functions, covariance matrices and so on) anyway. Given the last .jpg above, what can you recommend me? I never used FFT with gnuplot. Is it achievable? Thanks.
[toc] | [prev] | [next] | [standalone]
| From | Hans-Bernhard Bröker <HBBroeker@t-online.de> |
|---|---|
| Date | 2013-02-10 16:49 +0100 |
| Message-ID | <anptssF5th2U1@mid.dfncis.de> |
| In reply to | #1616 |
On 10.02.2013 04:13, neurino wrote: > has been created with (relevant commands): > > set pm3d map > set isosample 1200 This is quite irrelevant for a pure data plot. > So, from the demos i don't get how the non-gridded data should be > preprocessed, But your data _is_ gridded! Or at least, it very easily could be. All it would take is for you to indicate where in your data each new block starts, by inserting a blank line. > having set dgrid3d instead of pm3d, Why "indstead of"? Those are totally separate options.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web