Tagged Questions

Questions on the color models, schemes, named colors and color functions supported by Mathematica.

learn more… | top users | synonyms (2)

3
votes
2answers
1k views

Define a color function using Piecewise

How can I define a ColorFunction for my ContourPlot using Piecewise? For example after ...
15
votes
6answers
2k views

X-Y scatter plot with coloring dependent on Z value

I have an array of $(x,y,z)$ triples (array dimensions: N x 3), from which I can make a 2D scatterplot of $(x,y)$ values: ...
2
votes
2answers
753 views

How can I invert the colors in a color bar

I have this Mathematica code ...
0
votes
0answers
74 views
10
votes
4answers
859 views

Coloring Points in a Plot, based on their position in the list

Before I describe the question, I'd like to say that I've seen the excellent answers posted here but have not managed to get them to work for my own data. I have a list of values that I would like to ...
3
votes
3answers
268 views

How to paint part of DateListPlot?

My graph is about fires (burned area) over 12 years presented in one Date List Log Plot. Because most of fires are in summer (as expected) I would like to highlight that with different background ...
1
vote
1answer
139 views

Colors not showing in Graphics3D

The following code works, except that the colors aren't showing in the output. Wh? I probably made a trivial mistake, but I'm yet unable to find it. ...
1
vote
1answer
110 views

Draw only the top of the boundary of a function in Plot3d

So currently I have via combining 3 Plot3D's in a show. My question is how can I make it so that the ONLY portion of that border highlighted green, is the "curving portion" in the xy plane, rather ...
2
votes
1answer
226 views

Color coding based on 4D data within a building

I am trying to create something similar to a Heatmap within a building. Suppose I have a room with dimensions, {30,40,50} as length, width, and height respectively. I have a set of data that is of ...
-8
votes
2answers
477 views

Color plot markers using If statement

I am calculating eigenvlaues. Some are negative, some are positive. I define the index nn and mm (as well as np and mp) of each matrix element by some functions that assign positive, zero and negative ...
2
votes
3answers
590 views

Controlling Bar Color in BarChart precisely [duplicate]

I'm trying to control the color of individual bars in a BarChartwhen I pass a 2 dimensional list of data to plot. What I want to accomplish is that for each pair of ...
23
votes
3answers
464 views

How does one adjust ColorFunction quality independently of surface quality?

I have a function $f:\mathbb{C}\rightarrow\mathbb{C}$ which I would like to visualize by by plotting $|f|$ with Plot3D using $\operatorname{Arg}f$ as the ...
21
votes
9answers
2k views

How to convert a hex color string to RGBColor?

For example: "#FF8000". How could I convert it to RGBColor or Hue?
2
votes
1answer
419 views

How to colorize a rectangle with a given color function?

I want to set color to a rectangle (in fact a line) that lies on (0,0) and (1,0), and the color function is given by $u(x,t)=t(x-x^2), 0\leq t\leq1$. Since, this $u(x,t)$ act as temperature at the ...
3
votes
2answers
470 views

HSB -> HSL Converter

Starting from an image I would like to apply a custom filter to an image. I have thought and implemented this filter in HSL space and it goes like this : Boost the saturation of the pixels that ...
6
votes
1answer
186 views

Is it possible to render Graphics with more than “Byte” bitdepth?

I wonder is it possible to render Graphics in Mathematica with bitdepth higher than "Byte" which is the maximum bitdepth ...
4
votes
1answer
260 views

How can I colorize an imported model?

How can I colorize an imported model from for example 3ds max? I'm trying to find the way to colorize a 3D plot from an imported model with something like this: ...
5
votes
2answers
821 views

Plot3D with coloring based on phase value of f

I'm reading a sample chapter of Visual Complex Functions by E. Wegert. Near the bottom of this page, there is a link "Download Sample pages 1 (pdf, 2.4 MB)" which allows you to read Chapter 2 of the ...
12
votes
2answers
252 views

Why does DominantColors keep shuffling the order of the results?

This graphic is produced by running DominantColors (new in Mathematica 9) with different values, using the Lena image as the source: Each row is a list of the ...
9
votes
2answers
2k views

problem with coloring spherical harmonics

I want to color a spherical harmonics. So I write as follows. ...
8
votes
0answers
189 views

Break[] inside ColorFunction

f[x_?NumericQ]:= (Do[Break[],{i,1,2}];x) Plot[x,{x,0,1},ColorFunction->(ColorData["Rainbow"][f[#]]&)] Break::nofwd: No enclosing For, While, or Do found ...
1
vote
2answers
202 views

Filling for ListPolarPlot

I want to use Filling for ListPolarPlot in such a way that the points in the list are joined to the origin with a line colored ...
2
votes
2answers
501 views

Spreading colors in ListContourPlot

I have a data file with triplets. The first two numbers indicate the x and y position, while the third one is the log10 value of a particular indicator. I want to create a 2D plot in which the ...
10
votes
2answers
3k views

Use different ColorFunction for each function plotted

When plotting two curves on one plot, you can specify different colors for each function: Plot[{Sin@x, Cos@x}, {x, 0, 4π}, PlotStyle -> {Red, Blue}] To ...
5
votes
3answers
367 views

How can I set different opacity values for the background of a ListPlot

In the following example: ListPlot[{1, 2, 3}, Background -> Green] how can I set the Opacity[] for the background such ...
28
votes
1answer
1k views

The correct way to linearize colorspace before resizing, blurring etc

There was an interesting discussion on MathGroups dealing with the fact that image-processing functions in Mathematica (and many other software, including Adobe Photoshop) work with RGB, Grayscale ...
6
votes
2answers
396 views

Problem achiving effect I want with ColorFunction

I want to create a plot showing historical annual maximum and minimum temperatures. I've figured out how to get 10 years of historical temperature data from Wolfram|Alpha. The plot below shows the ...
1
vote
0answers
163 views

logticks in a colorbar

I have a question on using logarithmic ticks in a colorbar in Mathematica 8.0 . I use the package ColorbarPlot (...
17
votes
2answers
366 views

Pattern that matches colors

Suppose I'm writing a function that takes a color as a parameter; for example: drawShape[color_] := Graphics[{Style[Disk[], color]}]; But if the caller inputs an ...
8
votes
3answers
218 views

Quickly display a color graphically

When manipulating colors, the output is shown as a textual expression like Hue[1/5], RGBColor[2/3, 1, 1/3], ...
3
votes
3answers
624 views

Comparing 2 Data Sets in a Single Plot

I have 2 data sets, data1 and data2 with large (in the thousands) amounts of data and I want to compare them in a plane. They ...
2
votes
3answers
592 views

Color mixing or blend

Color mixing seems not only one type. Here is RGB_color_model I wrote this one: ...
1
vote
1answer
534 views

Use selfdefined ColorFunction to encode z dimension with predefined limits

In my last question we defined a colorfunction cf. Now I want to use this ColorFunction for a number of different plots (...
4
votes
2answers
684 views

Define a color function based on color samples obtained from ColorBrewer

I am quite new to mathematica and I am searching for a way to create a smooth colormap based on the samples given by http://colorbrewer2.org/ . Is it possible to create a interpolated function from ...
5
votes
3answers
647 views

ColorFunction and/or ColorScaling issue with ParametricPlot3D

My goal is to use ColorFunction to color a cylinder based on the $z$ value of a separate Plot3D. I'm not sure if I am making a ...
2
votes
1answer
299 views

White regions in DensityPlot — is this a bug with ColorFunctionScaling?

Is this a bug with ColorFunctionScaling? When I try to supply my own ColorFunction Mathematica seems to partially ignore it, ...
6
votes
2answers
1k views

Gradient/ColorFunction in Disk with transparent background

My goal is to make an iOS-like enable/disable switch like this: I use a LocatorPane for the slider with so-called "jumps" to only make two settings possible: ...
2
votes
1answer
194 views

Why is the test in my ColorFunction not behaving as expected?

In my code I have a ColorFunction that is meant to highlight all values of $f(x)$ that are greater than $x$ ...
11
votes
2answers
413 views

How can I prevent ColorFunction from disabling antialiasing in graphics?

When I use ColorFunction, the appearance of my plots is ruined, changing from this which has the normal smooth lines and antialiased fonts, to this in which ...
3
votes
2answers
1k views

How to assign different colors to list plotted in ParametricPlot? [duplicate]

Possible Duplicate: Difference in Plot when using Evaluate vs when not using Evaluate I am plotting galaxies and I would like to color them according to their redshift values using a ...
12
votes
2answers
1k views

Using a ListDensityPlot to map color onto a ListPlot3D graph

I have a 3 column list of data points. The first two columns correspond to x and y coordinates, with data points creating a surface in the z direction from column 3. This gives me a nice wavy ...
9
votes
2answers
842 views

Coloring each face of a Cuboid with a different color

Is there a way to color each face of a Cuboid with a different color? I looked in the help but couldn't find anything. I found this Coloring the faces of a 3D ...
3
votes
4answers
685 views

Hue shade colours

Looking at the plot below, how can I know what colours made the Hue shade? ...
6
votes
1answer
2k views

Fixed color scale in multiple density plots

I think there should be a simple solution for my current problem, but neither StackOverflow (or the help of Mathematica) or Google have it. I have to plot multiple density plots with a color ...
6
votes
4answers
1k views

Determining the RGB values of the default plot color

In Mathematica 7, the default plot color is a purple-like color (although I think it is not Purple). Is it possible to use Mathematica to determine the RGB color ...
8
votes
2answers
877 views

ColorFunction in Histogram[]

Let's say I have a Histogram: Histogram[RandomVariate[NormalDistribution[10, 2], 500]] and I want the bars positioned to ...
4
votes
2answers
302 views

Plotting two functions with dependent input function

I have defined a function: myJ2[n_] := 1/n* Total[RandomVariate[NormalDistribution[0, 1], n]^2] This is basically an approximation to the gaussian integral. I ...
11
votes
2answers
784 views

How to vary color of fill between listplots based on y-distance between them

I have two lists with the same x-values but different y-values. I have used ListPlot to plot and fill the space (line) between them; however, I would like the color ...
11
votes
6answers
538 views

Overlapping Red and Green ArrayPlots to show yellow intersections

Let's say I have two ArrayPlot[]s. One is in redscale and the other is in greenscale, such that the lowest value is white and the highest value is pure red or ...
30
votes
6answers
2k views

ColorData[“VisibleSpectrum”] is wrong?

I am trying to visualize the visible spectrum using the built-in ColorData["VisibleSpectrum"] function which "colors based on light wavelength in nanometers". But I ...