View previous topic :: View next topic |
Author |
Message |
PCJimmmy
Joined: 12 Jan 2009 Posts: 12
|
Posted: Mon Jan 12, 2009 3:53 pm Post subject: Initial contour data is 0,0,0 rather than my data. |
|
|
I built a VB.2008 application based on the VB project1 example. I create the dataset of values. When Dpot generates the contour plot my initial data value becomes the 2nd data item, with 0,0,0 as the first. I have confirmed that i is equal to zero when the first node values are set.
code for setting the node values is
Node(i, 0) = yy
Node(i, 1) = J
Node(i, 2) = ROC
i = i + 1
241, 482 and 0.5 are the values for i = 0 with the plot I am generating.
After all the node values are created I generate the contour plot.
cmds = "[Caption(" & Chr(34) & "Reflective Distortion " & Chr(34) & ")]"
cmds = cmds & "[ContourAxes(1)][ContourGrid(0)][ContourLevels(20,0,1)][ContourMethod(0)]"
cmds = cmds & "[FontPoints(1,10)][FontPoints(6,10)][DocMaximize()]"
cmds = cmds & "[ZAxisLabel(" & Chr(34) & "z" & Chr(34) & ")]"
ret = DPlot_Plot8(d, 0, Node(0, 0), cmds)
When the plot is generated the first set of data points is 0,0,0 with the 2nd set being my values of 241, 482, 0.5. In Dplot I can of course delete that first row (edit data) and get the correct contour plot - but I sure don't want to have to manualy delete that row for every plot I generate.
How do I avoid that first data point set being 0,0,0 ? |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Mon Jan 12, 2009 11:34 pm Post subject: |
|
|
Just a guess, but my guess is that all of your X values are greater than 0, and you're initializing 1 less than d.MaxPoints triplets. DPlot initially sorts your data in ascending X, then Y, then Z order to speed up several operations. So if all of your X values are > 0 you'd get 0,0,0 for the first point. _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
PCJimmmy
Joined: 12 Jan 2009 Posts: 12
|
Posted: Tue Jan 13, 2009 12:01 am Post subject: You Nailed It |
|
|
All values were greater than 0 - a lot of them were 0 so I did have the option to make one of them negitive, but did not need to go to that workaround.
I am processing photographic images so my d.maxpoints was set to the width*height of the image. But I don't act on all the pixels in the image or want to plot them, in fact, only plotting about 1/2 them. So my number of values in the dataset was a whole lot less than d.maxpoints. Since I do know how many datavalues I have (i), changing the d.maxpoints assignment to the following did the trick.
d.maxpoints = i
Thanks for the help |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Tue Jan 13, 2009 12:26 am Post subject: |
|
|
You're welcome, and I'm glad this worked out.
Just to clarify on what I said previously, and which didn't occur to me until I saw this: "So my number of values in the dataset was a whole lot less than d.maxpoints. ": DPlot will throw away points with identical X & Y values, keeping the maximum Z. So you'd only ever see one (0,0,0) regardless of how many points fewer than d.Maxpoints you were initializing. _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|