I need to generate a contour plot from a file (named abc.gnu) which has X, Y and Z columns of data. It has 1000000 rows of data. I have got the contour plot with a python code (shown at the end). What I need is to know the 'Z' values in any arbitrary place of choice (or to see 'Z' values in different regions of the contour plot). If I zoom any particular region, still the color bar is showing the same min and max values, so I can't get any information of 'Z' values in the zoomed region as well. Do you have any idea to solve this for my used file. I have given my used python script at the end. Any other idea to get more effective 2D contour plot is also welcome.
Used Python Code for the contour plot
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
data=pd.read_csv('abc.gnu',delimiter=' ',header=None,engine='python')
data_M=np.array(data)
X=data_M[:,0]
Y=data_M[:,1]
Z=data_M[:,2]
Xs=X.reshape((1000,1000))
Ys=Y.reshape((1000,1000))
Zs=Z.reshape((1000,1000))
fig = plt.figure(figsize=(10,8))
left, bottom, width, height = 0.1, 0.1, 0.8, 0.8
ax = fig.add_axes([left, bottom, width, height])
cp = plt.contourf(Xs, Ys, Zs)
plt.colorbar(cp)
ax.set_title('Contour Plot')
ax.set_xlabel('X')
ax.set_ylabel('Y')
x = np.linspace(0, 5, 150)
y = np.linspace(0, 5, 150)
X, Y = np.meshgrid(x, y)
plt.xlim(0, 25)
plt.ylim(0, 4)
plt.show()