I want to add labels to the marker
points automatically generated by matplotlib, but I don't know how to find the points (the boldened i
and j
below) from my Pandas DataFrameGroupby object. My command to create the graph is
for x, group in graph:
t = group.plot(x="CompressorSpeed", y="ratio", marker='o').set_title(x)
plt.annotate('This is awesome', xy=( **i**, **j** ), arrowprops=dict(arrowstyle="->"))
plt.savefig(pp, format="pdf")
Where the graph is (and csvdata
is a Pandas DataFrame object that is created from read_csv(...)
)
graph=csvdata.groupby("CompressorAlgo", as_index=False)
I can verify that an xy
label is created if I hardcode a known point.
Here is an attached image with marker points: