gsplot.style.graph#

Functions

graph_facecolor([color])

Sets the face color of the current figure.

graph_square(ax)

Sets the aspect ratio of a specified axis to square.

graph_square_axes()

Sets the aspect ratio of all axes in the current figure to square.

graph_transparent(ax)

Sets a specified axis to be transparent.

graph_transparent_axes()

Sets all axes in the current figure to be transparent.

graph_white(ax)

Applies the white color scheme to a specified axis.

graph_white_axes()

Applies the white color scheme to all axes in the current figure.

graph_facecolor(color='black')[source]#

Sets the face color of the current figure.

This function is a wrapper for the set_facecolor method of the GraphFaceColor class.

Parameters:

color (str, optional) – The desired face color, specified as a color string (default is β€œblack”).

Return type:

None

Examples

>>> import gsplot as gs
>>> gs.graph_facecolor("black")  # Set the face color of the figure to black
graph_square(ax)[source]#

Sets the aspect ratio of a specified axis to square.

This function is a wrapper for the set_square method of the GraphSquare class.

Parameters:

ax (matplotlib.axes.Axes) – The target axis to adjust.

Return type:

None

Examples

>>> import gsplot as gs
>>> gs.graph_square(axs[0])  # Set the first axis to square aspect ratio
graph_square_axes()[source]#

Sets the aspect ratio of all axes in the current figure to square.

This function is a wrapper for the set_square_axes method of the GraphSquare class.

Return type:

None

Examples

>>> import gsplot as gs
>>> gs.graph_square_axes()  # Set all axes to square aspect ratio
graph_transparent(ax)[source]#

Sets a specified axis to be transparent.

This function is a wrapper for the set_transparent method of the GraphTransparent class.

Parameters:

ax (matplotlib.axes.Axes) – The target axis to modify.

Return type:

None

Examples

>>> import gsplot as gs
>>> gs.graph_transparent(axs[0])  # Make the first axis transparent
graph_transparent_axes()[source]#

Sets all axes in the current figure to be transparent.

This function is a wrapper for the set_transparent_axes method of the GraphTransparent class.

Return type:

None

Examples

>>> import gsplot as gs
>>> gs.graph_transparent_axes()  # Make all axes transparent
graph_white(ax)[source]#

Applies the white color scheme to a specified axis.

This function is a wrapper for the set_white method of the GraphWhite class.

Parameters:

axis_target (int or matplotlib.axes.Axes) – The target axis to modify. Can be an axis index or a Matplotlib Axes object.

Return type:

None

Examples

>>> import gsplot as gs
>>> gs.graph_white(axs[0])  # Apply white color scheme to the first axis
graph_white_axes()[source]#

Applies the white color scheme to all axes in the current figure.

This function is a wrapper for the set_white_axes method of the GraphWhite class.

Return type:

None

Examples

>>> import gsplot as gs
>>> gs.graph_white_axes()  # Apply white color scheme to all axes