python - Adding a crosshair or marker to a matplotlib contour plot -


i plotting numpy array contour plot using matplotlib:

import numpy np import matplotlib.pyplot plt  plt.contour(array, linewidths = 1, colors = 'k') plt.contourf(array, cmap = plt.cm.jet) plt.colorbar() plt.show() 

i add 'crosshair' or other marker denote maximum value in array given by:

maxi = np.max(array) 

how should go doing this?

thanks.

you can plot cross if know position.

[row, col] = numpy.where(array==np.max(array)) plt.plot(col, row, 'b+') 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -