Platforms to show: All Mac Windows Linux Cross-Platform
Required plugins for this example: MBS ChartDirector Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /ChartDirector/threedscatter2
This example is the version from Fri, 2nd Aug 2012.
Project "threedscatter2.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
EventHandler Sub Open()
// The XYZ data for the 3D scatter chart as 3 random data series
dim r as new CDRanSeriesMBS(3)
dim xData() as double = r.getSeries(20, 100, -10, 10)
dim yData() as double = r.getSeries(20, 100, -10, 10)
dim zData() as double = r.getSeries(20, 100, -10, 10)
// Create a ThreeDScatterChart object of size 720 x 520 pixels
dim c as new CDThreeDScatterChartMBS(720, 520)
// Add a title to the chart using 20 points Times New Roman Italic font
call c.addTitle("3D Scatter Chart (2) ", "timesi.ttf", 20)
// Set the center of the plot region at (350, 240), and set width x depth x
// height to 360 x 360 x 270 pixels
c.setPlotRegion(350, 240, 360, 360, 270)
// Set the elevation and rotation angles to 15 and 30 degrees
c.setViewAngle(15, 30)
// Add a scatter group to the chart using 13 pixels glass sphere symbols, in
// which the color depends on the z value of the symbol
dim g as cdThreeDScatterGroupMBS = c.addScatterGroup(xData, yData, zData, "", c.kGlassSphere2Shape, 13, c.kSameAsMainColor)
// Add grey (888888) drop lines to the symbols
g.setDropLine(&c888888)
// Add a color axis (the legend) in which the left center is anchored at (645,
// 220). Set the length to 200 pixels and the labels on the right side. Use
// smooth gradient coloring.
dim a as CDColorAxisMBS = c.setColorAxis(645, 220, c.kLeft, 200, c.kRight)
a.setColorGradient()
// Set the x, y and z axis titles using 10 points Arial Bold font
call c.xAxis().setTitle("X-Axis Place Holder", "arialbd.ttf", 10)
call c.yAxis().setTitle("Y-Axis Place Holder", "arialbd.ttf", 10)
call c.zAxis().setTitle("Z-Axis Place Holder", "arialbd.ttf", 10)
// Output the chart
Backdrop=c.makechartPicture
End EventHandler
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project
The items on this page are in the following plugins: MBS ChartDirector Plugin.