October 25, 2024
Chicago 12, Melborne City, USA
python

Python pandas bar plot with multiple alpha values


Trying to create a bar plot with alpha transparency values for different time series.

Would think the below would give me that, as I’ve seen elsewhere lists can be passed via the alpha kwarg but throws the error below. What am I missing?

plt.figure()
df.plot(kind="bar", alpha=[.5,1])

..

TypeError: alpha must be numeric or None, not <class 'list'>



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video