Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
Re: FLOW3, PLOT and XOBJVIEW on same spinning window!!
"elias" wrote... > Thank you sir for your promptly replay. However, I still have one > more doubt. > > I have vectors plotted from the FLOW3 procedure and a plot of lines > that I did with PLOT by having the coordinates as input. I have these > two in the same window. > > I did what you suggested me to do, but how can I define in the line: > oWindow = obj_new('IDLgrWindow', retain=3), to plot the axes and the > PLOT and the FLOW3 output in that window where I can spin the whole > thing at the same time? Because this line is just showing me a black > window, and the axes are appearing in a separate window where I can > spin with the mouse. You can't. You are still trying to mix the object graphics system with the direct graphics system and they can't render to the same window. David suggested using the AXIS procedure to create your axes instead of using the IDLgrAxis object. This would allow you to render everything in the same window. If you are still confused about the two graphics systems I suggest spending some time with the docs. > xaxis = OBJ_NEW('IDLgrAxis', 0, RANGE=[0, 49.0], TICKDIR=1, > COLOR=[255,0,0],ticklen=ticklen) > yaxis = OBJ_NEW('IDLgrAxis', 1, RANGE=[0, 49.0], > TICKDIR=1,COLOR=[255,0,0],ticklen=ticklen) > zaxis = OBJ_NEW('IDLgrAxis', 2, RANGE=[70, 0.0], > TICKDIR=1,COLOR=[255,0,0],ticklen=ticklen) > > xAxis->GetProperty, ticklen=ticklen > yAxis->GetProperty, ticklen=ticklen > zAxis->GetProperty, ticklen=ticklen > > oWindow = obj_new('IDLgrWindow', retain=3) > > oView->Add, [xaxis, yaxis, zaxis] > oView->Reset, oWindow > oWindow->Draw, oView > xobjview, oView All of this code (while mostly right) will not work with your FLOW3 and PLOT output. > I hope this is possible to get done, to ease my capabilities to rotate > what I did with PLOT and FLOW3. It is possible using direct graphics but you will have to write an application to handle the manipulation since XOBJVIEW is for viewing object graphics only. -Rick
Hi Elias, The FLOW3 procedure was written in 1991 before IDL object graphics was created. You have the source code to FLOW3 in flow3.pro. I would recommend making changes to that procedure so that it generates object graphics instead of direct graphics. For example, where flow3.pro calls PLOT you could substitute a call to OBJ_NEW. You could change FLOW3 so as to return the object graphics that it generates. Then you could draw all of your results with XOBJVIEW. In that case, you would not need to create your own IDLgrWindow. -Paul Sorenson www.paulsorenson.com "elias" <heoa@hotmail.com> wrote in message news:e920fce6.0405291933.3d433743@posting.google.com... > Thank you sir for your promptly replay. However, I still have one > more doubt. > > I have vectors plotted from the FLOW3 procedure and a plot of lines > that I did with PLOT by having the coordinates as input. I have these > two in the same window. > > I did what you suggested me to do, but how can I define in the line: > oWindow = obj_new('IDLgrWindow', retain=3), to plot the axes and the > PLOT and the FLOW3 output in that window where I can spin the whole > thing at the same time? Because this line is just showing me a black > window, and the axes are appearing in a separate window where I can > spin with the mouse. > > xaxis = OBJ_NEW('IDLgrAxis', 0, RANGE=[0, 49.0], TICKDIR=1, > COLOR=[255,0,0],ticklen=ticklen) > yaxis = OBJ_NEW('IDLgrAxis', 1, RANGE=[0, 49.0], > TICKDIR=1,COLOR=[255,0,0],ticklen=ticklen) > zaxis = OBJ_NEW('IDLgrAxis', 2, RANGE=[70, 0.0], > TICKDIR=1,COLOR=[255,0,0],ticklen=ticklen) > > xAxis->GetProperty, ticklen=ticklen > yAxis->GetProperty, ticklen=ticklen > zAxis->GetProperty, ticklen=ticklen > > oWindow = obj_new('IDLgrWindow', retain=3) > > oView->Add, [xaxis, yaxis, zaxis] > oView->Reset, oWindow > oWindow->Draw, oView > xobjview, oView > > > I hope this is possible to get done, to ease my capabilities to rotate > what I did with PLOT and FLOW3. > > Thank you very much, > > Elias