Skip to content

triangle_piper #12

@pablo1391

Description

@pablo1391

I have de next error, i hope someone coul help me, please.

UnboundLocalError Traceback (most recent call last)
Cell In[5], line 5
2 from wqchartpy import triangle_piper
4 # Draw the diagram
----> 5 triangle_piper.plot(df, unit='mg/L', figname='triangle Piper diagram', figformat='jpg')

File ~\AppData\Local\anaconda3\envs\Pablo\Lib\site-packages\wqchartpy\triangle_piper.py:322, in plot(df, unit, figname, figformat)
320 # Creat the legend
321 if (df['Color'].dtype is np.dtype('float')) or (df['Color'].dtype is np.dtype('int64')):
--> 322 cb = plt.colorbar(cf, extend='both', spacing='uniform',
323 orientation='vertical', fraction=0.025, pad=0.05)
324 cb.ax.set_ylabel('$TDS$' + ' ' + '$(mg/L)$', rotation=90, labelpad=-75, fontsize=14)
326 plt.legend(bbox_to_anchor=(0.15, 0.875), markerscale=1, fontsize=12,
327 frameon=False,
328 labelspacing=0.25, handletextpad=0.25)

UnboundLocalError: cannot access local variable 'cf' where it is not associated with a value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions