Teradata Package for Python Function Reference | 20.00 - __init__ - Teradata Package for Python - Look here for syntax, methods and examples for the functions included in the Teradata Package for Python.

Teradata® Package for Python Function Reference - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00.00.03
Published
December 2024
ft:locale
en-US
ft:lastEdition
2024-12-19
dita:id
TeradataPython_FxRef_Enterprise_2000
Product Category
Teradata Vantage
teradataml.plot.Axis.__init__ = __init__(self, **kwargs)
Constructor for Axis.
 
PARAMETERS:
    cmap:
        Optional Argument.
        Specifies the name of the colormap to be used for plotting.
        Notes:
             * Significant only when corresponding type of plots is mesh or geometry.
             * Ignored for other type of plots.
        Permitted Values:
            * All the colormaps mentioned in below URL's are supported.
                * https://matplotlib.org/stable/tutorials/colors/colormaps.html
                * https://matplotlib.org/cmocean/
        Types: str
 
    color:
        Optional Argument.
        Specifies the color for the plot.
        Note:
            Hexadecimal color codes are not supported.
        Permitted Values:
            * blue
            * orange
            * green
            * red
            * purple
            * brown
            * pink
            * gray
            * olive
            * cyan
            * Apart from above mentioned colors, the colors mentioned in
              https://xkcd.com/color/rgb are also supported.
        Default Value: blue
        Types: str OR list of str
 
    grid_color:
        Optional Argument.
        Specifies the color of the grid. By default, grid is generated with
        Gray69(#b0b0b0) color.
        Note:
            Hexadecimal color codes are not supported.
        Permitted Values:
            * 'blue'
            * 'orange'
            * 'green'
            * 'red'
            * 'purple'
            * 'brown'
            * 'pink'
            * 'gray'
            * 'olive'
            * 'cyan'
            * Apart from above mentioned colors, the colors mentioned in
              https://xkcd.com/color/rgb are also supported.
        Default Value: 'gray'
        Types: str
 
    grid_format:
        Optional Argument.
        Specifies the format for the grid.
        Types: str
 
    grid_linestyle:
        Optional Argument.
        Specifies the line style of the grid.
        Default Value: -
        Permitted Values:
            * -
            * --
            * -.
        Types: str
 
    grid_linewidth:
        Optional Argument.
        Specifies the line width of the grid.
        Note:
            Valid range for "grid_linewidth" is: 0.5 <= grid_linewidth <= 10.
        Default Value: 0.8
        Types: int OR float
 
    legend:
        Optional Argument.
        Specifies the legend(s) for the Plot.
        Types: str OR list of str
 
    legend_style:
        Optional Argument.
        Specifies the location for legend to display on Plot image. By default,
        legend is displayed at upper right corner.
            * 'upper right'
            * 'upper left'
            * 'lower right'
            * 'lower left'
            * 'right'
            * 'center left'
            * 'center right'
            * 'lower center'
            * 'upper center'
            * 'center'
        Default Value: 'upper right'
        Types: str
 
    linestyle:
        Optional Argument.
        Specifies the line style for the plot.
        Permitted Values:
            * -
            * --
            * -.
            * :
        Default Value: -
        Types: str OR list of str
 
    linewidth:
        Optional Argument.
        Specifies the line width for the plot.
        Note:
            Valid range for "linewidth" is: 0.5 <= linewidth <= 10.
        Default Value: 0.8
        Types: int OR float OR list of int OR list of float
 
    marker:
        Optional Argument.
        Specifies the type of the marker to be used.
        Permitted Values:
            All the markers mentioned in https://matplotlib.org/stable/api/markers_api.html
            are supported.
        Types: str OR list of str
 
    markersize:
        Optional Argument.
        Specifies the size of the marker.
        Note:
            Valid range for "markersize" is: 1 <= markersize <= 20.
        Default Value: 6
        Types: int OR float OR list of int OR list of float
 
    position:
        Optional Argument.
        Specifies the position of the axis in the Figure. 1st element
        represents the row and second element represents column.
        Default Value: (1, 1)
        Types: tuple
 
    reverse_xaxis:
        Optional Argument.
        Specifies whether to reverse tick values on x-axis or not.
        Default Value: False
        Types: bool
 
    reverse_yaxis:
        Optional Argument.
        Specifies whether to reverse tick values on y-axis or not.
        Default Value: False
        Types: bool
 
    span:
        Optional Argument.
        Specifies the span of the axis in the Figure. 1st element
        represents the row and second element represents column.
        For Example,
            Span of (2, 1) specifies the Axis occupies 2 rows and 1 column
            in Figure.
        Default Value: (1, 1)
        Types: tuple
 
    series_identifier:
        Optional Argument.
        Specifies the teradataml GeoDataFrame Column which represents the
        identifier for the data. As many plots as distinct "series_identifier"
        are generated in a single Axis.
        For example:
            consider the below data in teradataml GeoDataFrame.
                   ID   x   y
                0  1    1   1
                1  1    2   2
                2  2   10  10
                3  2   20  20
            If "series_identifier" is not specified, simple plot is
            generated where every 'y' is plotted against 'x' in a
            single plot. However, specifying "series_identifier" as 'ID'
            generates two plots in a single axis. One plot is for ID 1
            and another plot is for ID 2.
        Types: teradataml GeoDataFrame Column.
 
    title:
        Optional Argument.
        Specifies the title for the Axis.
        Types: str
 
    xlabel:
        Optional Argument.
        Specifies the label for x-axis.
        Notes:
             * When set to empty string, label is not displayed for x-axis.
             * When set to None, name of the x-axis column is displayed as
               label.
        Types: str
 
    xlim:
        Optional Argument.
        Specifies the range for xtick values.
        Types: tuple
 
    xtick_format:
        Optional Argument.
        Specifies how to format tick values for x-axis.
        Types: str
 
    ylabel:
        Optional Argument.
        Specifies the label for y-axis.
        Notes:
             * When set to empty string, label is not displayed for y-axis.
             * When set to None, name of the y-axis column(s) is displayed as
               label.
        Types: str
 
    ylim:
        Optional Argument.
        Specifies the range for ytick values.
        Types: tuple
 
    ytick_format:
        Optional Argument.
        Specifies how to format tick values for y-axis.
        Types: str
 
    vmin:
        Optional Argument.
        Specifies the lower range of the color map. By default, the range
        is derived from data and color codes are assigned accordingly.
        Note:
            "vmin" significant only for Geometry Plot.
        Types: int OR float
 
    vmax:
        Optional Argument.
        Specifies the upper range of the color map. By default, the range is
        derived from data and color codes are assigned accordingly.
        Note:
            "vmax" significant only for Geometry Plot.
        For example:
            Assuming user wants to use colormap 'matter' and derive the colors for
            values which are in between 1 and 100.
            Note:
                Colormap 'matter' starts with Pale Yellow and ends with Violet.
            * If "colormap_range" is not specified, then range is derived from
              existing values. Thus, colors are represented as below in the whole range:
              * 1 as Pale Yellow.
              * 100 as Violet.
            * If "colormap_range" is specified as -100 and 100, the value 1 is at middle of
              the specified range. Thus, colors are represented as below in the whole range:
              * -100 as Pale Yellow.
              * 1 as Orange.
              * 100 as Violet.
        Types: int OR float
 
EXAMPLES:
    # Example 1: Create an Axis with marker as 'Pentagon'.
    >>> from teradataml import Axis
    >>> ax = Axis(marker="p")
 
    # Example 2: Create an Axis which does not have x-tick values
    #            and y-tick values but it should have grid.
    #            Note that the grid lines should be in the format of '-.'
    >>> from teradataml import Axis
    >>> ax = Axis(xtick_format="", ytick_format="", grid_linestyle="-.")
 
    # Example 3: Create an Axis which should plot only for the values
    #            between -10 to 100 on x-axis.
    >>> from teradataml import Axis
    >>> ax = Axis(xlim=(-10, 100))
 
    # Example 4: Create an Axis which should display legend at upper left
    #            corner and it should disable both x and y axis labels.
    >>> from teradataml import Axis
    >>> ax = Axis(legend_style="upper left", xlabel="", ylabel="")
 
    # Example 5: Create an Axis to format the y-axis tick values to
    #            display up to two decimal points. Also, use the color
    #            'dark green' for plotting.
    #            Note: Consider y-axis data has 5 digit floating numbers.
    >>> from teradataml import Axis
    >>> ax = Axis(ytick_format="99999.99", color='dark green')
 
RAISES:
    TeradataMlException