Commit | Line | Data |
---|---|---|
86530b38 AT |
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; |