Re: Dynamic 2D plotting in V6

*To*: mathgroup at smc.vnet.net*Subject*: [mg77312] Re: [mg77195] Dynamic 2D plotting in V6*From*: DrMajorBob <drmajorbob at bigfoot.com>*Date*: Wed, 6 Jun 2007 07:28:28 -0400 (EDT)*References*: <25222452.1181098193253.JavaMail.root@m35>*Reply-to*: drmajorbob at bigfoot.com

This improves the picture somewhat: Panel[Column[{Row[{Slider[Dynamic[h]], Dynamic[h]}], Dynamic[Plot[-Log[10, h], {h, 1/10^14, 1}, PlotPoints -> 10, MaxRecursion -> 15, PlotRange -> {{-h/10, h}, {0, 14}}]]}]] And, to get more control, we can do this: {low, high} = 10^-{14, 8}; (* for instance *) Panel[Column[{Row[{Slider[Dynamic[h], {low, high}], Dynamic[h]}], Dynamic[Plot[-Log[10, h], {h, low, high}, PlotPoints -> 100, MaxRecursion -> 15, PlotRange -> {{-h/10, h}, {0, -Log[10, low]}}, ImageSize -> 500]]}]] Now I can adjust the slider to 10^-11 or so and see a smooth curve (still very steep) up to 14. To think, we used to take most of the chart on faith!! Bobby On Tue, 05 Jun 2007 05:52:59 -0500, Todd Allen <genesplicer28 at yahoo.com> wrote: > Hello All, > > First, let me congratulate WRI on the release of > Version 6....I think many of us are finding "golden > nuggets" that make this a very fun release to have in > our hands. > > I'm an educator and have always been interested in > finding a way to explain the concept of pH (defined as > the free concentration of hydrogen ions in a solution) > to my biology students. Plotting pH graphically has > always been out of the question because of the > tremendous range of values that pH relies upon (from > 1*10^-14 to 1). When I saw that Version 6 has dynamic > updating ability, I became excited with the > possibility that V6 might dynamically update one or > both axes on a graph and finally make it possible to > show students how pH changes as you vary the hydrogen > ion concentration. > > If you have V6, please copy-paste the following > short code and you can see how the slider bar does > change the x-axis (in this case the hydrogen ion > concentration) dynamically. > > Code: > > test2 = {Slider[Dynamic[h]], > Dynamic[Plot[-Log[10, h], {h, 1/10^14, 1}, > PlotRange -> {{0, h}, {0, 14}}]]} > > > The problem is that most of the interesting change in > the pH value is "compressed" along the leftmost side > of the slider so that the smooth, gradual increase in > pH (as hydrogen levels drop) is not well illustrated. > The graph itself looks "tied" to a pH value of 8, when > at very low hydrogen concentrations there should be a > nice gradual curve towards a pH of 14. > > Would anyone have any ideas how to solve this > compression issue and make the graph more illustrative > to students? > > Happy computing! > Todd > > > ___________________________________________________________________________________Be = > a better Heartthrob. Get better relationship answers from someone who > knows. Yahoo! Answers - Check it out. > http://answers.yahoo.com/dir/?link=list&sid=396545433 > > -- DrMajorBob at bigfoot.com