Ok, it returns a string, a path, but every such tk path is an object if given to  Tkx::widget->new()

#!/usr/bin/perl -- use strict; use warnings; use Tkx; local $Tkx::TRACE=64; Tkx::package_require(q/Plotchart/); my $mw = Tkx::widget->new("."); my $canvas = $mw->new_tk__canvas( qw/-background white /); $canvas->g_pack(qw/ -expand 1 -fill both /); my $s = Tkx::Plotchart__createXYPlot($canvas, [qw{0.0 100.0 10.0}], [ +qw{0.0 100.0 20.0}] ); $s = Tkx::widget->new( $s ); my @xy = qw{0.0 32.0 10.0 50.0 25.0 60.0 78.0 11.0 }; for( my $ix = 0; $ix < @xy; $ix+=2 ){ my $x = $xy[$ix]; my $y = $xy[$ix+1]; $s->plot("series1", $x, $y); } $s->title("Data series"); $mw->g_wm_withdraw(); $mw->g_wm_deiconify(); Tkx::MainLoop(); __END__ #~ http://tcllib.sourceforge.net/doc/plotchart.html #~ package require Plotchart #~ #~ canvas .c -background white -width 400 -height 200 #~ pack .c -fill both #~ #~ # #~ # Create the plot with its x- and y-axes #~ # #~ set s [::Plotchart::createXYPlot .c {0.0 100.0 10.0} {0.0 100.0 + 20.0}] #~ #~ foreach {x y} {0.0 32.0 10.0 50.0 25.0 60.0 78.0 11.0 } { #~ $s plot series1 $x $y #~ } #~ #~ $s title "Data series __END__ Tkx-1-0.0s---5: package require Plotchart Tkx-2-0.1s---7: winfo children . Tkx-3-0.1s---7: tk::canvas .c -background white Tkx-4-0.1s---8: pack .c -expand 1 -fill both Tkx-5-0.1s---9: Plotchart::createXYPlot .c [list 0.0 100.0 10.0] [list + 0.0 100.0 20.0] Tkx-6-0.1s---16: xyplot_.c plot series1 0.0 32.0 Tkx-7-0.1s---16: xyplot_.c plot series1 10.0 50.0 Tkx-8-0.1s---16: xyplot_.c plot series1 25.0 60.0 Tkx-9-0.1s---16: xyplot_.c plot series1 78.0 11.0 Tkx-10-0.1s---18: xyplot_.c title {Data series} Tkx-11-0.1s---20: wm withdraw . Tkx-12-0.1s---21: wm deiconify .

In reply to Re^2: Tkx.pm: invoke features of 'tcllib' by Anonymous Monk
in thread Tkx.pm: invoke features of 'tcllib' by saunderson

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.