summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/plot.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/plot.pl')
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/plot.pl28
1 files changed, 28 insertions, 0 deletions
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/plot.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/plot.pl
new file mode 100644
index 00000000000..1f7d3d03904
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/plot.pl
@@ -0,0 +1,28 @@
+# plot.pl
+
+use Plot;
+use vars qw/$TOP/;
+
+sub plot {
+
+ # Create a top-level window containing a canvas displaying a simple
+ # graph with data points that can be dragged with the pointing device.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -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.",
+ -title => 'Plot Demonstration',
+ -iconname => 'plot',
+ );
+
+ my $c = $TOP->Plot(
+ -title_color => 'Brown',
+ -inactive_highlight => 'Skyblue2',
+ -active_highlight => 'red',
+ );
+ $c->pack(qw/-fill x/);
+
+} # end plot
+
+1;