Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

matplotlib use marker along variable

x=[1,2,3,4,5,6]
y=[1,3,4,5,6,7]
m=['k','l','l','k','j','l']

mapping = {'j' : 'o', 'k': 'x', 'l': '+'}

for i in range(len(x)):
    plt.scatter(x[i], y[i], marker=mapping[m[i]])
plt.show()
Comment

matplotlib use marker along variable

xs = [[1, 2, 3], [4, 5, 6]]
ys = [[1, 2, 3], [4, 5, 6]]
m = ['o', 'x']
for i in range(len(xs)):
    plt.scatter(xs[i], ys[i], marker=m[i])
plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: break input loop 
Python :: graph skewness detection 
Python :: python django login register 
Python :: truthy falsy python 
Python :: python remove all occurrence of an items from list 
Python :: tensorflow 
Python :: discord python application bot 
Python :: How can I get the named parameters from a URL using Flask? 
Python :: check if boolean is true python 
Python :: take columns to rows in pandas 
Python :: django reverse vs reverse_lazy 
Python :: i++ in python 
Python :: are logN and (lognN) same 
Python :: encode url 
Python :: elif python 
Python :: pandas filter columns with IN 
Python :: python list remove() 
Python :: install web3 on python 
Python :: Converting 12 hour clock time to 24 hour clock time 
Python :: class method in python 
Python :: python random numbers 
Python :: object python 
Python :: Program to Compute LCM Using GCD 
Python :: Set .difference() Operation in python3 
Python :: duplicate remove 
Python :: models django 
Python :: tanh activation function 
Python :: why is c faster than python 
Python :: iloc[:,0:-1] 
Python :: how to check if two strings are same in python 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =