blockpy icon indicating copy to clipboard operation
blockpy copied to clipboard

Matplot can't show multiple bar graphs on one chart

Open thomaswp opened this issue 3 years ago • 2 comments

BlockPy helpfully supports multiple line plots on the same canvas; however this does not work with bar plots:

import matplotlib.pyplot as plt

plt.bar([0.5, 1.5, 2.5], [5, 8, 2], width=0.5)
plt.bar([0, 1, 2], [2, 3, 2], width=0.5)
plt.show()

produces

image

rather than why Python would generate:

image

I'm guessing that this has something to do with the JS implementation of Matplot? Some students wanted to create comparative barcharts, so it's nice to be able to do.

thomaswp avatar Dec 07 '22 17:12 thomaswp

Sounds like maybe you're using jsplotlib under the hood? If so, it may be fixed with an update.

thomaswp avatar Dec 07 '22 18:12 thomaswp

Confirmed this is still present on the UDel instance.

thomaswp avatar Dec 15 '22 15:12 thomaswp