geoutils.Vector.plot#
- Vector.plot(ref_crs=None, cmap=None, vmin=None, vmax=None, alpha=None, cbar_title=None, add_cbar=True, ax=None, return_axes=False, savefig_fname=None, **kwargs)[source]#
Plot the vector.
This method is a wrapper to geopandas.GeoDataFrame.plot. Any **kwargs which you give this method will be passed to it.
- Parameters:
ref_crs (RasterLike | VectorLike | CRS | int | None) – Coordinate reference system to match when plotting.
cmap (matplotlib.colors.Colormap | str | None) – Colormap to use. Default is plt.rcParams[‘image.cmap’].
vmin (float | int | None) – Colorbar minimum value. Default is data min.
vmax (float | int | None) – Colorbar maximum value. Default is data max.
alpha (float | int | None) – Transparency of raster and colorbar.
cbar_title (str | None) – Colorbar label. Default is None.
add_cbar (bool) – Set to True to display a colorbar. Default is True if a “column” argument is passed.
ax (matplotlib.axes.Axes | Literal[‘new’] | None) – A figure ax to be used for plotting. If None, will plot on current axes. If “new”, will create a new axis.
return_axes (bool) – Whether to return axes.
savefig_fname (str | None) – Path to quick save the output figure (previously created if an ax is give, new if not) with a default DPI, no transparency and no metadata. Use plt.savefig() to specify other save parameters or after other customizations. Warning: plt.close() or plt.show() still needs to be called to close the figure.
- Return type:
None | tuple[matplotlib.axes.Axes, matplotlib.colors.Colormap]
- Returns:
None, or (ax, caxes) if return_axes is True