Confusing Behavior of LogPlot vs. Plot
- To: mathgroup at smc.vnet.net
- Subject: [mg24838] Confusing Behavior of LogPlot vs. Plot
- From: AES <siegman at stanford.edu>
- Date: Tue, 15 Aug 2000 03:04:09 -0400 (EDT)
- Organization: Stanford University
- Sender: owner-wri-mathgroup at wolfram.com
If I run the following input cells with the "Table" cell commented out as shown, I get four valid and correct plots. Remove["Global`*"] Needs["Graphics`"] f[a_, x_] := Exp[-a x^2] a = 1; Plot[f[a, x], {x, -1, 1}] a = 1; LogPlot[f[a, x], {x, -1, 1}]; (* x = 3.; Table[{a, f[x, a]}, {a, 0, 2}] // TableForm *) a = 4; Plot[f[a, x], {x, -1, 1}] a = 4; LogPlot[f[a, x], {x, -1, 1}] If, however, I remove the (* and *) and run the notebook including the "Table" input cell, both "Plot" plots are still fine, still give correct results, but the second "LogPlot" cell doesn't give me a plot at all, it gives me the list of options for something called "ScaledPlot". (With various other test circumstances, the repeated "Plot" cells always continue to function OK, but the repeated "LogPlot" cell gives other weird results, e.g, a totally incorrect plot.) If I've somehow goofed on this, I apologize -- but if this is how LogPlot really works, I'd say that's inexcusably bad interface design. If LogPlot looks, smells, and feels like Plot, and does essentially the same job as Plot, it should *function* just like Plot.