Prev: The side-effects of mixing TraditionalForm inside
Next: PlotLegend-> and DateListPlot[]...incompatible or
From: Jordi on 7 Jul 2010 07:39 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
From: J. Batista on 8 Jul 2010 03:14 You are correct, I was not able to change the colors either. I also tried plotting several ellipsoids together, but they all had the same standard color. This may be an indication that the Multivariate Statistics package may not support all graphic primitives. Mathematica version 6 produced the same results. Regards, J. Batista On Wed, Jul 7, 2010 at 7:41 AM, Jordi <j.schaber(a)web.de> 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 > >
From: David Park on 8 Jul 2010 03:14 You have to kill off the Purple. Graphics[{Ellipsoid[{1.4, 1.4}, {1.4, 5.7}, {{-0.7, 0.6}, {-0.6, -0.7}}]}, ImageSize -> 250] /. Hue[0.67`, 0.6`, 0.6`] -> {} That gives you Black, or you could insert any color directive you wish before Ellipsoid. David Park djmpark(a)comcast.net http://home.comcast.net/~djmpark/ From: Jordi [mailto:j.schaber(a)web.de] 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
From: Darren Glosemeyer on 8 Jul 2010 03:15 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
From: David Park on 8 Jul 2010 20:33
This comes about because Ellipsoid is returned as a Graphic instead of as a graphics primitive, and because it builds in a color directive. It might be better if they left the color directive out and let the user specify it. With Presentations we can turn the Ellipsoid into a primitive and kill off the purple by using the DrawGraphics command. Needs["Presentations`Master`"] Needs["MultivariateStatistics`"] We define a new draw command to draw Ellipsoids. DrawEllipsoid[Ellipsoid[args__]] := DrawGraphics[Graphics[{Ellipsoid[args]}]] Then it is easy to draw as many Ellipsoids as we want, each in their own style. Draw2D[ {Black, DrawEllipsoid[ Ellipsoid[{1.4, 1.4}, {1.4, 5.7}, {{-0.7, 0.6}, {-0.6, -0.7}}]], Red, DrawEllipsoid[ Ellipsoid[{1.3, 2.8}, {1.4, -5.7}, 2 {{0.7, -0.6}, {6.6, -0.7}}]]}, ImageSize -> 250] David Park djmpark(a)comcast.net http://home.comcast.net/~djmpark/ From: J. Batista [mailto:jbatista800(a)gmail.com] You are correct, I was not able to change the colors either. I also tried plotting several ellipsoids together, but they all had the same standard color. This may be an indication that the Multivariate Statistics package may not support all graphic primitives. Mathematica version 6 produced the same results. Regards, J. Batista On Wed, Jul 7, 2010 at 7:41 AM, Jordi <j.schaber(a)web.de> 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 > > |