Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathexample2.vb
More file actions
Latest commit
33 lines (30 loc) · 1.15 KB
/
Copy pathexample2.vb
File metadata and controls
33 lines (30 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
ModuleExample2
SubMain2(argsAsString())
DimseriesAsScatterPlotSeries=GetDefaultScatterPlotSeriesSettings()
series.xs={-2,-1,0,1,2}
series.ys={2,-1,-2,-1,2}
series.linearInterpolation=true
series.lineType="dashed"
series.lineThickness=2
series.color=GetGray(0.3)
DimsettingsAsScatterPlotSettings=GetDefaultScatterPlotSettings()
settings.width=800
settings.height=600
settings.autoBoundaries=true
settings.autoPadding=true
settings.title="x^2 - 2"
settings.xLabel="X axis"
settings.yLabel="Y axis"
settings.scatterPlotSeries={series}
DimimageReferenceAsRGBABitmapImageReference=CreateRGBABitmapImageReference()
DimerrorMessageAsStringReference=NewStringReference()
DimsuccessAsBoolean=DrawScatterPlotFromSettings(imageReference,settings,errorMessage)
Ifsuccess
Dimpngdataasdouble()=ConvertToPNG(imageReference.image)
CallWriteToFile(pngdata,"example2.png")
CallDeleteImage(imageReference.image)
Else
Console.Error.WriteLine(errorMessage.stringx)
EndIf
EndSub
EndModule