Creates a strip chart containing multiple plots.
strip_chart(nplots, [orientation,] [gaps,] [ratios,] [bindings,] [plotstyle,] [xlimits,] [ylimits,] [ticklabels])
The function arguments.
|nplots||The number of plots to create.|
|orientation||Use 0 for a column of plots (the default), or 1 for a row.|
|gaps||The spacing between the plots as a fraction of the available plot area, defined by the default plot margin values. The default is 0.|
|ratios||An array of the relative sizes of the plots (height for orientation=0 and width for orientation=1). The default is equal sized plots.|
|bindings||Should the axes be bound together? The values are 0 for no bound axes, 1 for the common axis in the plots, and 2 for all the axes. The default is 1.|
|plotstyle||The plot border style: use chips_open, chips_closed, or chips_box. This corresponds to the plot.style attribute of plots (e.g. see set_plot).|
|xlimits||The minimum and maxiumum values to use for the X axes.|
|ylimits||The minimum and maxiumum values to use for the Y axes.|
|ticklabels||True if the axis ticklabels should be drawn for the common axes, False if not. The default is False. The ticklabels are always drawn for the last (column) or first (row) plot.|
The strip_chart command creates the specified number of plots in a horizonal or vertical arrangement.
The relative sizes of the plots may be set in the "ratios" argument. The number of list items must be the same as the number of entries. For three entries, a list of "[1, 2, 2]" makes the plots 1/5 (plot1), 2/5 (plot2), and 2/5 (plot3) of the available area.
Bound axes are intended to display the same range of data. By default, strip_chart binds the stacked axis. When the limits, scale, or tick mode of an axis changes, any axes bound to the modified axis are also changed. The bind_axes ahelp page has more information, including a list of synchronized properties.
To create a grid of plots, use the split command, followed by bind_axes calls to link the required axes.
Create a strip chart of three plots, arranged vertically.
chips> strip_chart(2, 1, 0.01, [1, 3])
The strip chart consists of two plot areas, arranged horizontally, with a 0.01 gap between them. The ratio of the plot areas is 1:3.
chips> add_window(8, 4, 'inches') chips> strip_chart(3, gaps=0.05, orientation=1, ticklabels=True, ylimits=[100,500])
Create a new window with three horizontally-aligned plots, with a gap between them, tick labels drawn for each Y axis, and the Y axis set to the range 100 to 500.
A comparison between split and strip_chart
The strip chart is needed if you wish to make a grid of plots; i.e. more than one column or row. In this case the bind_axes command can be used to bind together any axes that should have the same range and scale.
The strip_chart command always creates a new frame whereas the split command will re-use existing plots, only creating plots when needed. This is shown in the following two cases:
chips> clear() chips> add_curve([1,2,3], [1,2,3]) chips> split(2)
which creates two vertically-aligned plots; the top plot containing the curve and the second plot is now current:
chips> print(info()) Window [win1] Frame [frm1] Plot [plot1] (0.15,0.52) .. (0.90,0.90) Border bottom [bx1] top [bx2] left [by1] right [by2] Curve [crv1] X Axis [ax1] Y Axis [ay1] Plot [plot2] (0.15,0.15) .. (0.90,0.52) Border bottom [bx1] top [bx2] left [by1] right [by2] chips> print(info_current()) Window [win1] Frame [frm1] Plot [plot2] Coord Sys [Plot Normalized]
chips> clear() chips> add_curve([1,2,3], [1,2,3]) chips> strip_chart(2)
In this case it appears that the curve has been deleted, but it has in fact been covered by a new frame, and the first plot of this new frame is visible.
chips> print(info()) Window [win1] Frame [frm1] Plot [plot1] (0.15,0.15) .. (0.90,0.90) Border bottom [bx1] top [bx2] left [by1] right [by2] Curve [crv1] X Axis [ax1] Y Axis [ay1] Frame [frm2] Plot [plot1] (0.15,0.52) .. (0.90,0.90) Border bottom [bx1] top [bx2] left [by1] right [by2] X Axis [ax1] Y Axis [ay1] Plot [plot2] (0.15,0.15) .. (0.90,0.52) Border bottom [bx1] top [bx2] left [by1] right [by2] X Axis [ax1] Y Axis [ay1] chips> print(info_current()) Window [win1] Frame [frm2] Plot [plot1] X Axis [ax1] Y Axis [ay1] Coord Sys [Data] Coord Sys ID [ds126.96.36.199]
The grid_objects, col_grid_objects and row_grid_objects commands provide a lower-level interface for creating rows and grids of plots. The adjust_grid_gaps, adjust_grid_xgap, and adjust_grid_ygap commands allow you to change the spacing between the plots. The adjust_grid_xrelsize, adjust_grid_yrelsize, adjust_grid_xrelsizes, and adjust_grid_yrelsizes commands allow you to change the relative sizes (widths or heights) of the plots. The swap_object_positions command allows you to swap the positions of two plots in a grid.
See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.
- 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_data_aspect_ratio, set_plot, set_plot_aspect_ratio, split, swap_object_positions