d = New DPLOT
d.Initialize()
d.Version = DPLOT_DDE_VERSION
d.DataFormat = DATA_XYXY
d.MaxCurves = 2 ' Must be >= number of curves we plot
d.MaxPoints = N ' Anything >= N will do
d.NumCurves = 2
d.ScaleCode = SCALE_TRIANGLE_PLOT
d.LegendX = 0.05
d.LegendY = 0.05
d.NP(0) = N
d.LineType(0) = LINESTYLE_SOLID
d.LineType(1) = LINESTYLE_LONGDASH
d.Title1 = "Data sent to DPlot via DPLOTLIB.DLL"
d.XAxis = "x"
d.YAxis = "y"
DocNum = DPlot_Plot8(s, x(0), y(0), cmds)
As you can see it is based on the sample code.
I think the problem is with either my arrays or the DataFormat.
Thanks for that, I have now got it all working with multiple curves.
Heres my current code for future reference
But I have another question I am trying to implement a system where the colour gets darker gradually through the curves, the other option is for the opacity to gradually go from 100 to 0.
I havent been able to get this up and running properly yet is there any chance you could give me some pointers.
I have been using this thread for pointers but couldnt get it to work http://www.dplot.com/forums/viewtopic.p ... stomcolors
BTW I noticed some where that opacity wasnt passed to metafiles which I think might affect me unless there is a way around that.
SymbolOpacity doesn't work on metafiles - only displays, bitmaps, and printed graphs. There are two reasons DPlot ignores this setting for metafiles: 1) the symbols are drawn device unit by device unit and the "unit" for metafiles is very small - so drawing things this way would yield a very large metafile. Probably more importantly 2) opacity means blending with the background (whatever background happens to be there) and there is no way to retrieve information about the background for a metafile. The only way I could possibly make this work is to throw out one of the primary features of metafiles - a transparent background - and create a large (very, very large) bitmap.