SetAxisTitles function adds two text axis titles to X & Y scale locations.
Note:
Plotting area in this image used the SetPlotArea function to control how much space around the image would be provided for scale values and the addition of the axis titles. Axis titles are displayed without a problem, but if the x-axis scale values are converted to dates, the additional space needed by the data labels might cause some or all of the the x-axis title name to be obscured. When that happens, increase the plot area pixel size of the last value parameter on the right. Rotating scales using the "Vertical" option will also require plot area size location changes.
' Size the Scatter Dot Ploting area chart.SetPlotArea( 20, 50, 40, 55 )
' Place the X-Axis scale label "Temperature" in the left corner. ' Place the Y-Axis label "Humidity" in the lower right corner. chart.SetAxisTitles("Temperature","Humidity") ' Place the series of 100 dots positioned at element coordinates ' x & y using the BPV "Randomx" element values. chart.AddScatter(AsSeries( randomx ),AsSeries( randomy ), iNumber, 7, 6 ) ' Place the series of 100 dots positioned at element coordinates ' x & y using the BPV "House2x" element values. chart.AddScatter(AsSeries( house2x ),AsSeries( house2y ), iNumber, 3, 10 ) ' Create & Save this new chart as a file. ' Always add a backSlash Character after "resultsReportPath" chart.Make(test.resultsReportPath+"\"+"Scatter.png")
Returns - 1:
Click to Enlarge; Click to Reduce.
Example - 2:
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ' SCATTER CHART - x-Axis At Chart Left Size - Axis Rotated ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ' Establish Scatter Chart image size iChartWidth = 500 ' X-Axis Width iChartHeight = 300 ' Y-Axis Height ' Create a image chart.NewXY("Scatter", iChartWidth, iChartHeight, "Vertical") ' Size the Scatter Dot Ploting area chart.SetPlotArea( 50, 20, 50, 40 ) ' Place the X-Axis scale label "Temperature" in the left corner. ' Place the Y-Axis label "Humidity" in the lower right corner. chart.SetAxisTitles("Temperature","Humidity") ' Place the series of 100 dots positioned at element coordinates ' x & y using the BPV "Randomx" element values. chart.AddScatter(AsSeries( randomx ),AsSeries( randomy ), iNumber, 7, 6 ) ' Place the series of 100 dots positioned at element coordinates ' x & y using the BPV "House2x" element values. chart.AddScatter(AsSeries( house2x ),AsSeries( house2y ), iNumber, 3, 10 ) ' Create & Save this new chart as a file. ' Always add a backSlash Character after "resultsReportPath" chart.Make(test.resultsReportPath+"\"+"Scatter.png")