MathGroup Archive 2010

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

Search the Archive

Re: plot colored ellipsoid

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110841] Re: plot colored ellipsoid
  • From: Darren Glosemeyer <darreng at wolfram.com>
  • Date: Thu, 8 Jul 2010 03:15:46 -0400 (EDT)

Jordi wrote:
> Hi,
>
> For some reason I cannot color my ellipsoid. 
> I use, e.g.,
> Graphics[{Black, 
>   Ellipsoid[{1.4, 1.4}, {1.4, 5.7}, {{-0.7, 0.6}, {-0.6, -0.7}}]}]
>
> Other graphics options like 'Thick' or 'Dashed' pose no problem, but it always comes with the standard color.
>
> any idea?
>
> Thanks
>
>   

This is a bug that has been fixed in the version under development. The 
processing of directives wasn't digging deep enough into an Ellipsoid's 
Graphics representation for the directives to be applied properly. The 
following function could be used as a workaround in version 7.

<< MultivariateStatistics`

styleEllipsoid[ellipsoid_, style__] :=  Graphics[ellipsoid] /. {_, 
b_Line} :> {style, b}

(* black ellipsoid *)
styleEllipsoid[Ellipsoid[{1.4, 1.4}, {1.4, 5.7}, {{-0.7, 0.6}, {-0.6, 
-0.7}}], Black]

(* dashed black ellipsoid *)
styleEllipsoid[Ellipsoid[{1.4, 1.4}, {1.4, 5.7}, {{-0.7, 0.6}, {-0.6, 
-0.7}}], Black, Dashed]

Darren Glosemeyer
Wolfram Research


  • Prev by Date: Re: The side-effects of mixing TraditionalForm inside expressions.
  • Next by Date: Any idea how to parallelize this small code construct
  • Previous by thread: Re: plot colored ellipsoid
  • Next by thread: Re: plot colored ellipsoid