Hi, firstly thanks for publishing this library!
We would like to use the library but require the plt object returned instead of the plot written to a file.
Would it be OK if I submitted a PR to do the following across all files (this example is for triangle_piper.py):
- Extra argument, retplt, which returns the plt object:
def plot(df,
unit='mg/L',
figname='triangle Piper diagram',
figformat='jpg',
retplt=False): # <- new!
- Returns plot if retplt is true instead of writing file:
if retplt:
return plt
else:
# Display the info
cwd = os.getcwd()
print("Trilinear Piper plot created. Saving it to %s \n" %cwd)
# Save the figure
plt.savefig(figname + '.' + figformat, format=figformat,
bbox_inches='tight', dpi=300)
return
Hi, firstly thanks for publishing this library!
We would like to use the library but require the plt object returned instead of the plot written to a file.
Would it be OK if I submitted a PR to do the following across all files (this example is for triangle_piper.py):