Overview
Comment: | Refined rotation bar. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
c254a2279da12b61d7e4a2eea8a74cb6 |
User & Date: | geraint@users.sourceforge.net on 2002-07-20 14:19:14 |
Other Links: | branch diff | manifest | tags |
Context
2002-07-22
| ||
10:06:41 | Stopped make from reporting an error when application is closed. check-in: eb397570aa user: geraint@users.sourceforge.net tags: origin/master, trunk | |
2002-07-20
| ||
14:19:14 | Refined rotation bar. check-in: c254a2279d user: geraint@users.sourceforge.net tags: origin/master, trunk | |
2002-07-19
| ||
20:28:28 | Added preliminary 3D rotation. check-in: bead94a31b user: geraint@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/struc2gnuplot_txt2wish from [df61ed3cec] to [9e7d64559f].
︙ | ︙ | |||
144 145 146 147 148 149 150 | pack .plotbar.dim -expand false -fill x -side right pack .plotbar.plot -expand false -fill x -side right pack .plotbar.select -expand false -fill x -side right # button bar canvas .buttonbar | < | > > > > > > > > > > > > > > | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | pack .plotbar.dim -expand false -fill x -side right pack .plotbar.plot -expand false -fill x -side right pack .plotbar.select -expand false -fill x -side right # button bar canvas .buttonbar button .buttonbar.replot -text "Refresh" -relief raised -command { puts "replot" } button .buttonbar.newwin -text "New Plot" -relief raised -command { set windownum [expr 1 + \$windownum] puts "set term x11 \$windownum" } pack .buttonbar.newwin -expand false -side right pack .buttonbar.replot -expand false -side right # rotation bar canvas .rotationbar scale .rotationbar.xrot -label "Rotate X" -orient h -from "0" -to "180" -command { do_rotate_3d "xrot" } scale .rotationbar.zrot -label "Rotate Z" -orient h -from "0" -to "360" -command { do_rotate_3d "zrot" } pack .rotationbar.xrot -side left pack .rotationbar.zrot -side right .rotationbar.xrot set 30 .rotationbar.zrot set 60 pack .rotationbar -expand false -fill x -side bottom proc "enable_rotationbar" "" { } proc "disable_rotationbar" "" { } ## parameter list canvas canvas .parameters listbox .parameters.list -background oldlace -foreground black scrollbar .parameters.yscrollbar -orient v ## configure scrollbars |
︙ | ︙ | |||
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | global ytitle global ztitle global dimension global plottype global lastplot switch -- \$dimension { 2D { switch -- \$plottype { Single { puts "set xlabel '\$xtitle'" puts "set ylabel '\$ytitle'" puts "set nokey" puts "plot '${dat2}' using \$xcolumn:\$ycolumn title 'y:\$ytitle x:\$xtitle' with lines" } Multi { puts "set xlabel ''" puts "set ylabel ''" puts "set key" if {"\$lastplot" != "2D"} { puts "plot '${dat2}' using \$xcolumn:\$ycolumn title 'y:\$ytitle x:\$xtitle' with lines" } else { puts "replot '${dat2}' using \$xcolumn:\$ycolumn title 'y:\$ytitle x:\$xtitle' with lines" } } } } 3D { switch -- \$plottype { Single { puts "set xlabel '\$xtitle'" puts "set ylabel '\$ytitle'" puts "set zlabel '\$ztitle'" puts "set nokey" puts "splot '${dat2}' using \$xcolumn:\$ycolumn:\$zcolumn title 'z:\$ztitle y:\$ytitle x:\$xtitle' with lines" | > > | 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 | global ytitle global ztitle global dimension global plottype global lastplot switch -- \$dimension { 2D { disable_rotationbar switch -- \$plottype { Single { puts "set xlabel '\$xtitle'" puts "set ylabel '\$ytitle'" puts "set nokey" puts "plot '${dat2}' using \$xcolumn:\$ycolumn title 'y:\$ytitle x:\$xtitle' with lines" } Multi { puts "set xlabel ''" puts "set ylabel ''" puts "set key" if {"\$lastplot" != "2D"} { puts "plot '${dat2}' using \$xcolumn:\$ycolumn title 'y:\$ytitle x:\$xtitle' with lines" } else { puts "replot '${dat2}' using \$xcolumn:\$ycolumn title 'y:\$ytitle x:\$xtitle' with lines" } } } } 3D { enable_rotationbar switch -- \$plottype { Single { puts "set xlabel '\$xtitle'" puts "set ylabel '\$ytitle'" puts "set zlabel '\$ztitle'" puts "set nokey" puts "splot '${dat2}' using \$xcolumn:\$ycolumn:\$zcolumn title 'z:\$ztitle y:\$ytitle x:\$xtitle' with lines" |
︙ | ︙ | |||
477 478 479 480 481 482 483 | if {"\$get_scale_status" == "ok"} { return "\$get_scale_retval" } else { return "" } } | < < < < < < < < < < < < < < < < < < < | | 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 | if {"\$get_scale_status" == "ok"} { return "\$get_scale_retval" } else { return "" } } proc "do_rotate_3d" "var val" { switch -- \$var { xrot { puts "set view \$val,,, ; replot" } zrot { puts "set view ,\$val,, ; replot" } scale { puts "set view ,,[expr pow(2,\$val)], ; replot" } zscale { puts "set view ,,,[expr pow(2,\$val)] ; replot" } } } # Defaults |
︙ | ︙ |
Modified mttroot/mtt/lib/rep/gnuplot_rep.make from [cb814bcb10] to [1f957a8152].
1 2 3 4 5 6 7 8 | # -*-makefile-*- # create a gnuplot input file MTTFLAGS = $(OPTS) all: $(SYS)_gnuplot.$(LANG) $(SYS)_gnuplot.view: $(SYS)_gnuplot.wish $(SYS)_odes.dat2 | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # -*-makefile-*- # create a gnuplot input file MTTFLAGS = $(OPTS) all: $(SYS)_gnuplot.$(LANG) $(SYS)_gnuplot.view: $(SYS)_gnuplot.wish $(SYS)_odes.dat2 sh $(SYS)_gnuplot.wish | gnuplot -geometry 400x300 2> .gnuplot.log $(SYS)_gnuplot.wish: $(SYS)_struc.txt $(MTTPATH)/trans/struc2gnuplot_txt2wish $(SYS) $(SYS)_gnuplot.txt: $(SYS)_struc.txt $(MTTPATH)/trans/struc2gnuplot_txt.exe $(MTTPATH)/trans/struc2gnuplot_txt.exe $(SYS) < $(SYS)_struc.txt > $(SYS)_gnuplot.txt |
︙ | ︙ |