Tag Info

Hot answers tagged

5

This could provide a good starting point: First step is to provide multiple examples of "red", "blue", etc for the training set. I found a site that had some convenient images for this task. For example a good sample of "reds": So I import the images: images = Import[ "http://ingridsundberg.com/2014/02/04/the-color-thesaurus/", "Images"][[2 ;; ...


4

The arguments for ColorFunction in ParametricPlot3D are (from the docs): ParametricPlot3D x, y, z, u or x, y, z, u, v so you need #4, which is t. As for the ColorFunctionScaling, I suggest you to read the docs and experiment a little. But just as a hint, you may eliminate both the ColorFunction -> False option AND the Rescale thing in your ...


4

Filling is not an option for Graphics, One approach is to use a PieChart as a background. angles[t_] := Module[{o = {0, 0}, p = {Cos[t], Sin[t]}, rot}, rot = If[TrueQ[Pi/2 < Mod[t, 2 Pi] < 3 Pi/2], t + Pi, t]; {{Opacity[0.3], Line[{o, p}]}, Rotate[Inset[Style[Row[{t}], FontSize -> 18], p/2], rot]}]; ang = {52, 0, 220, 180, 132, 282, ...


4

I think using circular sectors generated with Disk may be easier: SeedRandom[3] Clear[sector, angles] sector[color_, angle_List] := {color, Disk[{0, 0}, .995, {angle[[1]], angle[[2]]} Degree]} angles[t_] := Module[ {o = {0, 0}, p = {Cos[t], Sin[t]}, rot}, rot = If[TrueQ[Pi/2 < Mod[t, 2 Pi] < 3 Pi/2], t + Pi, t]; {{Opacity[0.3], Line[{o, p}]}, ...


4

Although I strongly suggest you just create and use your own formatting function if possible, e.g. form[Red], the question of modifying the internal behavior is interesting. You can either turn off the automatic color directive formatting and define your own MakeBoxes rules on e.g. RGBColor to take its place, or you can modify the internal function used to ...


4

You will really need to roll your own color bar, which isn't too difficult. Here is an example of making a highly customized color bar. With[{n = 24}, Graphics[ Table[{Hue[i/n], Translate[Rectangle[{0, 0}, {1, 1}], {i, 0}]}, {i, 0, n - 1}], ImageSize -> 550, PlotRangePadding -> None, AspectRatio -> 3/n, Frame -> True, FrameTicks ...


3

You could just make a function which decides your end colour: colour1[n_] := With[{end = {x[s], y[s], z[s]} /. First@CourbeMagnetique[n] /. s :> Smin[n]}, If[Norm@end < 1, RGBColor[0, 0, 1], RGBColor[1, 1, 1]]] colour3[n_] := With[{end = {x[s], y[s], z[s]} /. First@CourbeMagnetique[n] /. s :> Smax[n]}, If[Norm@end < 1, RGBColor[1, 0, ...


2

One way is to ask WolframAlpha, but it can be slow and requires internet connectivity. NearestHTMLColorNames[color_] := Rest[WolframAlpha[ StringDelete[ToString[ColorConvert[color, "RGB"]], "Color"], {{"NearestNamedHTML:ColorData", 1}, "ComputableData"}, PodStates -> {"NearestNamedHTML:ColorData__More"}]][[All, 2]] ...


1

Is ColorFunction what you want? (The input is automatically rescaled from 0 to 1, so Rescale is unnecessary; see also ColorFunctionScaling.) GrapheMagnetique[n_] := ParametricPlot3D[ Evaluate[{x[s], y[s], z[s]} /. CourbeMagnetique[n]], {s, Smin[n], Smax[n]}, PlotStyle -> {Directive[AbsoluteThickness[1]](*,Blue*)}, ColorFunction -> ...



Only top voted, non community-wiki answers of a minimum length are eligible