Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Tk:: Graph menu not working to change the type of graph

by hgolden (Pilgrim)
on Sep 27, 2006 at 14:59 UTC ( [id://575164]=note: print w/replies, xml ) Need Help??


in reply to Tk:: Graph menu not working to change the type of graph

Hey,

So I can't run your program because I'm missing the data, but the first thing to try with things like this is calling $MW->update; after you change something. Sometimes that's all it takes.

Hays

Update: Why don't you try:

$ca->clear(); $setdisplay(whatever); $ca->redraw(); $mw->update;
I don't know if that will work any better, but it does use Tk::Graph's methods, which you might need to do. Maybe you can't change the type while the graph is drawn...

Also, the below posts are right, you should post your complete code, or at least a working version, so we can help you better.

Replies are listed 'Best First'.
Re^2: Tk:: Graph menu not working to change the type of graph
by wishartz (Beadle) on Sep 27, 2006 at 15:07 UTC
    I tried adding that in the function setdisplay, underneath $ca->configure(-type => $typ); but it didnt' work. The console behind my graph, prints the message
    ERROR in Tk::Graph:Tk::Graph::set #947: Option '-type' is incorrect! ( +) at /home/others/it/itwi/perl/lib/perl5/site_perl/5.6.1/Tk/Graph.pm +line 1802, <IN> line 9318. Bars
    The last line which says'Bars' is the contents of the $typ variable being passed to the setdisplay function. Which whould be correct, I don't know why it is reporting -type is incorrect?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://575164]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2025-05-24 12:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.