Creating a contour image from .csv

Q&A for C, C++, and/or C# developers using DPlot

Moderator: DPlotAdmin

Post Reply
Jack32
Posts: 3
Joined: Wed Jun 13, 2012 10:25 am

Creating a contour image from .csv

Post by Jack32 »

I'm new to DPlot and need some assistance.

I am currently using the DPlot evaluation to make sure it can do what I need it to before we purchase it.
I am using Visual Studio 2010 and coding in C#.

I have a .csv file that has approximately 100 different x, y, and z coordinates I need to create a contour image of the points. I know I can do this because I was able to open and load the points from DPlot. I am looking to create an application in visual studio that will allow a user to select a .csv file and then it creates a contour image on the screen. I am having trouble using DPlot with C#.

All assistance is greatly appreciated
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

If you have all the DPLOTLIB distribution files, I'd suggest starting with dplotlib\csharp\test2 and plugging in code to read a file rather than generating it within the program. Please let me know if you have any problems.
Visualize Your Data
support@dplot.com
Jack32
Posts: 3
Joined: Wed Jun 13, 2012 10:25 am

Post by Jack32 »

Where would I plug in the code to load the file?
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

As the first step, before assigning things like the number of points, etc.
Visualize Your Data
support@dplot.com
Jack32
Posts: 3
Joined: Wed Jun 13, 2012 10:25 am

Post by Jack32 »

I looked and have attempted to plot the data but have been unsuccessful so far. I can load my data and put all the points in separate arrays. After that I am not sure what to do with the values to plot a contour map or 3d scatter plot?

I have my data in three arrays Xarray[], Yarray[], Zarray[];
I have been trying to use DPlot_Plot8() to plot my arrays but I can't get it to work.
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Take another look at the test2 demo in

Code: Select all

private void button2_Click
It is easiest to use a 2D array as is done in the demo. If you need/want a single dimension, then X0 goes to Array[0], Y0 to Array[1], Z0 to Array[2], X1 to Array[3], etc.
Visualize Your Data
support@dplot.com
Post Reply