Reputation: 1949
I am trying to graph a contour graph with a two dimentional matrix, v
. v contains velocity data, y-index represents depth, x-index is mapped to a 1d-vector containing latitude info, lat
.
when I graph contour(v)
, the x-axis is index, but I wish to show the latitude (also scale accordingly), I tried contour(lat,v) but it just shows me a blank graph, how should I graph it?
Upvotes: 1
Views: 3086
Reputation: 12693
Without having an example dataset, it's hard to say for sure... but I suspect that what you need to do is use the contour(X,Y,Z)
form of contour
. If you want to specify one axis, you need to specify both. In your case, it would be:
contour(lat,depth,v)
If you're happy using the y-index rather than an actual depth vector, you can do
contour(lat,1:size(v,2),v)
Upvotes: 1