Synopsis
Set or retrieve the aspect ratio information of the data.
Syntax
set_data_aspect_ratio([id], ratio) get_data_aspect_ratio([id])
Description
The function arguments.
Argument | Description |
---|---|
id | A ChipsId structure identifying the item. |
ratio | The new aspect ratio for the plot, as a string. The format should be "a:b" - where a and b are numbers - or the empty string "". Unlike set_plot_aspect_ratio, "fit" and "current" can not be used. |
The set_data_aspect_ratio command is used to change the aspect ratio of the data. The ratio is specified as "a:b". If set_data_aspect_ratio is called without specifying a ratio, the data aspect ratio is disabled.
The get_data_aspect commands return the aspect ratio of the specified data.
"ratio" option values
Value | Description |
---|---|
"a:b" | Explicitly set the aspect ratio, e.g. "2:1". |
"" | Turn off the aspect ratio. Using this option expands the aspect ratio back to the area defined by the plot margins. |
For more information on aspect ratios, refer to "ahelp aspectratio".
Example
chips> z = np.arange(10) chips> add_curve(z,z-4,[z*0.2,z*0.1]) chips> set_data_aspect_ratio("1:1");
Plot a line, then set the data aspect ratio to "1:1".
Bugs
See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.
See Also
- limits
- get_plot_range
- plots
- add_plot, adjust_grid_gaps, adjust_grid_xrelsize, adjust_grid_xrelsizes, adjust_grid_yrelsize, adjust_grid_yrelsizes, clear_plot, current_plot, delete_plot, display_plot, get_plot, grid_objects, hide_plot, move_plot, reposition_plot, set_plot, set_plot_aspect_ratio, split, strip_chart, swap_object_positions