Description: |
Hi, in plotpriv.tcl, for instance ::Plotchart::WidthCanvas, it is used a piece of code to extract the canvas path name from the plot id, the expression used is:
set w [string range $w 2 end]
This expression assume that the first two character correspond to the index of the plot within the canvas and it may fails if for some reason the plot number has 3 digit, ie, 100.
The expression to build the plot id is [format "%02d%s" $scaling($c,plots) $c] if $scaling($c,plots) has 3 or more digits then it results in an invalid identifier.
I have changed my copy of plotchart to use this expression:
string range $w [string first . $w] end
and it works as expected.
Bellow is a code to help reproducing the error, you have to resize the window until the error appears, eventually after the resize number 100.
package require Plotchart
canvas .c
pack .c -fill both -expand yes
bind .c <Configure> redraw
proc redraw { } {
.c delete all
::Plotchart::createXYPlot .c {0 1 0.1} {0 1 0.1}
}
|