yt.visualization.plot_window.PlotWindow.set_width

PlotWindow.set_width(*args, **kwargs)[source]

set the width of the plot window

Parameters:

width : float, array of floats, (float, unit) tuple, or tuple of

(float, unit) tuples.

Width can have four different formats to support windows with variable x and y widths. They are:

format example
(float, string) (10,’kpc’)
((float, string), (float, string)) ((10,’kpc’),(15,’kpc’))
float 0.2
(float, float) (0.2, 0.3)

For example, (10, ‘kpc’) requests a plot window that is 10 kiloparsecs wide in the x and y directions, ((10,’kpc’),(15,’kpc’)) requests a window that is 10 kiloparsecs wide along the x axis and 15 kiloparsecs wide along the y axis. In the other two examples, code units are assumed, for example (0.2, 0.3) requests a plot that has an x width of 0.2 and a y width of 0.3 in code units. If units are provided the resulting plot axis labels will use the supplied units.

unit : str

the unit the width has been specified in. If width is a tuple, this argument is ignored. Defaults to code units.