View previous topic :: View next topic |
Author |
Message |
thorthebrave
Joined: 09 Nov 2009 Posts: 9
|
Posted: Mon Nov 23, 2009 11:51 am Post subject: XYYY plot problems with number of points |
|
|
I have 151 y points, Line[0] has 51, Line[1] has 50 and Line[2] has 50
dp.NP[0] = 51;
dp.NP[1] = 50;
dp.NP[2] = 50;
but the 51 makes the plot flash. If I change 51 to 50, such that they are all 50
dp.NP[0] = 50;
dp.NP[1] = 50;
dp.NP[2] = 50;
then it plots, but that means that the 51 point that should have been in Line[0], is now the first point of Line[1], and etc.
Here is the rest of the code
public void XYThisplot(double[] x,double[] y)
{
dplot.DPlot_FindDPLOTLIB();
int DocNum;
int NP;
string cmds;
NP = y.Length;
dplot.DPLOT dp = new dplot.DPLOT();
dp.Initialize();
dp.Version = dplot.DPLOT_DDE_VERSION;
dp.DataFormat = dplot.DATA_XYYY;
dp.MaxCurves = 3; // Must be >= number of curves we plot
dp.MaxPoints = NP; // Anything >= NP will do
dp.NumCurves = 3;
dp.ScaleCode = dplot.SCALE_LINEARX_LINEARY;
dp.LegendX = 0.05F;
dp.LegendY = 0.05F;
dp.NP[0] = 51;
dp.NP[1] = 50;
dp.NP[2] = 50;
dp.LineType[0] = dplot.LINESTYLE_SOLID;
dp.LineType[1] = dplot.LINESTYLE_DOTTED;
dp.LineType[2] = dplot.LINESTYLE_LONGDASH;
dp.Title1 = "Pressure (psi) along the well (ft)";
dp.XAxis = "Along the wellbore (ft)";
dp.YAxis = "Pressure (psi)";
cmds = "[AutoScale()]" +
"[Caption(\"Pressure vs. Distance\")]" +
"[Legend(1,\"Blank Pipe\")][Legend(2,\"Annulus\")][Legend(3,\"Sandface\")]" +
"[DocMaximize()][ClearEditFlag()]";
DocNum = dplot.DPlot_Plot8(ref dp, ref x[0], ref y[0], cmds);
Any idea what is might be |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Mon Nov 23, 2009 1:07 pm Post subject: |
|
|
You'll need to use
dp.DataFormat = dplot.DATA_XYXY;
and duplicate your X array twice (minus that 51st value). _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
thorthebrave
Joined: 09 Nov 2009 Posts: 9
|
Posted: Mon Nov 23, 2009 3:25 pm Post subject: thank you |
|
|
That solved it, thank you so much.
Do you have any documentation for sending data through dlib,
I'd like some information on what all the different commands are, and all the different dp. properties and so on. I Have gone through you download manual, but it is not very extensive on the dlib part. |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Mon Nov 23, 2009 3:56 pm Post subject: |
|
|
Look in the \docs folder below dplotlib.dll. _________________ 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
|