i am trying to plot a visual using python where I have data in two dataset:
dataset1
Id Values
1 34
1 15
1 19
2 22
2 01
3 55...
dataset2
Id max min
1 12 23
2 09 24
3 22 78
So here I would like to plot a graph with "IDs" on X axis and "Values" on Y-axis . And also I would like Max and min line on this graph so that I can see how many Ids fall in the range and how many fall out of range..I will be selecting one Id at a time and it should show me the count of Ids along with values and their range on same graph. Can someone show me how can i do this using Python code.
Look into matplotlib. Once you have your datasets in an acceptable format (arrays are the simplest), you can plot as such:
import matplotlib.pyplot as plt
...
plt.plot(x_vals, y_vals_1)
plt.plot(x_vals, y_vals_2)
plt.show()
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.