Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
In article <2svmv4$6qf@mojo.eng.umd.edu> dpal@glue.umd.edu (Debabrata Pal) writes: > > Hello everybody: > > I am trying to overlay the geometry of a computational domain on the contour plot. I am having no trouble in generating the contour plot. I am trying to generate the geometry of domain using PLOTS command. The geometry is very simple and can be generated by drawing a view horizontal nd vertical lines. But when i use PLOTS command to generate geometry, for example, > > PLOTS, [0, 0],[.9,.9], i get an error message like this > > % PLOTS: Data coordinate system not established. > > In other words, I am having trouble establishing the data coordinate system. > Can anybody tell me how to establish the data coordinate system in this regard? Hi, Okay, IDL uses 3 coordinates systems: Normal all data is between 0-1 Device for display, this is pixel coord Data coordinates established with data range of a plot (or controur, etc..) Different routines have different defaults of what coordinate type to accept. I believe your above command will work as follows: (assuming you do indeed want to use normal coordinates) PLOTS, [0, 0],[.9,.9],/Normal This plots from point (0,0) to (.9,.9). Remember, the first array are the x coordinates, and the second array are the y coordinates. -stephen hope this helps a little -- Stephen C Strebel / SKI TO DIE strebel@sma.ch / and Swiss Meteorological Institute, Zuerich / LIVE TO TELL ABOUT IT 01 256 93 85 / (and pray for snow)
dpal@glue.umd.edu (Debabrata Pal) writes: > Hello everybody: > I am trying to overlay the geometry of a computational domain on the > contour plot. I am having no trouble in generating the contour plot. I > am trying to generate the geometry of domain using PLOTS command. The > geometry is very simple and can be generated by drawing a view > horizontal nd vertical lines. But when i use PLOTS command to generate > geometry, for example, > PLOTS, [0, 0],[.9,.9], i get an error message like this > % PLOTS: Data coordinate system not established. > In other words, I am having trouble establishing the data coordinate system. > Can anybody tell me how to establish the data coordinate system in this regard? > thank you > Deb I'm not quite sure what you're trying to do, but PLOTS is basically the same as OPLOT (and usually OPLOT is preferred in my opinion). Is it that you are generating the contour plot and then trying to use PLOTS to draw a box within it (which should work)? Or are you trying to use PLOTS first to establish the coordinate system, followed by CONTOUR,/OVERPLOT? If the latter, then I would suggest substituting PLOT for PLOTS. However, if I understand what you're trying to do, it's much easier just to use CONTOUR itself to establish the coordinate system. Just leave off the /OVERPLOT qualifier. If necessary, you can use the XRANGE and YRANGE keywords to limit the range, e.g. CONTOUR, ARRAY, XPOINTS, YPOINTS, XRANGE=[0,0.9], YRANGE=[0,0.9] (I figure that you must want to call CONTOUR with all three parameters with a range like that). Bill Thompson