Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
Close
From: Curtis Cooper <curtis@hi...>  20050324 20:29:57

> 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? > > Cheers, > Curtis > > 
From: R. V. Urvashi <rurvashi@ao...>  20050301 00:42:39

Hi I'm using the C++ API for PLPLOT, and trying to use "GetCursor" to record the world coordinates and subwindow index from a cursor event. Following this event, I need to 'advance' to the chosen subwindow, and overlay a plot. This entire process needs to be done repeatedly. Given a valid subwindow 'n', I am able to get the overlay plot on the correct subwindow by doing the following pls>adv(n) pls>vpor(...) pls>wind(...) ...plot However, when this is put into a loop and done repeatedly, the 'subwindow' member returned via GetCursor does NOT always have the correct subwindow index. Could someone please tell me if I'm missing something, or if this could this be a bug ? Thanks in advance. Urvashi 
From: Alan W. Irwin <irwin@be...>  20050301 02:41:24

On 20050228 17:420700 R. V. Urvashi wrote: > Hi > > I'm using the C++ API for PLPLOT, and trying to use "GetCursor" to record > the world coordinates and subwindow index from a cursor event. Following > this event, I need to 'advance' to the chosen subwindow, and overlay a > plot. This entire process needs to be done repeatedly. > > Given a valid subwindow 'n', I am able to get the overlay plot on the > correct subwindow by doing the following > > pls>adv(n) > pls>vpor(...) > pls>wind(...) > ...plot > > However, when this is put into a loop and done repeatedly, the > 'subwindow' member returned via GetCursor does NOT always have the correct > subwindow index. Could someone please tell me if I'm missing something, or > if this could this be a bug ? The underlying C plGetCursor ultimately calls plcalc_world to get all the required information. That latter routine is documented at http://plplot.sourceforge.net/docbookmanual/plplothtml5.3.1/plcalc_world.html. Note, the documentation there of the returned window index. You may be violating one of the many documented assumptions in obtaining that index. Also, please look at http://plplot.sourceforge.net/docbookmanual/plplothtml5.3.1/viewport_window.html for an explanation of the hierarchy of viewing surfaces, (sub)pages, viewports, and windows. I believe your above logic should work if you create subpages with plssub (note in CVS I have just changed that documentation to refer to the proper subpage term rather than subwindow) with one viewport and corresponding window on each, and if you mouse click _inside_ the viewport/window and not in the outer areas where the text labels go which is outside the viewport/window for the subpage. If after this explanation and reading the documentation you are still having difficulty understanding the results from GetCursor, try as a simple test calling calc_world, the C++ wrapped version of plcalc_world using appropriate relative device coordinate that are inside/outside the window of each subpage. What window indices are returned by such an experiment? If you are not getting the indices you expect from that experiment, please post the complete simple test code here. Alan __________________________ Alan W. Irwin email: irwin@... phone: 2507272902 Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equationofstate implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick frontend to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linuxpowered Science __________________________ 
From: <mjl@ga...>  20050303 00:19:51

Alan W. Irwin writes: > On 20050228 17:420700 R. V. Urvashi wrote: > >... > > Given a valid subwindow 'n', I am able to get the overlay plot on the > > correct subwindow by doing the following > > > > pls>adv(n) > > pls>vpor(...) > > pls>wind(...) > > ...plot > > > > However, when this is put into a loop and done repeatedly, the > > 'subwindow' member returned via GetCursor does NOT always have the correct > > subwindow index. Could someone please tell me if I'm missing something, or > > if this could this be a bug ? > ... > I believe your above logic should work if you create subpages with plssub > (note in CVS I have just changed that documentation to refer to the proper > subpage term rather than subwindow) with one viewport and corresponding > window on each, and if you mouse click _inside_ the viewport/window and not > in the outer areas where the text labels go which is outside the > viewport/window for the subpage. It should also work as written above. Each call to plwind() sets up a PLWindow that contains relative device coordinates & world coordinates for that window, up to a maximum of PL_MAXWINDOWS (64) per page per stream. Is it possible that you've exceeded 64 plots? In that case it wraps around. The current implementation was a quick hack & should probably be replaced with something dynamically (re)allocated.  Maurice LeBrun mjl@... 
From: Curtis Cooper <curtis@hi...>  20050321 05:04:47

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? Cheers, Curtis 
From: Curtis Cooper <curtis@hi...>  20050324 20:29:57

> 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? > > Cheers, > Curtis > > 
From: Arjen Markus <arjen.markus@wl...>  20050325 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 
From: Alan W. Irwin <irwin@be...>  20050325 16:10:21

On 20050325 13:21+0100 Arjen Markus wrote: > 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. It may not be much further help beyond what Arjen has already said, but sparse documentation of pltr2 actually exists at http://plplot.sourceforge.net/docbookmanual/plplothtml5.3.1/pltr2.html . Alan __________________________ Alan W. Irwin email: irwin@... phone: 2507272902 Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equationofstate implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick frontend to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linuxpowered Science __________________________ 