RE: New Plot output in version 5
- To: mathgroup at smc.vnet.net
- Subject: [mg44268] RE: [mg44247] New Plot output in version 5
- From: "David Park" <djmp at earthlink.net>
- Date: Tue, 4 Nov 2003 03:23:38 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Mariusz, It's true that the behavior here has changed from Version 4.2 to 5.0 but many people might consider it an improvement in that the more interesting part of the function is shown. However, I can see how it might be a little annoying when the Mathematica feature of picking out the more "interesting" portion of a plot doesn't pick what you want. But the fact is, to make a really nice plot you are almost always going to have to use plot options and fiddle with the plot. It is not only a feature of Mathematica but it is a feature of doing graphics. For example, with your step function I decided it would look better in a Frame without axes and that a much abreviated set of tick labels would better emphasize the essential nature of the function. So here is a plot after fiddling around. Needs["Graphics`Colors`"] Plot[UnitStep[x], {x, -1, 5}, PlotStyle -> Blue, Frame -> True, PlotRange -> {{-1.05, 5}, {-0.1, 1.5}}, Axes -> False, FrameLabel -> {x, f}, FrameTicks -> {Table[{i, i}, {i, -1, 5}], {{0, 0}, {1, 1}}, None, None}, PlotLabel -> "Unit Step Function", Background -> Linen, ImageSize -> 450]; If you want a quick plot you could use something like Plot[UnitStep[x], {x, -1, 12}]; but if you want a nice plot you are just going to have to use options. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Mariusz Jankowski [mailto:mjankowski at usm.maine.edu] To: mathgroup at smc.vnet.net I just noticed that Plot no longer obeys the domain limits given by its second argument. Try the following to reproduce my result: Plot[UnitStep[x], {x,-1,5}] This cannot possibly be a feature change, can it? I know I can force the desired behavior by using PlotRange, but why should I need to repeat myself? (At home, with my kids, I am used to it, but with Mathematica ... ) Mariusz