Hot answers tagged

7

I am assuming that this not just (#2&) as the color function. Here are various ways: f[x_, y_] := Cos[x + I y]; g[x_, y_] := Re@f[x, y]; h[x_, y_] := Im@f[x, y]; scp = SliceContourPlot3D[ h[x, y] - z, {z == g[x, y], z == -2}, {x, -2 Pi, 2 Pi}, {y, -2, 2}, {z, -2, 2}, Contours -> 10, ColorFunction -> "Rainbow", BoxRatios -> ...


5

You could do something like this: colorlist = {#1, RGBColor[#2/255, #3/255, #4/255]} & @@@ (Rest@ Import["https://gist.githubusercontent.com/jasondbiggs/c072b7ce4a7b4ab920b99fef716eac0d/raw/75361b760e16dadaaed2ba2df937c3a4a4a353e3/kindlmann-table-byte-0032.csv" , "CSV"]); extendedKindlmann = (Blend[colorlist, #] &); (I rehosted the ...


4

In brief: you imported the "byte" file from Moreland's site when it's the "float" file that's in the format expected by Mathematica. (If you insist on the "byte" format, then you need to divide by 255, as Jason has said in comments.) Thus, With[{cl = {#1, RGBColor[##2]} & @@@ Rest[ Import["http://www.kennethmoreland.com/color-advice/kindlmann/...


3

This seems pretty fast (it takes roughly 0.08s on your set of images): images = Normal@Databin["dsNFr2og"]; Total[#, 2] & /@ ImageData /@ Binarize /@ images; % / (Times @@ ImageDimensions[images[[1]]]) // N; Extract[images, Position[%, p_ /; p < 0.5]] Adjust the 0.5 threshold to your liking to retain more or fewer images. (Thanks nikie for the ...


3

First Method If you just want to get different color of your ball,but don't want to name the color.I will recommend you this solution,which makes your life easier.In the meantime,it will change other place's color,not just the ball,like CSP's answer img = Import["http://i.stack.imgur.com/Qr7Tx.jpg"]; Select[ColorCombine /@ Tuples[ColorSeparate[img], {3}], ...


3

You did not specify which value x, y, or z you wish to consider, or some combination thereof. Nevertheless this may help: data = Import["DATA - Sheet1.csv"]; ve = Partition[data, 5]; vecdata = Partition[ve, 7]; ListVectorPlot3D[vecdata, DataRange -> {{-15, 15}, {-15, 15}, {20, 30}}, VectorPoints -> 5, VectorScale -> {0.1, Scaled[0.5]}, ...


2

I would do something like the following: ListDensityPlot[list, PlotLegends->True, ColorFunction->"Rainbow"]


2

Try this: lst = Table[{Sin@t Cos@t Log@Abs@t, (Abs@t)^.3 Sqrt[Cos@t]}, {t, -1, 1, 0.0001}]; and then ListLinePlot[lst, PlotStyle -> Red, PlotRange -> All, Filling -> Bottom, FillingStyle -> Red] yielding the following Have fun!


2

Just for reference purposes, here is a manual re-implementation of ColorConvert[color, "RGB" -> "XYZ"]: (* whitepoints *) d65 = {0.95047, 1., 1.08883}; d50 = {0.96422, 1., 0.82521}; (* cone response domain *) bradford = {{0.8951, 0.2664, -0.1614}, {-0.7502, 1.7135, 0.0367}, {0.0389, -0.0685, 1.0296}}; (* inverse companding ...


2

What is the bug? It seems that GeoRegionValuePlot will not work correctly when two or more entities have the exact same value. Consider these examples (and ignore the legend, which is always wrong unless you give an explicit ColorFunction as below): GeoRegionValuePlot[{Entity[ "AdministrativeDivision", {"Arkansas", "UnitedStates"}] -> 1, Entity["...


1

Here's my approach which returns each color component's percentage in a given bin. First, some preprocessing. This quantizes the colors using the Nearest function because by default Mathematica's ColorQuantize fails to properly quantize the image. i = Import["http://i.stack.imgur.com/otAao.jpg"]; ncolors = 4; dc = DominantColors[i, ncolors]; dcl = dc /. ...


1

There's a few steps in solving this problem: Separate colors completely Partition the image Compute the correlation between neighbouring picture segments. To solve the first problem, I use ColorQuantize first in order to make similar colors the same to avoid noise. Then by using LinearSolve, I can change the three colors to R/G/B so that I can use ...


1

ArrayPlot[a /. 0 -> White, ColorFunction -> "Rainbow"]



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