plotSetLegendTitle#

Purpose#

Controls the legend title.

Format#

plotSetLegendTitle(&myPlot, title)#
Parameters:
  • &myPlot (struct pointer) – A plotControl structure pointer

  • title (string) – Title to be displayed in the legend.

Examples#

_images/plotsetlegendtitle-cr.jpg
new;

// Declare plotControl structure
struct plotControl myPlot;

// Initialize plotControl structure
myPlot = plotGetDefaults("scatter");

// Set labels, location, and orientation of legend
label = "A"$|"B";
plotSetLegend(&myPlot, label);

// Set font of legend
plotSetLegendTitle(&myPlot, "Samples");

// Create data
x = rndn(30, 2);
y = rndn(30, 2);

// Plot the data with the legend settings
plotScatter(myplot, x, y);