I have a 1d array Z that unfortunately contains information about a two
dimensional surface. The mapping is nontrivial (i.e. Z is not just a
sequence of column or row information that I could reshape) but
homogenous (i.e. there is a rectangular grid and Z contains data for
each vertex). The x and y coordinates for each datapoint in Z are
contained in separate arrays X and Y.
A simple pyplot.contour(X, Y, Z) refuses to plot the data because Z is
not 2d ("TypeError: Input z must be a 2D array").
What's the best way to plot this data?
Is there an easy way to reshuffle the elements of Z so that they are in
either row-column or column-row order?
»Time flies like an arrow, fruit flies like a Banana.«
PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C