Plotting a 3d surface from an array of data

Have a suggestion for improving DPlot or a question about existing features? Let us know

Moderator: DPlotAdmin

Post Reply
breeds2000
Posts: 3
Joined: Tue Mar 15, 2005 10:16 am

Plotting a 3d surface from an array of data

Post by breeds2000 »

Hello,
I have an array of 70 rows and several hundred columns of data. I'm trying to graph it but can't seem to get dplot to read the data correctly. Probably missed something obvious because excel's graphing tool automatically creates the surface after choosing the 3d surface option. My data looks something like this:
1.2399 1.9485 2.3559 2.5961
1.2857 2.0167 2.4352 2.681
1.3317 2.0849 2.5142 2.7654
1.3779 2.1531 2.593 2.8493
1.4242 2.2212 2.6714 2.9328
1.4707 2.2893 2.7496 3.0157

where the top left entry is the z-value at x=0 and y=0 and the top right value is the z-value at x=3 and y=0 and so on.

Thanks for your time,

Brian :oops:
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

There aren't any file or clipboard formats matching what you have that DPlot supports. I can fairly easily to put together a file import plugin to handle this, but first...
I assume from your description that the X and Y extents aren't specified in the file and that the points are evenly spaced in the X and Y directions. Correct? If not please give a bit more info about what's in the file and where. If the extents aren't included in the file then DPlot will either have to 1) ask you for the extents every time you open one of these files or 2) auto-generate them, starting at X,Y=0,0 and incrementing by 1 for every row/column.
Visualize Your Data
support@dplot.com
breeds2000
Posts: 3
Joined: Tue Mar 15, 2005 10:16 am

re: 3d surface plot - information

Post by breeds2000 »

hello again,

The data points are evenly spaced in the x and y directions and there are no x and y points initially so dplot will need to make them like you say.

Does that help?

Thanks,

Brian
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Yes. I'll try to put together a file import plugin in the next few days and let you know when it is available.
Visualize Your Data
support@dplot.com
breeds2000
Posts: 3
Joined: Tue Mar 15, 2005 10:16 am

Post by breeds2000 »

Much appreciated,

Brian
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Brian,
Sorry for the delay; I've allowed myself to get distracted by other things.

Right click on this link and select "Save Target As". Unzip the file with ztable.dll going to the \plugins\fileimport folder below DPlot. The other file, ztable_example.txt, is an example data file that will work with this plugin.

Data values should be arranged as shown on the input dialog for the plugin:

z(x1,y1), z(x2,y1),..., z(xn,y1)
z(x1,y2), z(x2,y2),..., z(xn,y2)
...
z(x1,ym), z(x2,ym),..., z(xn,ym)

where n is the number of columns (x values) and m is the number of rows (y values). Data values can be separated by commas, spaces, or tabs. The 4th column, 4th row value in the example is intentionally omitted to demonstrate that blank values are allowed (but in this case you must use commas or tabs to separate values).

I need to add more error-checking before making this "official" but wanted to get your input on whether this suits your needs.
Visualize Your Data
support@dplot.com
Post Reply