Use the Figure() function to create a new figure for the plot in teradataml.
Optional Arguments:
- width: Specifies the width of the figure in pixels.
Valid range: [400, 4096]
Default value is 640.
- height: Specifies the height of the figure in pixels.
Valid range: [400, 4096]
Default value is 480.
The total number of pixels in an output image, that is, the product of width and height must not exceed 4,000,000. - dpi: Specifies the number of dots per inch for the output image.
Valid range: [72, 300]
Default Value is 100 for png and jpg type images.
- image_type: Specifies the type of output image.Permitted Values:
- 'png'
- 'jpg'
- 'svg'
Default Value is 'png'.
- heading: Specifies the heading for the plot.
- layout: Specifies the layout for the plot.
This argument has a tuple type. The first element represents rows and the second element represents columns.
Default value is (1,1).
Example 1: Create a Figure object with height and width as 500 pixels and 600 pixels respectively
>>> from teradataml import Figure
>>> figure = Figure(height=500, width=600)
Example 2: Create a Figure object with default height and width along with heading as 'Plot Heading'
>>> from teradataml import Figure
>>> figure = Figure(heading="Plot Heading")