add annotation
This commit is contained in:
parent
511c45d83d
commit
948dd91969
1 changed files with 13 additions and 1 deletions
|
|
@ -642,6 +642,18 @@ def compare_viruses_vr():
|
|||
handles = [patches.Patch(edgecolor=c, facecolor='none', label=l) for c, l in zip([p + (0.5,) for p in [(0., 0.5, 0.5), (0, 0, 0.5), (0.5, 0, 0), (0.5, 0.5, 0.5)]], ('SARS-CoV-2', 'Measles', 'Influenza', 'Rhinovirus'))]
|
||||
boxplot_legend = plt.legend(handles=handles, loc='lower right')
|
||||
|
||||
ax.annotate("Bus ride", xy=(6, np.log10(4000)), color='k', fontsize=8,
|
||||
xycoords='data',
|
||||
xytext=(-50, 50), textcoords='offset points',
|
||||
arrowprops=dict(arrowstyle="->",
|
||||
connectionstyle="arc3,rad=-0.2", color='lightgrey'))
|
||||
|
||||
ax.annotate("S V Chorale", xy=(10, np.log10(100000)), color='k', fontsize=8,
|
||||
xycoords='data',
|
||||
xytext=(-50, 40), textcoords='offset points',
|
||||
arrowprops=dict(arrowstyle="->",
|
||||
connectionstyle="arc3,rad=-0.2", color='lightgrey'))
|
||||
|
||||
handles = [patches.Patch(color=c, label=l) for c, l in zip([p for p in colors_violin], ('Breathing', 'Speaking', 'Shouting'))]
|
||||
plt.legend(handles=handles, loc='lower left', bbox_to_anchor=(0.12, 0.))
|
||||
plt.gca().add_artist(boxplot_legend)
|
||||
|
|
|
|||
Loading…
Reference in a new issue