I am trying to follow this tutorial to make a gauge plot but it doesn't seem to have how to save the plot. I am wondering how to save this gauge matplotlib.
CodePudding user response:
The tutorial you linked, does mention how to save the plot
in function gauge
def gauge(labels=['LOW','MEDIUM','HIGH','VERY HIGH','EXTREME'],
colors='jet_r', arrow=1, title='', fname=False):
There is an attribute fname
. If you set a path to fname
it will store your gauge as the given name.
For example
gauge(labels=['LOW','MEDIUM','HIGH','VERY HIGH','EXTREME','CRITICAL'],
colors='YlOrRd_r', arrow=3, title='drought severity index',fname='gauge.png')