From: Vadim V. Z. <vv...@us...> - 2004-10-30 08:21:25
|
Update of /cvsroot/maxima/maxima/interfaces/xmaxima/Tkmaxima In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9392/interfaces/xmaxima/Tkmaxima Modified Files: Plotconf.tcl Plotdf.tcl Log Message: Direction Field plotting support by Jaime E. Villate Index: Plotconf.tcl =================================================================== RCS file: /cvsroot/maxima/maxima/interfaces/xmaxima/Tkmaxima/Plotconf.tcl,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Plotconf.tcl 13 Oct 2004 12:08:58 -0000 1.9 +++ Plotconf.tcl 30 Oct 2004 08:21:07 -0000 1.10 @@ -1097,7 +1097,7 @@ if { "[lindex $command 0]" == "plot2d" } { lappend command -xfun {} } - foreach v $args { [lappend command $v] } + foreach v $args { lappend command $v } eval $command #eval [lindex [lindex $data 0] 0] -xfun [list {}] -data [list [lindex $data 0]] $args } Index: Plotdf.tcl =================================================================== RCS file: /cvsroot/maxima/maxima/interfaces/xmaxima/Tkmaxima/Plotdf.tcl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Plotdf.tcl 13 Oct 2004 12:08:58 -0000 1.6 +++ Plotdf.tcl 30 Oct 2004 08:21:07 -0000 1.7 @@ -33,7 +33,7 @@ {parameters "" "List of parameters and values eg k=3,l=7+k"} {sliders "" "List of parameters ranges k=3:5,u"} {linecolors { green black brown gray black} "colors to use for lines in data plots"} - {doTrajectoryAt "" "Place to calculate trajectory"} + {trajectory_at "" "Place to calculate trajectory"} {linewidth "1.0" "Width of integral lines" } {nolines 0 "If not 0, plot points and nolines"} {bargraph 0 "If not 0 this is the width of the bars on a bar graph" } @@ -56,26 +56,26 @@ catch { set top [winfo parent $win]} catch { - wm title $top "Direction Fields" + wm title $top [mc "Direction Fields"] wm iconname $top "DF plot" # wm geometry $top 750x700-0+20 } - set wb $w.buttons + set wb $w.plotmenu makeLocal $win buttonFont label $w.msg -wraplength 600 -justify left -text [mc "A direction field plotter by William Schelter"] -font $buttonFont - button $wb.integrate -text [mc "Integrate"] -command "setForIntegrate $w" -font $buttonFont - setBalloonhelp $win $wb.integrate [mc {Causes clicking on the plot with the left mouse button at a point, to draw a trajectory passing through that point. Under Config there is an entry box which allows entering exact x,y coordinates, and which also records the place of the last trajectory computed.}] + $wb.m add command -label [mc "Integrate"] -command "setForIntegrate $w" -font $buttonFont + ## setBalloonhelp $win $wb.integrate [mc "Causes clicking on the plot with the left mouse button at a point, to draw a trajectory passing through that point. Under Config there is an entry box which allows entering exact x,y coordinates, and which also records the place of the last trajectory computed."] - button $wb.plotversust -text [mc "Plot Versus t"] -command "plotVersusT $w" -font $buttonFont - setBalloonhelp $win $wb.plotversust [mc "Plot the x and y values for the last trajectory versus t."] + $wb.m add command -label [mc "Plot Versus t"] -command "plotVersusT $w" -font $buttonFont + ## setBalloonhelp $win $wb.plotversust [mc "Plot the x and y values for the last trajectory versus t."] setForIntegrate $w - pack $wb.integrate -side top -expand 1 -fill x - pack $wb.plotversust -side top -expand 1 -fill x # pack $w.msg -side top pack $w + place $wb -in $w -x 2 -y 2 -anchor nw + raise $wb return $win } @@ -157,11 +157,11 @@ makeLocal $win xradius yradius c tstep nsteps direction linewidth tinitial versus_t linecolors linkLocal $win didLast trajectoryStarts set rtosx rtosx$win ; set rtosy rtosy$win - oset $win doTrajectoryAt [format "%.10g %.10g" $x0 $y0] + oset $win trajectory_at [format "%.10g %.10g" $x0 $y0] lappend trajectoryStarts [list $x0 $y0] set didLast {} - # puts "doing at $doTrajectoryAt" + # puts "doing at $trajectory_at" set steps $nsteps if { "$tstep" == "" } { set h [expr {[vectorlength $xradius $yradius] / 200.0}] @@ -462,7 +462,7 @@ set data "" } - makeLocal $win c dxdt dydt tinitial nsteps xfun doTrajectoryAt parameters + makeLocal $win c dxdt dydt tinitial nsteps xfun trajectory_at parameters setUpTransforms $win 1.0 setXffYff $dxdt $dydt $parameters @@ -470,8 +470,8 @@ setForIntegrate $win oset $win curveNumber -1 drawDF $win $tinitial - if { "$doTrajectoryAt" != "" } { - eval doIntegrate $win $doTrajectoryAt + if { "$trajectory_at" != "" } { + eval doIntegrate $win $trajectory_at } set xfundata "" foreach v [sparseListWithParams $xfun {x y t} $parameters ] { @@ -509,11 +509,11 @@ mkentry $wb1.$w [oloc $win $w] $w $buttonFont pack $wb1.$w -side bottom -expand 1 -fill x } - mkentry $wb1.doTrajectoryAt [oloc $win doTrajectoryAt] \ + mkentry $wb1.trajectory_at [oloc $win trajectory_at] \ "Trajectory at" $buttonFont - bind $wb1.doTrajectoryAt.e <KeyPress-Return> \ - "eval doIntegrate $win \[oget $win doTrajectoryAt\] " - pack $wb1.doTrajectoryAt $frdydx -side bottom -expand 1 -fill x + bind $wb1.trajectory_at.e <KeyPress-Return> \ + "eval doIntegrate $win \[oget $win trajectory_at\] " + pack $wb1.trajectory_at $frdydx -side bottom -expand 1 -fill x if { "[oget $win dydx]" != "" } { swapChoose $win dydx $frdydx } setForIntegrate $win } |