My scaleMode is "3 - Pixel", I messed around with some of the other options for scaleMode, and none of them changed anything for the better. Instead of sending the source code, which is rather large, I will just copy the section you would need to reproduce the plot.
And like I said, I've gotten it to work through my "hack", so there is no need to waste too much time, when it more likely is just something I am doing wrong. But I appreciate the efforts you have taken already, and any further as well.
Code: Select all
d.version = DPLOT_DDE_VERSION
d.hwnd = vForm.hwnd
d.DataFormat = DATA_XYXY
d.MaxCurves = 1 ' Must be >= number of curves we plot
d.MaxPoints = NP ' Anything >= NP will do
d.NumCurves = 1
d.ScaleCode = SCALE_LINEARX_LINEARY
d.NP(0) = NP
d.LineType(0) = LINESTYLE_SOLID
d.Title1 = "test"
d.title2 = cstr(now)
d.title3 = ""
d.XAxis = "wavelength (nm)" & Chr$(0)
d.YAxis = "Intensity" & Chr$(0)
cmds = "[ManualScale(350,0,1050,21219)]"
cmds = cmds & "[TickInterval(0,0,0)]"
cmds = cmds & "[Color(-1,255,0,0)]"
cmds = cmds & "[LineWidth(-2,20)]" 'curve width
cmds = cmds & "[LineWidth(-1,20)]" 'coord axes width
cmds = cmds & "[LineWidth(0,10)]" 'grid line width
'[TextFont(Index,Points,Weight,Italic,R,G,B,"Face")]
cmds = cmds & "[TextFont(1, 8, 0,0,0,0,0,""Arial"")]" 'numbers along the axes
cmds = cmds & "[TextFont(2,8,700,0,0,0,0,""Arial"")]" 'first title line
cmds = cmds & "[TextFont(3,8,700,0,0,0,0,""Arial"")]" '2nd and 3rd title line
cmds = cmds & "[TextFont(4,10, 0,0,0,0,0,""Arial"")]" 'X Axis Label
cmds = cmds & "[TextFont(5,10, 0,0,0,0,0,""Arial"")]" 'Y Axis Label
cmds = cmds & "[TextFont(6, 8, 0,0,0,0,0,""Arial"")]" 'Legend
cmds = cmds & "[TextFont(7, 8, 0,0,0,0,0,""Arial"")]" 'Notes
cmds = cmds & "[TextFont(8, 8, 0,0,0,0,0,""Arial"")]" 'Z Axis Label
cmds = cmds & "[GridLines(2)]"
cmds = cmds & "[ClearEditFlag()]"
If (hemf <> 0) Then
ret = DeleteEnhMetaFile(hemf)
hemf = 0
End If
If (hBitmap <> 0) Then
ret = DeleteObject(hBitmap)
hBitmap = 0
End If
DocNum = DPlot_Plot(d, X(0), Y(0), cmds)
If (DocNum > 0) Then
hemf = DPlot_GetEnhMetaFile(DocNum, SizeX, SizeY)
DPM.SIZE = Len(DPM)
hBitmap = DPlot_GetBitmapEx(DocNum, rcPic.Right - rcPic.Left, rcPic.Bottom - rcPic.Top, DPM)
ret = DPlot_Command(DocNum, "[FileClose()]")
End If
Call Graph_Paint(vPictureBox)