JP_nomorgan
JP_nomorgan

Reputation: 29

how can I have it show me the values of the x axis in y and vice versa

import numpy as np
import matplotlib.pyplot as plt

data = np.load('/home/josep/workspace/data/wind_5.npy')
plt.pcolor(data)
plt.colorbar()
plt.ylabel('Range')
plt.xlabel('time')
#plt.savefig("/home/josep/workspace/schain/plots_data/test.png")
plt.show()

wind_5 is a array with size (527, 132)

it's a range vs time chart 527 times and 132 ranges I need the 527 time to be on the x axis and the 132 ranges on the y axis

Upvotes: 0

Views: 72

Answers (1)

ImportanceOfBeingErnest
ImportanceOfBeingErnest

Reputation: 339290

You may want to plot the transpose of the data,

plt.pcolor(data.T)

Upvotes: 1

Related Questions