I have a large data set (growing number of x axis), the one shown at the bottom is enough to reproduce my case. I'm trying to plot this using Pandas and matplotlib. [I'm very new with python, so apologies in advance for any mistakes.]
import os
import sys
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv('test.csv', delimiter=',', index_col='Header')
df.plot(marker='s', figsize=(18,9))
plt.title("test")
plt.ylabel('y axis')
plt.xlabel('x axis')
plt.show()
sys.exit()
When I use the code above, it plots the graph, but I've got few issues.
- Y axis data points looks they have been scaled (which I did not ask)
- Missing few x axis data points, I understated it may not possible display all X axis values on the axis, which is fine. I was wondering would it be possible to display them on the actual data point when I move the mouse over them.
The latter is really crucial feature I'm after. My script is intended to track some data and when there is a visible bump in the plot, I need to be able to know which X values actually cause the bump. If anyone has suggestion for achieving the similar effect, they are much appreciated.
Header,header1,header2,header3,header4,header5,header6
x1,2115211,2223666,13332666,8448144,655564,366361
x2,2115213,2223666,13332666,8448144,655564,366361
x3,2115213,2223666,13332666,8448144,655564,366361
x4,2115213,2223666,13332666,8448144,655564,366361
x5,2115262,2229973,13330187,8448756,655523,366379
x6,2115262,2229973,13330187,8448756,655523,366379
x7,2115262,2229973,13330187,8448756,655523,366379
x8,2115277,2228613,13335478,8448221,655556,366362
x9,2115277,2228613,13335478,8448221,655556,366362
x10,2115211,2223666,13332666,8448144,655564,366361
x11,2115213,2223666,13332666,8448144,655564,366361
x12,2115213,2223666,13332666,8448144,655564,366361
x13,2115213,2223666,13332666,8448144,655564,366361
x14,2115213,2223666,13332666,8448144,655564,366361
x15,2115262,2229973,13330187,8448756,655523,366379
x16,2115262,2229973,13330187,8448756,655523,366379
x17,2115262,2229973,13330187,8448756,655523,366379
x18,2115277,2228613,13335478,8448221,655556,366362
x19,2115277,2228613,13335478,8448221,655556,366362
Any help is much appreciated.