       Re: Re: What's going on here (Table-generated lists)?

• To: mathgroup at smc.vnet.net
• Subject: [mg98152] Re: [mg98104] Re: What's going on here (Table-generated lists)?
• From: DrMajorBob <btreat1 at austin.rr.com>
• Date: Tue, 31 Mar 2009 04:20:53 -0500 (EST)
• References: <gqn8ua\$p\$1@smc.vnet.net> <200903300943.EAA08071@smc.vnet.net>
• Reply-to: drmajorbob at bigfoot.com

```It's not entirely unavoidable, but there are cases where it's almost so.

For instance,

Plot[x /. Solve[x^3 - x^2 + b x + 1 == 0, x], {b, -5, 5}]

For different b values there are 1, 2, or 3 solutions. Colors COULD be
assigned after the points are calculated, but what colors should be used,
and where?

Or look at the colors in the evaluated version:

Plot[x /. Solve[x^3 - x^2 + b x + 1 == 0, x]//Evaluate, {b, -5, 5}]

Bobby

On Mon, 30 Mar 2009 04:43:52 -0500, AES <siegman at stanford.edu> wrote:

> In article <gqn8ua\$p\$1 at smc.vnet.net>,
>  Bill Rowe <readnews at sbcglobal.net> wrote:
>
>> >I still don't see why it doesn't make sense
>> >for Plot to recognize a list as an actual list and plot each with a
>> >different color.
>>
>> Plot does this when the argument provided is a list, That is
>>
>> Plot[{x,x^2},{x,0,1}]
>>
>> will plot two curves in two different colors.
>
> But
>
>      Plot[0.5{x,x^2}, {x,0,1}]
>
> will not plot two curves in two different colors -- right? --
> despite the fact that evaluating  0.5{x,x^2}  by itself
> displays as  {0.5 x, 0.5 x^2} );  and
>
>      Plot[{0.5x, 0.5x^2}, {x, 0, 1}]
>
> does plot two curves in two different colors
>
>> What answer are you looking for here?
>
> In my case (I'm not the OP), not an explanation of why this happens
> (I've come to sort of understand this); but as purely curiosity
> questions (since this behavior of Plot comes up time after time):
>
> 1)  Is having this weird and confusing behavior in the Plot[] command
> somehow necessary, unavoidable, for reasons deep in the fundamental
> structure of Mathematica? -- or is this merely a bad design choice made
> long ago, that one would wish could now be extirpated (but probably
> can't be)?
>
> 2)  Does Wolfram have any understanding of how much the string of
> endless "gotchas" like this damage the usability of Mathematica for
> ordinary users (as contrasted to full time professional programmers)?
>
> 3)  Should maybe evaluating  0.5{x,x^2}  by itself display as
>
>    { {0.5 x, 0.5 x^2} }
>
> since that's what it really is?  (Or should Plot[] maybe strip off the
> outer { }'s if given this as the function to be plotted?)
>

--
DrMajorBob at bigfoot.com

```

• Prev by Date: Re: manipulate, NDSolve, Evaluate
• Next by Date: Re: Exporting a discrete Manipulate[] sequence?
• Previous by thread: Re: What's going on here (Table-generated lists)?
• Next by thread: Re: What's going on here (Table-generated lists)?