XYYY plot problems with number of points
Posted: Mon Nov 23, 2009 11:51 am
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
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