Tag Info

New answers tagged

2

Actually, ChartStyle does work, but it does not apply the whole colour range to the first bar. This example, slightly modified from the documentation, shows what is actually going on. Table[DistributionChart[data, ChartElementFunction -> f, ChartStyle -> "DeepSeaColors"], {f, {"Quantile", "DensityQuantile", "FadingQuantile", "GlassQuantile"}}] ...


3

you can also use RegionPlot RegionPlot[{function <= 1/2, function > 1/2}, {a, 0, 4 Pi}, {c, 0, 4 Pi}, PlotStyle -> {Red, Green}]


3

ContourPlot[Cos[c] + Cos[a], {a, 0, 4 Pi}, {c, 0, 4 Pi}, Contours -> {1/2}, ContourShading -> {Red, Green}]


5

ListPlot data = RandomInteger[10, {10, 3}]; sdata = Style[{#, #2}, PointSize[.05], ColorData[{"Rainbow", Through@{Min, Max}@data[[All, -1]]}][#3]] & @@@ data; ListPlot[sdata, PlotRangePadding -> 3] Or ListPlot[List /@ data[[All, ;; 2]], PlotRangePadding -> 3, BaseStyle -> PointSize[.05], PlotStyle -> (ColorData[{"Rainbow", ...


3

One way is just to build it up from primitives. Here is some data: SeedRandom[123]; data = RandomReal[{1, 10}, {10, 3}]; rescale the z values: data[[All, 3]] = Rescale[data[[All, 3]], {1, 10}]; or rescale over min and max of the z values etc -- up to you. Then plot: Graphics[{AbsolutePointSize[15], MapThread[{Hue[#3], Point[{#1, #2}]} &, ...


1

The behavior you see is not a bug. It's because the default ColorFunctionScaling puts the arguments of the ColorFunction into the range 0 to 1. By using ColorFunctionScaling -> False you suppress this default scaling and get the rings centered at the minimum. With default ColorFunctionScaling, you would have to do the following: Plot3D[x^2 + y^2, {x, ...


1

-1 < orientation < 0 -> Blue, 0 < orientation < 1 -> Red Since your orientiation values appear to be between -1 and 1 this requirement translates to Sign[orientation] /. {-1 -> Blue, 1 -> Red} so: Visualization = Graphics[{Thickness -> 0.0025, SampleData /. {({centroidx_, centroidy_, orientation_, majordiameter_, ...


6

If ImageMeasurements didn't exist we could have used this one-liner: Total[#]/Length[#] &@Flatten[ImageData[img], 1] ImageData will give you a matrix of RGB vectors, Flatten[...,1] will then give you a one-dimensional list of RGB vectors. Total adds them together, by dividing by the number of RGB vectors we get the mean. Also take a look at ...


8

There are ImageMeasurements for this: ImageMeasurements[image, "Mean"] (* {0.427958, 0.559264, 0.130725} *)


3

Starting from this Plot3D: Plot3D[ Exp[-x^2 - y^2], {x, -3, 3}, {y, -3, 3}, PlotPoints -> 100, PlotRange -> {0, 1}, PlotRangePadding -> None, Mesh -> None, PlotPoints -> 50, BoxRatios -> {1, 1, 1}, Boxed -> False, AxesLabel -> Automatic, ViewPoint -> 100 {-2, -2, 3} ] let me address the question of how to ...


3

You can add Specularity to the ColorFunction. Here is a Manipulate you can play with to figure out what settings you prefer: Manipulate[ Plot3D[Exp[-x^2 - y^2], {x, -3, 3}, {y, -3, 3}, PlotPoints -> 50, PlotRange -> All, PlotRangePadding -> None, Mesh -> None, ColorFunction -> (Directive[Specularity[s, 20], Glow @ ...



Top 50 recent answers are included