Tk Library Source Code

Check-in [4d3bce3fac]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Correct a problem with the bindlast command for dot objects
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4d3bce3fac764ce5d7408d36d20d2ed67cd9c03c
User & Date: markus 2017-03-21 11:48:07
Context
2017-03-22
13:01
* *.tcl: Bumped the version number to 5.17. * COPYRIGHT.txt: * README.txt: * ../../examples/*.tcl: * CHANGES.txt: Updated to reflect the changes. * doc/*.html: * scripts/*.tcl: Added the tree styles "arc", "blueMenta", "menta", "ubuntuMate", and "ubuntu3"; added the "dicttoitem" and "itemtodict" subcommands; added support for the virtual event <<TablelistViewUpdated>>; added bindings for toggling the selection state of individual items and elements; added support for the keyboard shortcuts <Control-a> and <Shift-Control-A> as alternatives to <Control-slash> and <Control-backslash>; improvements related to vertical scrolling. * scripts/tclIndex: Newly generated. * doc/arc.png: Added screenshots. * doc/blueMenta.png: * doc/menta.png: * doc/ubuntuMate.png: * doc/ubuntu3.png: * doc/*.png: Updated screenshots. check-in: 6c4771ff77 user: csaba tags: trunk
2017-03-21
11:48
Correct a problem with the bindlast command for dot objects check-in: 4d3bce3fac user: markus tags: trunk
2017-03-14
18:53
Add the minmax command as well as a small demonstration script. Now: version 2.4.1 check-in: f8a67fd482 user: markus tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/plotchart/ChangeLog.






1
2
3
4
5
6
7





2017-03-14  Arjen Markus  <arjenmarkus@users,sourceforge.net>
	* plotchart.man:  Describe the "minmax" command
	* plotchart.tcl:  Add the "minmax" command
	* plotpriv.tcl:   Add the DrawMinMax procedure that implements the "minmax" command
	* pkgIndex.tcl:   Bumped version to 2.4.1
	* testregion.tcl: New test/demo script for demostrating the region and minmax commands

>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2017-03-21  Arjen Markus  <arjenmarkus@users,sourceforge.net>
	* plotchart.tcl:  Correct omission - dot plotting command for polar plots
	* plotpriv.tcl:   Remove obsolete procedures (DrawLog*Dot and DrawPolarDot) - they have been replaced by DrawDot
	                  Store the coordinates of the last dot, so that "bindlast" will work properly for dots as well

2017-03-14  Arjen Markus  <arjenmarkus@users,sourceforge.net>
	* plotchart.man:  Describe the "minmax" command
	* plotchart.tcl:  Add the "minmax" command
	* plotpriv.tcl:   Add the DrawMinMax procedure that implements the "minmax" command
	* pkgIndex.tcl:   Bumped version to 2.4.1
	* testregion.tcl: New test/demo script for demostrating the region and minmax commands

Changes to modules/plotchart/plotchart.tcl.

233
234
235
236
237
238
239

240
241
242
243
244
245
246
   set methodProc(polarplot,legendconfig)      LegendConfigure
   set methodProc(polarplot,legend)            DrawLegend
   set methodProc(polarplot,removefromlegend)  RemoveFromLegend
   set methodProc(polarplot,balloon)           DrawBalloon
   set methodProc(polarplot,balloonconfig)     ConfigBalloon
   set methodProc(polarplot,plaintext)         DrawPlainText
   set methodProc(polarplot,plaintextconfig)   ConfigPlainText

   set methodProc(polarplot,labeldot)          DrawLabelDot
   set methodProc(polarplot,canvas)            GetCanvas
   set methodProc(polarplot,deletedata)        DeleteData
   set methodProc(histogram,title)             DrawTitle
   set methodProc(histogram,subtitle)          DrawSubtitle
   set methodProc(histogram,xtext)             DrawXtext
   set methodProc(histogram,xsubtext)          DrawXsubtext







>







233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
   set methodProc(polarplot,legendconfig)      LegendConfigure
   set methodProc(polarplot,legend)            DrawLegend
   set methodProc(polarplot,removefromlegend)  RemoveFromLegend
   set methodProc(polarplot,balloon)           DrawBalloon
   set methodProc(polarplot,balloonconfig)     ConfigBalloon
   set methodProc(polarplot,plaintext)         DrawPlainText
   set methodProc(polarplot,plaintextconfig)   ConfigPlainText
   set methodProc(polarplot,dot)               DrawDot
   set methodProc(polarplot,labeldot)          DrawLabelDot
   set methodProc(polarplot,canvas)            GetCanvas
   set methodProc(polarplot,deletedata)        DeleteData
   set methodProc(histogram,title)             DrawTitle
   set methodProc(histogram,subtitle)          DrawSubtitle
   set methodProc(histogram,xtext)             DrawXtext
   set methodProc(histogram,xsubtext)          DrawXsubtext

Changes to modules/plotchart/plotpriv.tcl.

3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497

            set newdot [$w create oval $x1 $y1 $x2 $y2 -fill $newcolour -outline {} \
                            -tag [list data $w data_$series]]
            $w scale $newdot $xcentre $ycentre $factor $factor
        }
    }

    $w lower [list data && $w]
}

# DrawLog*Dot, DrawPolarDot --
#    Draw a dot at the given coordinates - variants for logarithmic axes and polar axis
# Arguments:
#    w           Name of the canvas
#    series      Data series (identifier for the vectors)
#    xcrd        X coordinate of start or centre
#    ycrd        Y coordinate of start or centre
#    value       Value to be used
# Result:
#    None
# Side effects:
#    New oval drawn in canvas
#
proc ::Plotchart::DrawLogXDot { w series xcrd ycrd value } {

    DrawDot $w $series [expr {log10($xcrd)}] $ycrd $value
}

proc ::Plotchart::DrawLogYDot { w series xcrd ycrd value } {

    DrawDot $w $series $xcrd [expr {log10($ycrd)}] $value
}

proc ::Plotchart::DrawLogXLogYDot { w series xcrd ycrd value } {

    DrawDot $w $series [expr {log10($xcrd)}] [expr {log10($ycrd)}] $value
}

proc ::Plotchart::DrawPolarDot { w series rad phi value } {
   variable torad
   set xcrd [expr {$rad*cos($phi*$torad)}]
   set ycrd [expr {$rad*sin($phi*$torad)}]

   DrawDot $w $series $xcrd $ycrd $value
}

# DrawRchart --
#    Draw data together with two horizontal lines representing the
#    expected range
# Arguments:
#    w           Name of the canvas
#    series      Data series
#    xcrd        X coordinate of the data point







<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
|
|
<
|
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<







3445
3446
3447
3448
3449
3450
3451


3452














3453

3454
3455

3456

3457














3458
3459
3460
3461
3462
3463
3464

            set newdot [$w create oval $x1 $y1 $x2 $y2 -fill $newcolour -outline {} \
                            -tag [list data $w data_$series]]
            $w scale $newdot $xcentre $ycentre $factor $factor
        }
    }



    set data_series($w,$series,x) $xcrd














    set data_series($w,$series,y) $ycrd


    $w lower [list data && $w]

}
















# DrawRchart --
#    Draw data together with two horizontal lines representing the
#    expected range
# Arguments:
#    w           Name of the canvas
#    series      Data series
#    xcrd        X coordinate of the data point