home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _6f2b1fc916f52b646dfce4467604e632 < prev    next >
Encoding:
Text File  |  2004-06-01  |  824 b   |  29 lines

  1. # plot.pl
  2.  
  3. use Plot;
  4. use vars qw/$TOP/;
  5.  
  6. sub plot {
  7.  
  8.     # Create a top-level window containing a canvas displaying a simple
  9.     # graph with data points that can be dragged with the pointing device.
  10.  
  11.     my($demo) = @_;
  12.     $TOP = $MW->WidgetDemo(
  13.         -name     => $demo,
  14.         -text     => "This window displays a canvas widget containing a simple 2-dimensional plot.  You can doctor the data by dragging any of the points with mouse button 1.\n\nYou can also select a printable area with the mouse button 2.",
  15.         -title    => 'Plot Demonstration',
  16.         -iconname => 'plot',
  17.     );
  18.  
  19.     my $c = $TOP->Plot(
  20.         -title_color        => 'Brown',
  21.         -inactive_highlight => 'Skyblue2',
  22.         -active_highlight   => 'red',
  23.     );
  24.     $c->pack(qw/-fill x/);
  25.  
  26. } # end plot
  27.  
  28. 1;
  29.