geocat.viz.util.set_tick_direction_spine_visibility

geocat.viz.util.set_tick_direction_spine_visibility#

geocat.viz.util.set_tick_direction_spine_visibility(ax, tick_direction='out', top_spine_visible=True, bottom_spine_visible=True, left_spine_visible=True, right_spine_visible=True)#

Utility function to turn off axes spines and set tickmark orientations.

Note: This function should be called after calling add_major_minor_ticks()

Parameters:
  • ax (matplotlib.axes._subplots.AxesSubplot, cartopy.mpl.geoaxes.GeoAxesSubplot) – Current axes to the current figure

  • tick_direction (str) – Tick direction. Accepted alias:

    • in: to put ticks inside the axes

    • out: to put ticks outside the axes

    • inout: to put ticks both in and out of the axes

  • top_spine_visible (bool) – Set False to turn off top spine of the axes.

  • bottom_spine_visible (bool) – Set False to turn off bottom spine of the axes.

  • left_spine_visible (bool) – Set False to turn off left spine of the axes.

  • right_spine_visible (bool) – Set False to turn off right spine.

Examples

See this example notebook: set_tick_direction_spine_visibility.

More in-depth plotting examples that utilize this function are in the GeoCAT-Examples Gallery. To see more usage cases, search the function on the website.