Changeset 1614 for trunk/gui/scripts/xyresult.tcl
- Timestamp:
- Nov 16, 2009 3:02:37 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/xyresult.tcl
r1606 r1614 488 488 # if we haven't created the popup yet, do it now 489 489 Rappture::Balloon $popup \ 490 490 -title "[Rappture::filexfer::label downloadWord] as..." 491 491 set inner [$popup component inner] 492 492 label $inner.summary -text "" -anchor w … … 559 559 } 560 560 image { 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 561 set popup .xyprintdownload 562 if { ![winfo exists $popup] } { 563 # Create a popup for the print dialog 564 Rappture::Balloon $popup -title "Save as image..." 565 set inner [$popup component inner] 566 # Create the print dialog widget and add it to the 567 # the balloon popup. 568 Rappture::XyPrint $inner.print 569 $popup configure \ 570 -deactivatecommand [list $inner.print reset] 571 blt::table $inner 0,0 $inner.print -fill both 572 } 573 update 574 # Activate the popup and call for the output. 575 foreach { widget toolName plotName } $args break 576 $popup activate $widget left 577 set inner [$popup component inner] 578 set output [$inner.print print $itk_component(plot) \ 579 $toolName $plotName] 580 $popup deactivate 581 581 return $output 582 582 } … … 721 721 set elem "elem[incr count]" 722 722 set _elem2curve($elem) $curve 723 723 lappend label2elem($label) $elem 724 724 $g element create $elem -x $xv -y $yv \ 725 725 -symbol $sym -pixels $pixels -linewidth $lwidth \ 726 726 -label $label \ 727 727 -color $color -dashes $dashes \ 728 728 -mapx $mapx -mapy $mapy … … 732 732 # Fix duplicate labels by appending the simulation number 733 733 foreach label [array names label2elem] { 734 735 736 737 738 739 740 741 742 743 744 } 734 if { [llength $label2elem($label)] == 1 } { 735 continue 736 } 737 foreach elem $label2elem($label) { 738 set curve $_elem2curve($elem) 739 scan [$curve hints xmlobj] "::libraryObj%d" suffix 740 incr suffix 741 set elabel [format "%s \#%d" $label $suffix] 742 $g element configure $elem -label $elabel 743 } 744 } 745 745 746 746 foreach curve $_clist { … … 827 827 set logmin [expr {floor(log10(abs($min)))}] 828 828 set logmax [expr {ceil(log10(abs($max)))}] 829 829 if 0 { 830 830 if {[string match y* $axis]} { 831 831 # add a little padding … … 835 835 set logmax [expr {$logmax+0.05*$delta}] 836 836 } 837 837 } 838 838 } 839 839 if {$logmin < -300} { … … 856 856 set max $_limits(${axis}lin-max) 857 857 858 858 if 0 { 859 859 if {[string match y* $axis]} { 860 860 # add a little padding … … 863 863 set max [expr {$max+0.05*$delta}] 864 864 } 865 865 } 866 866 } 867 867 if {$min < $max} {
Note: See TracChangeset
for help on using the changeset viewer.