MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Clever Tricky Solutions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94163] Re: Clever Tricky Solutions
  • From: David Bailey <dave at removedbailey.co.uk>
  • Date: Sat, 6 Dec 2008 06:14:44 -0500 (EST)
  • References: <gh8hi6$qur$1@smc.vnet.net>

Donald DuBois wrote:
> Here is a simple example of why more people don't use Mathematica.
> 
> px1 = Plot[1/2 Sin[3.14 x ], {x, 1, 2 }, AxesOrigin -> {0, 0}]
> 
> px2 = Plot[Sin[3.14 x ], {x, 0, 1 }, AxesOrigin -> {0, 0}]
> 
> Show[px1, px2] does NOT show both graphs.
> 
> There are multiple steps that the user might go through
> that may help.  A list below in the order that I think most people who are not Mathematica aficionados would use: 
> 
> (1) Go to the Show Help page  which is no help at all.
> 
> (2) Do Options[Show]  which produces  {}.
> 
> (3) Digging a little further, you have to realize the px1 and px2 are Graphics objects and that Show inherits these options so do a Options[Graphics].  After playing around with the different options starting with the word "Axes" [since the problem seems to be the axes in the positive half of the graph are missing] you hit upon PlotRange->All does the trick.
> 
> I'm sure there are reasons why Show does not work in an intuitive, easy to use fashion.  But the end result is, since most people don't have the time or patience to go through this mind numbing exercise to get a simple job done, they will use Mathematica only when all other packages fail to deliver what they need.  Not a good way of expanding the user base, in my opinion.  Clever, tricky solutions are no solutions at all.
> 
While I have some sympathy with your specific complaint - and maybe 
Mathematica needs a command that would merge plots by calculating the 
bounding rectangle, I do think your general comments are grossly unfair.

Any program that has the breadth of possibilities of Mathematica, will 
take some time to learn! Furthermore, if there is some task that you 
need to do regularly, and which is a bit tricky using stand alone 
commands, you can simply program that task and even arrange for the code 
to be auto-loaded when Mathematica starts.

BTW, if you want to plot a piecewise function, why not do so explicitly 
(and also use the proper value for Pi):

Plot[Piecewise[{{Sin[Pi x],x<=1},{1/2 Sin[Pi x],x>1}}],{x,0,2}]

David Bailey
http://www.dbaileyconsultancy.co.uk


  • Prev by Date: Re: Clever Tricky Solutions
  • Next by Date: Re: Clever Tricky Solutions
  • Previous by thread: Re: Clever Tricky Solutions
  • Next by thread: Re: Clever Tricky Solutions