i generated that scatterplot with matplotlib, and i need to add an attribute to each point.
my code is:
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.pyplot import figure
from matplotlib import cm
from colorspacious import cspace_converter
from collections import OrderedDict
cmaps = OrderedDict()
y=[(22.8,19.6),(8.9,13.7,14.7),(1.9,-1.8),(-3,-5.9,-13.4),(-5.7,-6.8)]
x=[-2,-1,0,1,2]
#n=['K464E', 'K472E', 'K464', 'M155E', 'K472', 'M155A', 'Q539A', 'M155R', 'D244A', 'E247A', 'E247R', 'D244K']
plt.title('delta charge vs delta V1/2 mutation-wt')
plt.xlabel('delta charge')
plt.ylabel('delta V1/2 mutation-wt')
fig, plt = plt.scatter(x, y)
for xe, ye in zip(x, y):
plt.scatter([xe] * len(ye), ye, marker= 'o', cmap='Reds', edgecolors='black', linewidths=1, alpha=0.75)
#plt.annotate('K464E', (x[-2], y[22.8]))
#for i, txt in enumerate('K464E', 'K472E', 'K464', 'M155E', 'K472', 'M155A', 'Q539A', 'M155R', 'D244A', 'E247A', 'E247R', 'D244K'):
plt.annotate(txt, (x[i], y[i]))
figure(figsize=(8, 6), dpi=180)
plt.savefig('Pure_Jena.png')
which style shall i give to 'marker=...'
UPDATE: i get the following warning without giving any output:
VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray. _data = np.array(data, dtype=dtype, copy=copy,