Skip to content

Size(width=6.4, height=4.8, unit=SizeUnit.INCH) Source

Width and height of a Plot, used by PlotStyle.

Added in version 0.1.0

Parameters:

  • width (float, default: 6.4)

    The width, 6.4 inches by default.

  • height (float, default: 4.8)

    The height, 4.8 inches by default.

  • unit (SizeUnit, default: SizeUnit.INCH)

    The unit of the width and the height, SizeUnit.INCH by default.

Raises:

Examples:

import numdaplot as ndp

prices = ndp.Array.from_list([12.0, 15.5, 14.0, 17.0])
style = ndp.PlotStyle(size=ndp.Size(width=6, height=2.5))
plot = ndp.Plot.line(prices, style=style)
plot.show()

Plot drawn by the example