tamaguchi has asked for the wisdom of the Perl Monks concerning the following question:

Im unexperienced in -tk and I would like to make a large diagram on a canvas. The diagram should be zoomable and graded in x and y direction. I would like the grading to be finer in the inzoomed stated and larger in outzoomed. (For example grading every single number in inzoomed but only grading every 100th number in the outzoomed). Are there any special tk-features that you would reccomend me to use when doing this? Thank you for any advice.

Replies are listed 'Best First'.
Re: Tk considering zoomable graded diagram
by zentara (Cardinal) on Oct 15, 2006 at 12:16 UTC
    See Re: A 2D layout of graphs in Perl/Tk for a way to zoom in the Tk Canvas. As far as the axis grading being zoomable in a custom fashion, there are a few options. For the easiest, just create a few sets of axis with different gradations, and replace the visible axis with the one of your choice for that zoom level( using tags probably). This a point where someone with real genius could get very creative, like dynamically detecting zoom-size and making a custom axis set for that level. Also, don't get locked into thinking your axis have to be on the same Canvas as your data. You can have them on separate canvases packed on the sides of your data canvas.... it might make things easier.

    I'm not really a human, but I play one on earth. Cogito ergo sum a bum
Re: Tk considering zoomable graded diagram
by vkon (Curate) on Oct 15, 2006 at 11:47 UTC
    In addition to chorus of replies that you now will get on perl/Tk, I'll make my suggestion to move to Tcl::Tk.

    It has the BLT package, the very graph expert for Tk, see http://vkonovalov.ru/cgi-bin/perl-tcltk-wiki.cgi/38.

    This requires Tcl/Tk (via Tcl::Tk CPAN module), which is similar to perl/Tk but more advanced