gsplot.style.graph#
Functions
|
Sets the face color of the current figure. |
|
Sets the aspect ratio of a specified axis to square. |
Sets the aspect ratio of all axes in the current figure to square. |
|
Sets a specified axis to be transparent. |
|
Sets all axes in the current figure to be transparent. |
|
|
Applies the white color scheme to a specified axis. |
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:
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:
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:
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:
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:
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
ormatplotlib.axes.Axes
) β The target axis to modify. Can be an axis index or a Matplotlib Axes object.- Return type:
Examples
>>> import gsplot as gs >>> gs.graph_white(axs[0]) # Apply white color scheme to the first axis