From: Arjen M. <arj...@wl...> - 2005-03-25 12:21:10
|
Curtis Cooper wrote: > > > Hi, > > > > I'm using PLplot to produce pictures of longitude, latitude temperature > > maps for my planetary atmospheres research. I first apply an orthographic > > projection to the lon, lat coordinates and use the grid so computed as the > > argument into plshades along with pltr2: > > > > plshades(temperature, clevels, fill_width, 0, pltr2, X, Y, 2) > > > > Temperature here is known at all longitudes and latitudes for which I have > > computed the X,Y projection matrices, i.e., T(lon, lat). > > > > This is just like example 16. Now, the routine plots the map projection > > beautifully. However, for further computations, I would really like to be > > able to extract the projected data, i.e., T in the X,Y coordinate system. > > What would be involved in modifying the PLplot source code to allow me to > > do that? > > Nothing: The function pltr2() is doing the actual coordinate transformation. You can call it yourself like this: for (i = 0; i < n; i++) { pltr2 (x[i], y[i], &tx, &ty, pltr_data); x[i] = tx; y[i] = ty; } where pltr_data is the grid matrix. Regards, Arjen |