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)
Raises:
-
InvalidTypeErrorWhen a setting is not of the type its annotation names.
-
InvalidSizeErrorWhen the width or the height is zero or negative.
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()