help-octave
[Top][All Lists]

## Re: Scatter Plotting

 From: Doug Stewart Subject: Re: Scatter Plotting Date: Fri, 10 Jun 2016 12:44:43 -0400

On Fri, Jun 10, 2016 at 12:06 PM, Stephen H. Dawson wrote:
Hi,

Working on this effort to use worksheet data to feed into a
three-dimensional cube graph.

I have an ODS worksheet with data formatted as numeric in three columns

http://wiki.octave.org/IO_package#ODS_support

I understand I am loading the data into a memory variable called A.

I have looked at working examples of  three-dimensional cube graph.

I am unclear how to feed memory variable A to the syntax.

WORKING DIRECTORY:
>> ls -la *.ods
-rw-r--r-- 1 stephen stephen 10612 Jun 10 11:54 CubeGraphing.ods
-rw-r--r-- 1 stephen stephen 27218 Feb 18 11:30 Quadrant Graphing.ods
>>

FUNCTIONAL SYNTAX:
clf;
x = rand (20,1);  y = rand (20,1);  z = rand (20,1);
scatter3 (x(:), y(:), z(:), 20*z(:), z(:), 's');
title ({'scatter3() plot', ...
'marker is square, size and color determined by Z'});

DEVELOPMENTAL SYNTAX:
clf;
A = odsread ('./CubeGraphing.ods', 'Data', 'C2:E5');

Try this:

x=A(:,1);
y=A(:,2);
z=A(:,3);
scatter3 (x(:), y(:), z(:), [], z(:));

[x, y, z] = peaks (20);
scatter3 (x(:), y(:), z(:), [], z(:));

How do I call memory variable A into the data array and list?

Am I correct I list with the scatter3 function?

Thank You,
Stephen H. Dawson
(865) 804-3454