I am plotting two graphs. I am trying to plot multiple matplotlib graphs on my web browser using the mpld3 library. I am successful in plotting the first graph with the help of mpld3.show()
function, but the other graph is not being loaded.
Can anyone help me out on how to get both the graphs on the browser, I am sure it a single line of code that will solve the issue.
import matplotlib.pyplot as plt, mpld3
x = [1,2,3]
y = [2,3,4]
#firstgraph
plt.xlabel("xlabel 1")
plt.ylabel("ylabel 1")
plt.title("Plot 1")
plt.legend()
plt.bar(x,y, label = 'label for bar', color = 'b')
mpld3.show()
#secondgraph
x = [1,2,3]
y = [5,3,1]
plt.xlabel("xlabel 2")
plt.ylabel("ylabel 2")
plt.title("Plot 2")
plt.bar(x,y, color = 'r')
mpld3.show()