Can you try something like this?
import matplotlib.pyplot as plt
x = [i for i in range(len(query_borough)]
h = [doc['result'] for doc in query_borough]
t = [doc['_id'] for doc in query_borough]
plt.bar(x, height=h)
plt.xticks(x,t);
Based on How to plot a histogram using Matplotlib in Python with a list of data?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.