-
Notifications
You must be signed in to change notification settings - Fork 0
Subplot labels (gp_subplot_labels)
The script gp_subplot_labels can be used together with the module gp_fixed_sizes to create nice labels for single subplot constituting a bigger blot. These labels can be used in the caption for referencing the single plots.
Before loading gp_subplot_labels.gp, be sure to have called gp_fixed_sizes before!
The subplot labels can be loaded with the commad
load "gp_subplot_labels.gp"in the preamble of your plot.
After loading the script, you can modify some default settings. To set the background-color of the label (default is black), specify
gpsl_background_color = "#123456"The color of the labels (default is white) can be specified by
gpsl_font_color = "#FEDCBA"For using subplot labels with fixed units, the script gp_fixed_sizes.gp has to be used with units.
To use subplot labels with width and height as well as the margins given in the same units as the plot size (e.g. cm), use one of the following four functions:
subplot_label = gpsl_bottom_left(label, unit_size, unit_margin); eval subplot_label;
subplot_label = gpsl_bottom_right(label, unit_size, unit_margin); eval subplot_label;
subplot_label = gpsl_top_left(label, unit_size, unit_margin); eval subplot_label;
subplot_label = gpsl_top_right(label, unit_size, unit_margin); eval subplot_label;All four functions take the following three parameters:
-
label: Text to write into the label -
unit_size: Height and width of the label background -
unit_margin: Horizontal and vertical distance of the label background to the plot boundaries
The second options is to use subplot labels with screen coordinates. Therefore you can use one of the following functions:
subplot_label = gpsl_bottom_left_screen(label, screen_size_x, screen_size_y, screen_margin_x, screen_margin_y); eval subplot_label;
subplot_label = gpsl_bottom_right_screen(label, screen_size_x, screen_size_y, screen_margin_x, screen_margin_y); eval subplot_label;
subplot_label = gpsl_top_left_screen(label, screen_size_x, screen_size_y, screen_margin_x, screen_margin_y); eval subplot_label;
subplot_label = gpsl_top_right_screen(label, screen_size_x, screen_size_y, screen_margin_x, screen_margin_y); eval subplot_label;All four functions take the following five parameters:
-
label: Text to write into the label -
screen_size_x: Width of the label background in screen coordinates -
screen_size_y: Height of the label background in screen coordinates -
screen_margin_x: Horizontal distance of the label background to the plot boundary in screen coordinates -
screen_margin_y: Horizontal distance of the label background to the plot boundary in screen coordinates