>  Docs Center  >  Libraries  >  Coyote  >  CGZPLOT__DEFINE


  This program creates a "zoomable" line plot in an interactive, resizable window. The user
  can zoom into or out of the plot. Once a plot is zoomed, the user can then pan the plot
  in both the X and Y directions. See the operating instructions for how to interact
  with the line plot.
  Operating Instructions--
  Use the LEFT mouse button to zoom the plot and the RIGHT mouse button to pan the plot.
  If you click and drag inside the plot axes, you will create a rubber band box. Select the
  portion of data you wish to zoom into. The zoom will occur in both the X and Y directions.
  If you wish to zoom the plot all the way back out, simply click and release the LEFT mouse
  button inside the plot axes without moving the mouse.
  Once you are zoomed into a plot, you can adjust the zoom by clicking the LEFT mouse button
  outside the plot axes. If you click the mouse below the plot, you will cause the X axis to
  zoom out of the plot by the zoomFactor amount (normally 5% of the current range of the axis).
  If you wish to zoom the X axis into the plot, simply click above in the region of the window
  above the plot. Click below the plot to zoom out, above the plot to zoom in. Similarly, you
  can adjust the zoom on the Y axis. Clicking to the left of the plot zooms the Y axis out,
  while clicking to the right of the plot zooms the Y axis in.
  If you are zoomed into the plot, you can pan to different locations in the plot by using
  the RIGHT mouse button. Hold and drag the RIGHT mouse button inside the plot axes. The
  entire plot will pan in both the X and Y directions.
  that exact axis scaling is always in effect.




    Plot examples::
      cgZPlot, cgDemodata(1), PSYM=2, Color='dodger blue'
    To put this in your own widget program::
        tlb = Widget_Base(Title='My Program')
        cgZPlot, cgDemodata(1), PSYM=2, Color='dodger blue', Parent=tlb
        Widget_Control, tlb, /Realize
        Widget_Control, 'myprogram', tlb, /NoBlock


      David W. Fanning
      1645 Sheely Drive
      Fort Collins, CO 80526 USA
      Phone: 970-221-0438
      E-mail: david@idlcoyote.com
      Coyote's Guide to IDL Programming: http://www.idlcoyote.com


    Copyright (c) 2012, Fanning Software Consulting, Inc.


    Change History::
        Written 16 May 2012, by David W. Fanning.
        Added UNDO capability arbitrarily set to 50 items. 17 May 2012. DWF.
        Added a REDO capability and the ability to adjust the Y range (via a button) so that
          you can see the actual data Y range of all the data in the X range of a particular
          view of the data. 21 May 2012. DWF.
        Added a PARENT keyword and changed the algorithm slightly so that this
          interactive widget functionality can be incorporated into your own
          widget programs. 21 may 2012. DWF.
        Added compile options idl2 to all modules. Fixed a typo for REDO button. 14 June 2012. DWF.
        Separated the object code from the driver code for easier inheritance. 14 June 2012. DWF.
        Removed the POLAR keyword, which can't be used in a zoom plot. 15 June 2012. DWF.
        Added a persistent output save directory. 30 June 2012. DWF.
        Added an ERASE method to erase the current display. 10 July 2012. DWF.
        Added a LABEL keyword to add a label instead of a title to a plot. 13 July 2012. DWF.
        Added the ability to include overplot objects in the zoom window. 17 July 2012. DWF.

© 2022 L3Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Contact Us