#include "plplotP.h"
Go to the source code of this file.
Defines | |
#define | adopted_to_subpage_x(nx) ( ( xdmin_adopted ) + ( nx ) * ( ( xdmax_adopted ) - ( xdmin_adopted ) ) ) |
#define | subpage_to_adopted_x(nx) ( ( nx - xdmin_adopted ) / ( ( xdmax_adopted ) - ( xdmin_adopted ) ) ) |
#define | adopted_to_subpage_y(ny) ( ( ydmin_adopted ) + ( ny ) * ( ( ydmax_adopted ) - ( ydmin_adopted ) ) ) |
#define | subpage_to_adopted_y(ny) ( ( ny - ydmin_adopted ) / ( ( ydmax_adopted ) - ( ydmin_adopted ) ) ) |
#define | max_opts 25 |
Functions | |
static void | plgvpsp (PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax) |
static void | legend_position (PLINT position, PLFLT legend_width, PLFLT legend_height, PLFLT *x_legend_position, PLFLT *y_legend_position, PLFLT *xsign, PLFLT *ysign) |
static void | get_subpage_per_mm (PLFLT *x_subpage_per_mm, PLFLT *y_subpage_per_mm) |
static PLFLT | get_character_or_symbol_height (PLBOOL ifcharacter) |
void | c_pllegend (PLFLT *p_legend_width, PLFLT *p_legend_height, PLINT opt, PLINT position, PLFLT x, PLFLT y, PLFLT plot_width, PLINT bg_color, PLINT bb_color, PLINT bb_style, PLINT nrow, PLINT ncolumn, PLINT nlegend, const PLINT *opt_array, PLFLT text_offset, PLFLT text_scale, PLFLT text_spacing, PLFLT text_justification, const PLINT *text_colors, const char **text, const PLINT *box_colors, const PLINT *box_patterns, const PLFLT *box_scales, const PLINT *box_line_widths, const PLINT *line_colors, const PLINT *line_styles, const PLINT *line_widths, const PLINT *symbol_colors, const PLFLT *symbol_scales, const PLINT *symbol_numbers, const char **symbols) |
static void | remove_characters (char *string, const char *characters) |
static void | draw_cap (PLBOOL if_edge, PLINT orientation, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT color) |
static void | draw_box (PLBOOL if_bb, PLINT opt, const char *axis_opts, PLBOOL if_edge, PLFLT ticks, PLINT sub_ticks, PLINT n_values, const PLFLT *values) |
static void | draw_label (PLBOOL if_bb, PLINT opt, const char *label) |
static void | calculate_limits (PLINT position, PLFLT x, PLFLT y, PLFLT xdmin_adopted, PLFLT xdmax_adopted, PLFLT ydmin_adopted, PLFLT ydmax_adopted, PLFLT prior_bb_height, PLFLT *p_colorbar_width_bb, PLFLT *p_colorbar_height_bb, PLFLT *p_colorbar_width_ac, PLFLT *p_colorbar_height_ac, PLFLT *p_plot_x_subpage_bb, PLFLT *p_plot_y_subpage_bb, PLFLT *p_dx_subpage, PLFLT *p_dy_subpage) |
void | c_plcolorbar (PLFLT *p_colorbar_width, PLFLT *p_colorbar_height, PLINT opt, PLINT position, PLFLT x, PLFLT y, PLFLT x_length, PLFLT y_length, PLINT bg_color, PLINT bb_color, PLINT bb_style, PLFLT low_cap_color, PLFLT high_cap_color, PLINT cont_color, PLINT cont_width, PLFLT ticks, PLINT sub_ticks, const char *axis_opts, const char *label, PLINT n_values, const PLFLT *values) |
Legend routines.
Definition in file pllegend.c.
#define adopted_to_subpage_x | ( | nx | ) | ( ( xdmin_adopted ) + ( nx ) * ( ( xdmax_adopted ) - ( xdmin_adopted ) ) ) |
Convert from adopted X coordinate to normalized subpage X coordinate. The *_adopted variables are the normalized subpage limits of the adopted viewport which is either the external viewport (PL_POSITION_VIEWPORT bit set in the position parameter) or the subpage itself (PL_POSITION_SUBPAGE bit set in the position parameter, in which case this is an identity transform). See pllegend documentation for more details concerning the adopted coordinates.
nx | Adopted X coordinate. |
Definition at line 345 of file pllegend.c.
#define adopted_to_subpage_y | ( | ny | ) | ( ( ydmin_adopted ) + ( ny ) * ( ( ydmax_adopted ) - ( ydmin_adopted ) ) ) |
Convert from adopted Y coordinate to normalized subpage Y coordinate. The *_adopted variables are the normalized subpage limits of the adopted viewport which is either the external viewport (PL_POSITION_VIEWPORT bit set in the position parameter) or the subpage itself (PL_POSITION_SUBPAGE bit set in the position parameter, in which case this is an identity transform). See pllegend documentation for more details concerning the adopted coordinates.
ny | Adopted Y coordinate. |
Definition at line 375 of file pllegend.c.
#define max_opts 25 |
#define subpage_to_adopted_x | ( | nx | ) | ( ( nx - xdmin_adopted ) / ( ( xdmax_adopted ) - ( xdmin_adopted ) ) ) |
Convert from normalized subpage X coordinate to adopted X coordinate. The *_adopted variables are the normalized subpage limits of the adopted viewport which is either the external viewport (PL_POSITION_VIEWPORT bit set in the position parameter) or the subpage itself (PL_POSITION_SUBPAGE bit set in the position parameter, in which case this is an identity transform). See pllegend documentation for more details concerning the adopted coordinates.
nx | Normalized subpage X coordinate. |
Definition at line 360 of file pllegend.c.
#define subpage_to_adopted_y | ( | ny | ) | ( ( ny - ydmin_adopted ) / ( ( ydmax_adopted ) - ( ydmin_adopted ) ) ) |
Convert from normalized subpage Y coordinate to adopted Y coordinate. The *_adopted variables are the normalized subpage limits of the adopted viewport which is either the external viewport (PL_POSITION_VIEWPORT bit set in the position parameter) or the subpage itself (PL_POSITION_SUBPAGE bit set in the position parameter, in which case this is an identity transform). See pllegend documentation for more details concerning the adopted coordinates.
ny | Normalized subpage Y coordinate. |
Definition at line 390 of file pllegend.c.
void c_plcolorbar | ( | PLFLT * | p_colorbar_width, | |
PLFLT * | p_colorbar_height, | |||
PLINT | opt, | |||
PLINT | position, | |||
PLFLT | x, | |||
PLFLT | y, | |||
PLFLT | x_length, | |||
PLFLT | y_length, | |||
PLINT | bg_color, | |||
PLINT | bb_color, | |||
PLINT | bb_style, | |||
PLFLT | low_cap_color, | |||
PLFLT | high_cap_color, | |||
PLINT | cont_color, | |||
PLINT | cont_width, | |||
PLFLT | ticks, | |||
PLINT | sub_ticks, | |||
const char * | axis_opts, | |||
const char * | label, | |||
PLINT | n_values, | |||
const PLFLT * | values | |||
) |
Plot color bar for image, shade or gradient plots.
opt | This variable contains bits which control the overall colorbar. The orientation (direction of the maximum value) of the colorbar is specified with PL_COLORBAR_ORIENT_(RIGHT, TOP, LEFT, BOTTOM). If none of those bits are specified, the default orientation is toward the top, i.e., a vertical colorbar. The type of colorbar must be specified with one of PL_COLORBAR_IMAGE, PL_COLORBAR_SHADE or PL_COLORBAR_GRADIENT. If more than one of those bits is set only the first one in the above list is honored. The position of the (optional) label/title can be specified with PL_COLORBAR_LABEL_(RIGHT|TOP|LEFT|BOTTOM). If no label position bit is set then no label will be drawn. If more than one of this list of bits is specified, only the first one on the list is honored. End-caps for the colorbar can added with PL_COLORBAR_CAP_LOW and PL_COLORBAR_CAP_HIGH. If a particular colorbar cap option is not specified then no cap will be drawn for that end. As a special case for PL_COLORBAR_SHADE, the option PL_COLORBAR_SHADE_LABEL can be specified. If this option is provided then any tick marks and tick labels will be placed at the breaks between shaded segments. TODO: This should be expanded to support custom placement of tick marks and tick labels at custom value locations for any colorbar type. | |
position | This variable contains bits which control the overall position of the legend and the definition of the adopted coordinates used for positions just like what is done for the position argument for pllegend. Note, however, that the defaults for the position bits (see below) are different than the pllegend case. The combination of the PL_POSITION_LEFT, PL_POSITION_RIGHT, PL_POSITION_TOP, PL_POSITION_BOTTOM, PL_POSITION_INSIDE, and PL_POSITION_OUTSIDE bits specifies one of the 16 possible standard positions (the 4 corners and 4 side centers for both the inside and outside cases) of the legend relative to the adopted coordinate system. The adopted coordinates are normalized viewport coordinates if the PL_POSITION_VIEWPORT bit is set or normalized subpage coordinates if the PL_POSITION_SUBPAGE bit is set. Default position bits: If none of PL_POSITION_LEFT, PL_POSITION_RIGHT, PL_POSITION_TOP, or PL_POSITION_BOTTOM are set, then use PL_POSITION_RIGHT. If neither of PL_POSITION_INSIDE or PL_POSITION_OUTSIDE is set, use PL_POSITION_OUTSIDE. If neither of PL_POSITION_VIEWPORT or PL_POSITION_SUBPAGE is set, use PL_POSITION_VIEWPORT. | |
x | X offset of the legend position in adopted coordinates from the specified standard position of the legend. For positive x, the direction of motion away from the standard position is inward/outward from the standard corner positions or standard left or right positions if the PL_POSITION_INSIDE/PL_POSITION_OUTSIDE bit is set in position. For the standard top or bottom positions, the direction of motion for positive x is toward positive X. | |
y | Y offset of the legend position in adopted coordinates from the specified standard position of the legend. For positive y, the direction of motion away from the standard position is inward/outward from the standard corner positions or standard top or bottom positions if the PL_POSITION_INSIDE/PL_POSITION_OUTSIDE bit is set in position. For the standard left or right positions, the direction of motion for positive y is toward positive Y. | |
x_length | Length of the body of the colorbar in the X direction in adopted coordinates. | |
y_length | Length of the body of the colorbar in the Y direction in adopted coordinates. | |
low_cap_color | Color of the low-end color bar cap, if it is drawn. | |
high_cap_color | Color of the high-end color bar cap, if it is drawn. | |
cont_color | Contour color for PL_COLORBAR_SHADE plots. This is passed directly to plshades, so it will be interpreted according to the design of plshades. | |
cont_width | Contour width for PL_COLORBAR_SHADE plots. This is passed directly to plshades, so it will be interpreted according to the design of plshades. | |
ticks | Spacing of major ticks, as for plbox. | |
sub_ticks | Number of subticks, as for plbox. | |
axis_opts | Axis options for the colorbar's major axis, as for plbox. | |
label | Text label for the colorbar. No label is drawn if no label position is specified with one of the PL_COLORBAR_LABEL_(RIGHT|TOP|LEFT|BOTTOM) bits in opt. | |
n_values | Number of elements in the values array. | |
values | Numeric values for the data range represented by the colorbar. For PL_COLORBAR_SHADE, this should include one value per break between segments. For PL_COLORBAR_IMAGE and PL_COLORBAR_GRADIENT this includes two values, one for the maximum value on the scale and one for the minimum value. |
Definition at line 1451 of file pllegend.c.
void c_pllegend | ( | PLFLT * | p_legend_width, | |
PLFLT * | p_legend_height, | |||
PLINT | opt, | |||
PLINT | position, | |||
PLFLT | x, | |||
PLFLT | y, | |||
PLFLT | plot_width, | |||
PLINT | bg_color, | |||
PLINT | bb_color, | |||
PLINT | bb_style, | |||
PLINT | nrow, | |||
PLINT | ncolumn, | |||
PLINT | nlegend, | |||
const PLINT * | opt_array, | |||
PLFLT | text_offset, | |||
PLFLT | text_scale, | |||
PLFLT | text_spacing, | |||
PLFLT | text_justification, | |||
const PLINT * | text_colors, | |||
const char ** | text, | |||
const PLINT * | box_colors, | |||
const PLINT * | box_patterns, | |||
const PLFLT * | box_scales, | |||
const PLINT * | box_line_widths, | |||
const PLINT * | line_colors, | |||
const PLINT * | line_styles, | |||
const PLINT * | line_widths, | |||
const PLINT * | symbol_colors, | |||
const PLFLT * | symbol_scales, | |||
const PLINT * | symbol_numbers, | |||
const char ** | symbols | |||
) |
Plot legend using discretely annotated filled boxes, lines, and/or lines of symbols.
(N.B. the adopted coordinate system used for some of the parameters is defined in the documentation of the position parameter.)
p_legend_width | Pointer to a location which contains (after the call) the legend width in adopted coordinates. This quantity is calculated from the plot_width and text_offset arguments, the ncolumn argument (possibly modified inside the routine depending on the nlegend and nrow arguments), and the length (calculated internally) of the longest text string. | |
p_legend_height | Pointer to a location which contains (after the call) the legend height in adopted coordinates. This quantity is calculated from the text_scale and text_spacing arguments and the nrow argument (possibly modified inside the routine depending on the nlegend and ncolumn arguments). | |
opt | This variable contains bits which control the overall legend. If the PL_LEGEND_TEXT_LEFT bit is set, put the text area on the left of the legend and the plotted area on the right. Otherwise, put the text area on the right of the legend and the plotted area on the left. If the PL_LEGEND_BACKGROUND bit is set, plot a (semi-transparent) background for the legend. If the PL_LEGEND_BOUNDING_BOX bit is set, plot a bounding box for the legend. If the PL_LEGEND_ROW_MAJOR bit is set and both (of the possibly internally transformed) nrow > 1 and ncolumn > 1, then plot the resulting array of legend entries in row-major order. Otherwise, plot the legend entries in column-major order. | |
position | This variable contains bits which control the overall position of the legend and the definition of the adopted coordinates used for positions just like what is done for the position argument for plcolorbar. Note, however, that the defaults for the position bits (see below) are different than the plcolorbar case. The combination of the PL_POSITION_LEFT, PL_POSITION_RIGHT, PL_POSITION_TOP, PL_POSITION_BOTTOM, PL_POSITION_INSIDE, and PL_POSITION_OUTSIDE bits specifies one of the 16 possible standard positions (the 4 corners and 4 side centers for both the inside and outside cases) of the legend relative to the adopted coordinate system. The adopted coordinates are normalized viewport coordinates if the PL_POSITION_VIEWPORT bit is set or normalized subpage coordinates if the PL_POSITION_SUBPAGE bit is set. Default position bits: If none of PL_POSITION_LEFT, PL_POSITION_RIGHT, PL_POSITION_TOP, or PL_POSITION_BOTTOM are set, then the combination of PL_POSITION_RIGHT and PL_POSITION_TOP. If neither of PL_POSITION_INSIDE or PL_POSITION_OUTSIDE is set, use PL_POSITION_INSIDE. If neither of PL_POSITION_VIEWPORT or PL_POSITION_SUBPAGE is set, use PL_POSITION_VIEWPORT. | |
x | X offset of the legend position in adopted coordinates from the specified standard position of the legend. For positive x, the direction of motion away from the standard position is inward/outward from the standard corner positions or standard left or right positions if the PL_POSITION_INSIDE/PL_POSITION_OUTSIDE bit is set in position. For the standard top or bottom positions, the direction of motion for positive x is toward positive X. | |
y | Y offset of the legend position in adopted coordinates from the specified standard position of the legend. For positive y, the direction of motion away from the standard position is inward/outward from the standard corner positions or standard top or bottom positions if the PL_POSITION_INSIDE/PL_POSITION_OUTSIDE bit is set in position. For the standard left or right positions, the direction of motion for positive y is toward positive Y. | |
plot_width | Horizontal width in adopted coordinates of the plot area (where colored boxes, lines, and/or symbols are drawn in the legend). | |
bg_color | The cmap0 index of the background color for the legend (PL_LEGEND_BACKGROUND). | |
bb_color | The cmap0 index of the color of the bounding-box line for the legend (PL_LEGEND_BOUNDING_BOX). | |
bb_style | The pllsty style number for the bounding-box line for the legend (PL_LEGEND_BOUNDING_BOX). | |
nrow | Number of rows in the matrix used to render the nlegend legend entries. For internal transformations of nrow, see further remarks under nlegend. | |
ncolumn | Number of columns in the matrix used to render the nlegend legend entries. For internal transformations of ncolumn, see further remarks under nlegend. | |
nlegend | Number of legend entries. The above nrow and ncolumn values are transformed internally to be consistent with nlegend. If either nrow or ncolumn is non-positive it is replaced by 1. If the resulting product of nrow and ncolumn is less than nlegend, the smaller of the two (or nrow, if nrow == ncolumn) is increased so the product is >= nlegend. Thus, for example, the common nrow = 0, ncolumn = 0 case is transformed internally to nrow = nlegend, ncolumn = 1; i.e., the usual case of a legend rendered as a single column. | |
opt_array | Array of nlegend values of options to control each individual plotted area corresponding to a legend entry. If the PL_LEGEND_NONE bit is set, then nothing is plotted in the plotted area. If the PL_LEGEND_COLOR_BOX, PL_LEGEND_LINE, and/or PL_LEGEND_SYMBOL bits are set, the plotted area corresponding to a legend entry is specified with a colored box; a line; and/or a line of symbols. | |
text_offset | Offset of the text area from the plot area in units of character width. | |
text_scale | Character height scale for text annotations. | |
text_spacing | Vertical spacing in units of the character height from one legend entry to the next. | |
text_justification | Justification parameter used for text justification. The most common values of text_justification are 0., 0.5, or 1. corresponding to a text that is left justified, centred, or right justified within the text area, but other values are allowed as well. | |
text_colors | Array of nlegend text colors (cmap0 indices). | |
text | Array of nlegend pointers to null-terminated text annotation strings. Like other PLplot strings specified by the user, the string must be UTF-8 (including its ascii subset) and may include any of the PLplot text escapes. | |
box_colors | Array of nlegend colors (cmap0 indices) for the discrete colored boxes (PL_LEGEND_COLOR_BOX). | |
box_patterns | Array of nlegend patterns (plpsty indices) for the discrete colored boxes (PL_LEGEND_COLOR_BOX). | |
box_scales | Array of nlegend scales (units of fraction of character height) for the height of the discrete colored boxes (PL_LEGEND_COLOR_BOX). | |
box_line_widths | Array of nlegend line widths for the patterns specified by box_patterns (PL_LEGEND_COLOR_BOX). | |
line_colors | Array of nlegend line colors (cmap0 indices) (PL_LEGEND_LINE). | |
line_styles | Array of nlegend line styles (pllsty indices) (PL_LEGEND_LINE). | |
line_widths | Array of nlegend line widths (PL_LEGEND_LINE). | |
symbol_colors | Array of nlegend symbol colors (cmap0 indices) (PL_LEGEND_SYMBOL). | |
symbol_scales | Array of nlegend scale values for the symbol height (PL_LEGEND_SYMBOL). | |
symbol_numbers | Array of nlegend numbers of symbols to be drawn across the width of the plotted area (PL_LEGEND_SYMBOL). | |
symbols | Array of nlegend pointers to null-terminated strings which represent the glyph for the symbol to be plotted (PL_LEGEND_SYMBOL). Like other PLplot strings specified by the user, the string must be UTF-8 (including its ascii subset) and may include any of the PLplot text escapes. |
Definition at line 528 of file pllegend.c.
static void calculate_limits | ( | PLINT | position, | |
PLFLT | x, | |||
PLFLT | y, | |||
PLFLT | xdmin_adopted, | |||
PLFLT | xdmax_adopted, | |||
PLFLT | ydmin_adopted, | |||
PLFLT | ydmax_adopted, | |||
PLFLT | prior_bb_height, | |||
PLFLT * | p_colorbar_width_bb, | |||
PLFLT * | p_colorbar_height_bb, | |||
PLFLT * | p_colorbar_width_ac, | |||
PLFLT * | p_colorbar_height_ac, | |||
PLFLT * | p_plot_x_subpage_bb, | |||
PLFLT * | p_plot_y_subpage_bb, | |||
PLFLT * | p_dx_subpage, | |||
PLFLT * | p_dy_subpage | |||
) | [static] |
Calculate important positional limits for colorbar as a function of the current bounding box limits and prior bounding-box height. plvpor(0, prior_bb_width, 0, prior_bb_height) is called before each bounding-box calculation and this calculate_limits call, where prior_bb_width and prior_bb_height are the width and height of the prior bounding box in subpage coordinates. Thus, an arbitrary but convenient offset is given to old and new bounding box limits because the actual offset is not known until calculate_limits is finished.
Definition at line 1320 of file pllegend.c.
static void draw_box | ( | PLBOOL | if_bb, | |
PLINT | opt, | |||
const char * | axis_opts, | |||
PLBOOL | if_edge, | |||
PLFLT | ticks, | |||
PLINT | sub_ticks, | |||
PLINT | n_values, | |||
const PLFLT * | values | |||
) | [static] |
Draw box (when if_bb FALSE) around colorbar with possible tick marks, numerical labels of those tick marks, and exponent decorations of that box or else (when if_bb TRUE) calculate bounding box of that decorated box.
If | if_bb is TRUE evaluate bounding box of decorated box. If if_bb is FALSE draw the decorated box. | |
opt | Can contain the same control bits as the opt argument for plcolorbar. However, the only bits that are relevant here are PL_COLORBAR_SHADE, PL_COLORBAR_SHADE_LABEL, and PL_COLORBAR_ORIENT_(RIGHT|TOP|LEFT|BOTTOM). For full documentation of these bits, see the documentation of opt for plcolorbar. | |
axis_opts | Axis options for the colorbar's major axis, as for plcolorbar. | |
if_edge | If if_edge is TRUE (FALSE) do (do not) draw the edge of the colorbox. | |
ticks | As for plcolorbar. | |
sub_ticks | As for plcolorbar. | |
n_values | As for plcolorbar. | |
values | As for plcolorbar. |
Definition at line 1034 of file pllegend.c.
static void draw_cap | ( | PLBOOL | if_edge, | |
PLINT | orientation, | |||
PLFLT | xmin, | |||
PLFLT | xmax, | |||
PLFLT | ymin, | |||
PLFLT | ymax, | |||
PLFLT | color | |||
) | [static] |
Draw triangular end-caps for color bars.
if_edge | If if_edge is true/false, draw an edge/no edge around the triangle. | |
orientation | This variable defines the orientation of the triangle. The triangle points to the right, up, left, or down if orientation contains PL_COLORBAR_ORIENT_RIGHT, PL_COLORBAR_ORIENT_TOP, PL_COLORBAR_ORIENT_LEFT, or PL_COLORBAR_ORIENT_BOTTOM bits. | |
xmin | Minimum world X coordinate of rectangle inscribing the triangle. | |
xmax | Maximum world X coordinate of rectangle inscribing the triangle. | |
ymin | Minimum world Y coordinate of rectangle inscribing the triangle. | |
ymax | Maximum world Y coordinate of rectangle inscribing the triangle. | |
color | Color (color palette 1) used to fill the end cap. |
Definition at line 945 of file pllegend.c.
Draw label (when if_bb FALSE) with appropriate position relative to the "inner" bounding-box of the decorated box around the colorbar or else (when if_bb TRUE) calculate combined bounding box of that label + decorated box.
if_bb | If if_bb is TRUE evaluate bounding box of combined decorated box + label. If if_bb is FALSE draw the label. | |
opt | Can contain the same control bits as the opt argument for plcolorbar. However, the only bits that are relevant here are PL_COLORBAR_CAP_LOW, PL_COLORBAR_CAP_HIGH, PL_COLORBAR_ORIENT_(RIGHT|TOP|LEFT|BOTTOM), and PL_COLORBAR_LABEL_(RIGHT|TOP|LEFT|BOTTOM). For full documentation of these bits, see the documentation of opt for plcolorbar. | |
cap_extent | Extent of cap in normalized subpage coordinates in either X or Y direction as appropriate. | |
label | Text label for the colorbar. No label is drawn if no label position is specified with one of the PL_COLORBAR_LABEL_(RIGHT|TOP|LEFT|BOTTOM) bits in opt. |
Definition at line 1113 of file pllegend.c.
Obtain character or symbol height in (y) in normalized subpage coordinates.
ifcharacter | TRUE obtain character height, FALSE obtain symbol height. |
Definition at line 313 of file pllegend.c.
Obtain ratio of normalized subpage to mm coordinates in both x and y.
x_subpage_per_mm | Pointer to a location that contains (after the call) the x ratio. | |
y_subpage_per_mm | Pointer to a location that contains (after the call) the y ratio. |
Definition at line 296 of file pllegend.c.
static void legend_position | ( | PLINT | position, | |
PLFLT | legend_width, | |||
PLFLT | legend_height, | |||
PLFLT * | x_legend_position, | |||
PLFLT * | y_legend_position, | |||
PLFLT * | xsign, | |||
PLFLT * | ysign | |||
) | [static] |
Calculate parameters that help determine the position of the top left of the legend in adopted coordinates. See pllegend documentation for definition of adopted coordinates.
position | Control variable containing valid combinations of the following control bits that specify the 16 standard positions of the legend: PL_POSITION_LEFT, PL_POSITION_RIGHT, PL_POSITION_TOP, PL_POSITION_BOTTOM, PL_POSITION_INSIDE, and PL_POSITION_OUTSIDE. | |
legend_width | Total legend width in adopted coordinates. | |
legend_height | Total legend height in adopted coordinates. | |
x_legend_position | Pointer to a location that contains (after the call) the X value in adopted coordinates of one of the 16 standard legend positions specified by position. | |
y_legend_position | Pointer to a location that contains (after the call) the Y equivalent of x_legend_position. | |
xsign | Pointer to a location that contains (after the call) the sign of the X offset relative to the standard legend position specified by position. | |
ysign | Pointer to a location that contains (after the call) the Y equivalent to xsign. |
Definition at line 88 of file pllegend.c.
Determine arguments of the last call to plvpor. This gives a different result than plgvpd if there is more than one subpage per page.
p_xmin | Pointer to a location that contains (after the call) the normalized subpage coordinate of the left-hand edge of the viewport. | |
p_xmax | Pointer to a location that contains (after the call) the normalized subpage coordinate of the right-hand edge of the viewport. | |
p_ymin | Pointer to a location that contains (after the call) the normalized subpage coordinate of the bottom edge of the viewport. | |
p_ymax | Pointer to a location that contains (after the call) the normalized subpage coordinate of the top edge of the viewport. |
Definition at line 47 of file pllegend.c.
static void remove_characters | ( | char * | string, | |
const char * | characters | |||
) | [static] |
Remove specified ascii characters from null-terminated string.
string | Null-terminated string where specified characters (if present) are removed. | |
characters | Null-terminated string consisting of ascii characters to be removed from string. |
Definition at line 909 of file pllegend.c.