X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 18 Mar 2011 11:19 AM by  anon
Plot funcion in Widget
 0 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
18 Mar 2011 11:19 AM
    Hi all, I am porting (well, I am trying...) my old IDL 7.1 program to IDL 8.0 I have a GUI with Tabs and I cannot use the plot function on the right tab. The working old code is: widget_control, state.id_wave_vs_angle, get_value = id_wave_vs_angle wset, id_wave_vs_angle plot, state.dispersed_angle*!radeg, state.lambda(15,*), psym = 4, ystyle = 1, xtitle = 'Dispersion Angle [deg]', ytitle = 'dispersed Wavelength [micron]' ; where the widget id_wave_vs_angle comes from: Wave_Plot = Widget_Base(Grism_Designer, UNAME='Wlgth vs Dispersion' $ ,SCR_XSIZE=1200 ,SCR_YSIZE=400 ,TITLE='Wlgth vs Dispersion', /align_center, /row); ,SPACE=3,XPAD=3 ,YPAD=3) id_wave_vs_angle = Widget_draw(Wave_Plot, $ UNAME='wave_vs_angle' , SCR_XSIZE=850,SCR_YSIZE=380, retain=2) ;; And this works in IDL 7.1 Now, I tried with: widget_control, state.id_wave_vs_angle, get_value = oprova_obj w = oprova_obj[' '] w.select p = plot( state.dispersed_angle*!radeg, state.lambda(15,*)) p.sym_color = 'red' p.sym_size = 1. p.symbol = 'Diamond' p.xtitle = 'Dispersion Angle [deg]' p.ytitle = 'dispersed Wavelength [$\mu$ m]' ;; where the widget comes from: Wave_Plot = Widget_Base(Grism_Designer, UNAME='Wlgth vs Dispersion' $ ,SCR_XSIZE=1200 ,SCR_YSIZE=400 ,TITLE='Wlgth vs Dispersion', /align_center, /row); ,SPACE=3,XPAD=3 ,YPAD=3) id_wave_vs_angle = Widget_window(Wave_Plot, $ UNAME='wave_vs_angle' , SCR_XSIZE=850,SCR_YSIZE=380) ;,retain=2) But this does not work: it opens a new window! If I put /current it does nothing or it opens some strange patterns, like when the video card is getting crazy... Any ideas ? Thank you fab
    You are not authorized to post a reply.