Skip Menu |

This queue is for tickets about the Tk-GraphViz CPAN distribution.

Report information
The Basics
Id: 64089
Status: resolved
Priority: 0/
Queue: Tk-GraphViz

People
Owner: Nobody in particular
Requestors: ONEGRAY [...] cpan.org
oneingray [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: Ivan Shmakov <oneingray [...] gmail.com>
Subject: graphics produced is way too small by default
Date: Tue, 21 Dec 2010 02:02:50 +0600
To: bug-Tk-GraphViz [...] rt.cpan.org
From: Ivan Shmakov <ivan [...] main.uusia.org>
While trying to introduce myself to the Tk::GraphViz Perl module, I've found that the graphics produced into the canvas by the example code provided on the manual page is way to small. (I've tried it over several graphs found in ‘t/graphs/directed/’, to the similar effect.) Adding ‘$gv->fit ();’ before ‘$gv->show’ didn't rectify the issue. However, I was able to get reasonable results by using: $gv->zoom ("-in" => 1.0e5); The versions of some of the relevant packages (from Debian) are: ii libgraphviz-perl 2.04-1 ii perl 5.10.1-16 ii perl-tk 1:804.029-1+b1 -- FSF associate member #7257
Download (untitled)
application/pgp-signature 196b

Message body not shown because it is not plain text.

RT-Send-CC: ivan [...] main.uusia.org
Le Lun 20 Déc 2010 15:03:09, oneingray@gmail.com a écrit : Show quoted text
> While trying to introduce myself to the Tk::GraphViz Perl > module, I've found that the graphics produced into the canvas by > the example code provided on the manual page is way to small. > (I've tried it over several graphs found in > ‘t/graphs/directed/’, to the similar effect.) > > Adding ‘$gv->fit ();’ before ‘$gv->show’ didn't rectify the > issue. However, I was able to get reasonable results by using: > > $gv->zoom ("-in" => 1.0e5); > > The versions of some of the relevant packages (from Debian) are: > > ii libgraphviz-perl 2.04-1 > ii perl 5.10.1-16 > ii perl-tk 1:804.029-1+b1 >
Dear I have the same problem. I small image is create in up corner left. To resolv this problem, I have added an update before calling show method. #!/usr/bin/perl use warnings; use strict; use Tk; use Tk::GraphViz; my $mw = MainWindow->new(-title => 'GraphViz'); my $gv = $mw->GraphViz( qw/-width 500 -height 500/ )->pack ( qw/-expand 1 -fill both/ ); $mw->update; $gv->show ( 'XXXX/directed/grammar.dot',); MainLoop; But the graph is not well !!!
CC: oneingray [...] gmail.com
Subject: Re: [rt.cpan.org #64089] graphics produced is way too small by default
Date: Sat, 15 Jan 2011 04:30:06 +0600
To: bug-Tk-GraphViz [...] rt.cpan.org
From: Ivan Shmakov <ivan [...] main.uusia.org>
Show quoted text
>>>>> Djibril Ousmanou via RT <bug-Tk-GraphViz@rt.cpan.org> writes:
Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=64089 > > Le Lun 20 Déc 2010 15:03:09, oneingray@gmail.com a écrit :
Show quoted text
>> While trying to introduce myself to the Tk::GraphViz Perl module, >> I've found that the graphics produced into the canvas by the example >> code provided on the manual page is way to small. (I've tried it >> over several graphs found in ‘t/graphs/directed/’, to the similar >> effect.)
[…] Show quoted text
> I have the same problem. I small image is create in up corner left. > To resolv this problem, I have added an update before calling show > method.
[…] Show quoted text
> my $mw = MainWindow->new(-title => 'GraphViz'); > my $gv = $mw->GraphViz( qw/-width 500 -height 500/ > )->pack ( qw/-expand 1 -fill both/ );
Show quoted text
> $mw->update;
Show quoted text
> $gv->show ( 'XXXX/directed/grammar.dot',);
Show quoted text
> MainLoop;
It seems to fix the issue, thanks! However, the necessity of the ->update () call is never mentioned on the Tk::GraphViz(3pm) page. (And do I understand it correctly that it's the inherited Tk::Canvas(3pm) method that gets called, BTW?) Show quoted text
> But the graph is not well !!!
I've noted that certain graphs involving arcs that aren't drawn as straight line segments are rendered in a weird way (e. g., t/graphs/directed/world.dot.) OTOH, the graphs that don't end up using splines (e. g., t/graphs/directed/ER.dot) are rendered correctly. However, I guess that this issue warrants a separate bug report. -- FSF associate member #7257
Download (untitled)
application/pgp-signature 196b

Message body not shown because it is not plain text.

As of https://github.com/graphviz-perl/Tk-GraphViz/commit/863f499d9a791c468f290477a5c9b4b629f78da3 the ->show method now calls $self->MainWindow->update. I'm not a Tk expert but I can't imagine it doing any harm. The oddly-shaped arcs was caused by DOT output changes ably fixed by a contributor in RT#79377. Thanks for the report!