Arrara
Arrara

Reputation: 173

How to plot graph with letter xtics which have more values in python?

I have data

A 45
B 446
A 565
A 789
C 456
C 464
B 465

where first column is xtics and second ytics. I would like to plot it with points where several y values belong to one x value. How to match it?

Upvotes: 0

Views: 30

Answers (1)

Mason Caiby
Mason Caiby

Reputation: 1924

You can just use a standard scatter plot and matplotlib

import matplotlib.pyplot as plt

a = list("ABAACCB")
b = [45, 446, 565, 789, 456, 464, 465]
plt.scatter(a,b)

enter image description here

Upvotes: 1

Related Questions