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


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

Create 3D plot with multiple Z-Axis and missing data point

Started bymryan80g@gmail.com
First post2015-11-13 03:52 -0800
Last post2015-11-13 16:25 +0100
Articles 2 — 2 participants

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


Contents

  Create 3D plot with multiple Z-Axis and missing data point mryan80g@gmail.com - 2015-11-13 03:52 -0800
    Re: Create 3D plot with multiple Z-Axis and missing data point Karl Ratzsch <mail.kfr@gmx.net> - 2015-11-13 16:25 +0100

#3127 — Create 3D plot with multiple Z-Axis and missing data point

Frommryan80g@gmail.com
Date2015-11-13 03:52 -0800
SubjectCreate 3D plot with multiple Z-Axis and missing data point
Message-ID<a8cb1ca2-10d4-4810-b832-dd438fb9a136@googlegroups.com>
Hello,

I have problem to create 3D plot from .csv file. Within the file, it has multiple columns with thousands of different data. 

Example:-

[x]         [y]         [dataA]         [dataB]
1           1             10               12
1           2             12               14
1           3             15               17
.           .              .                .
.           .              .                .
2           1             33               40
2           2             30               24
.           .              .                .
.           .              .                .
3           1             23               33
.           .              .                .
.           .              .                .


Lets says I want to plot 3D graph with multiple Z-Axis (dataA & dataB); and the X-Axis and Y-Axis have similar range (e.g. 0~500 with 1-step).

The problem with my data, it is not complete and have different size - dataA and dataB does not have 500x500 = 250000 data point.

So, it is possible to generate the graph and assign the missing data with empty value/plot.

Thank you. Hope you guys could help me with this problem.

Sincerely,

Raihaan               

[toc] | [next] | [standalone]


#3128

FromKarl Ratzsch <mail.kfr@gmx.net>
Date2015-11-13 16:25 +0100
Message-ID<n24vdp$ocq$1@solani.org>
In reply to#3127
Am 13.11.2015 um 12:52 schrieb mryan80g@gmail.com:
> Hello,
> 
> I have problem to create 3D plot from .csv file. Within the file, it
> has multiple columns with thousands of different data.
> 
> Lets says I want to plot 3D graph with multiple Z-Axis (dataA &
> dataB); and the X-Axis and Y-Axis have similar range (e.g. 0~500 with
> 1-step).
> 
> The problem with my data, it is not complete and have different size
> - dataA and dataB does not have 500x500 = 250000 data point.
> 
> So, it is possible to generate the graph and assign the missing data
> with empty value/plot.

(cvs means Comma Separated Values, you have no commas in your file)

do you mean your file has 500x500 x,y values, but one or both of
dataA,dataB might be missing?

In that case it's simple, provided there is a "missing" symbol wherever
a value is missing.

default(x,y) = 100   # for example
splot '-' using 1:2:(strcol(3) eq '-' ? default($1,$2) : $3)
1 1 1.3 3.2
1 2 1.4 -
1 3 1.1 3.1
2 1 -   2.2
2 2 1.5 2.7
2 3 1.4 2.9
3 1 -   -
3 2 1.6 3.0
3 3 1.1 2.8
e


Otherwise it is also simple, you can let gnuplot interpolate the missing
values. Check "help dgrid3d" on how to set this up.
(you can also use dgrid3d if you have a "missing" symbol in you data
file, but you cannot give a default value then)

[toc] | [prev] | [standalone]


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


csiph-web