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

learn more… | top users | synonyms (2)

0
votes
0answers
1 view

How to set color function to back /white monochromatic density plot

Here is a density function Sin[x - 4/.6 Pi], {x, -4, 4}, {y, -3, 3}, ImageSize -> {1200, 640}, AspectRatio -> Full, ColorFunction -> "SunsetColors", Mesh -> ...
2
votes
0answers
19 views

ArrayPlot with a user-defined color function given is misbehaving

I am using ArrayPlot to show some arrays with values from 0 to 1. I want 0 to be black and 1 to be white, so I am using: ...
5
votes
2answers
393 views

How can I create an interactive ColorFunction using Manipulate?

I am trying to specify my own colors and scaling for the ColorFunction in ListDensityPlot. I have several lists of 2D values ...
31
votes
3answers
934 views

A better “VisibleSpectrum” function?

Since ColorData["VisibleSpectrum"] is wrong, I would like to have a more accurate function to use. Can this information be extracted from Mathematica itself?
20
votes
4answers
3k views

Convert spectral distribution to RGB color

Presume I have a spectrum as a function of wavelength (an example being the blackbody spectrum): I want to convert that to a single RGB color to display on-screen, i.e. the "color" of that object ...
6
votes
2answers
646 views

Plotting spherical surfaces

I am trying to make surface plots of squashed spheres. The spheres are defined by a list of points. For simplicity, consider the round sphere: ...
4
votes
3answers
1k 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 ColorBrewer. Is it possible to create a interpolated function from those sample ...
1
vote
1answer
36 views

Color in Spherical3DPlot according to value

I want to colour a 3D plot according to it's value. I could only mange in one direction (say in 'z' direction) but I want to show them in all direction together. I have written the following code: ...
3
votes
2answers
440 views

ColorFunction based on data

I have a list of numbers, and I would like to plot them using ArrayPlot (which is easy, usually :)). I would like to be able to color the elements of the plot based on the average of the list: one ...
6
votes
2answers
1k 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 ...
0
votes
1answer
46 views

ColorFunction causing division by zero error (going outside domain?) [duplicate]

On the following plot example, I get a division by zero error (10.4.1): ...
1
vote
2answers
103 views

Specify the color of each residue in a protein (PDB)?

I'm importing a *.pdb file containing a single protein. Mathematica automatically produces a plot of the protein. I want to specify the color of each residue independently, in this plot. Is this ...
2
votes
1answer
31 views

Scaling HSB colors for export

In Mathematica, Hue[h,s,b] uses HSB colors. However, unlike anything I've ever seen, the h, ...
5
votes
2answers
388 views

How to color the triangles of a mesh?

Given a mesh, I want to assign each triangle a color. I tried to do it in this way: ...
3
votes
0answers
60 views

How to build a ColorFunction that can take a non-numeric value? Blend returns an error

I'm trying to use an external package, defined here. This package has a private function called makeColorFunction that essentially works by taking an input color ...
4
votes
1answer
349 views

Visualization of Gaussian Curvature

I need to visualize Gaussian Curvature of a parametric surface. There is a solution in this math.SE post. However, I'm not sure its working because when I draw a sphere it's all white, but it should ...
3
votes
2answers
116 views

How can I make the color points in ChromaticityPlot[] joined?

So I'm using ChromaticityPlot[] to plot some colors as points: ...
2
votes
2answers
61 views

Selective background coloring

Consider this simple code: Grid[RandomInteger[{0, 1}, {10, 10}], Background -> LightBlue] Is it possible to modify the code so that the background only ...
0
votes
0answers
20 views

Asigning colors to residues position-specifically or feature-specifically in PDB file [duplicate]

I am dealing with a complex consists of 5 peptides in PDB file. I calculate some physical features of all the residues in the complex and would like to express them graphically. I would like to assign ...
0
votes
0answers
32 views

How to construct my own ColorFunction with the TemperatureMap range

I would like to draw the unit circle and define my own coloring function on it so that every point $e^{i\theta}$ of the unit circle will be colored according to said function from the range of colors ...
0
votes
3answers
69 views

How can I create a four dimensional plot (3D space + color) of the data provided? [duplicate]

I would like the x, y, and z axes to be reserved for the first three columns and the color to be reserved for the fourth column. I would like the output to have a color bar and color function. If you ...
4
votes
1answer
40 views

Anomalous scaling in GeoRegionValuePlot when using non-default color scheme

I found this plot online, and thought "I bet I could do that with a one-liner using GeoRegionValuePlot". But then it turns out that you are much better off ...
0
votes
1answer
84 views

Concerning the default coloring made by Plot3D in 10.4 [closed]

Recently, I have installed Mathmatica 10.4, but I found out that when I use Plot3D, it gives me a mesh. In order to add color, I have to explicitly set ...
5
votes
2answers
112 views

How to color one “panel” of ListPlot3D

Here is my code: data = Table[{i, j, RandomInteger[{1, 10}]}, {i, 5}, {j, 5}]; thePlot = ListPlot3D[Flatten[data, 1], InterpolationOrder -> {0}] How can I ...
1
vote
1answer
47 views

List of Inequalities in RegionPlot with different colors [duplicate]

Starting from the example of the Documentation: RegionPlot[{x^2 < y^3 + 1, y^2 < x^3 + 1}, {x, -2, 5}, {y, -2, 5}] Which gives a nice plot with two ...
3
votes
2answers
255 views

Extracting RGB color code from a plot

I have let Mathematica to draw a plot of some functions written as below: ...
1
vote
2answers
90 views

Plot values of an $m\times n$ matrix on the complex plane with color varying along $m$

Let's say I have a complex valued matrix $\begin{pmatrix}1+I&2+2I&3+3I\\4+4I&5+5I&6+6I\end{pmatrix}$ represented by a list: ...
1
vote
2answers
50 views

Colour bar for contour 2D graph [duplicate]

How could I plot the colour legend for my 2D contour graph ...
9
votes
3answers
453 views

Changing the atom color for plotting xyz-files

Mathematica takes the standard color code for atoms when plotting an *.xyz file, but I want to customize the color for the specific atoms. I really become desperate as I did not get it so far. ...
3
votes
2answers
111 views

Extracting unknown ColorFunction from Plot, Plot3D etc

I wonder if there is a way to extract existing ColorFunction and "override" it with a new function that will depend on original one. This question discusses ...
1
vote
1answer
73 views

Color of figure keeps changing

I'm not sure this should be posted here, but I don't know where else to ask this question. Please feel free to refer to another more relevant SE if necessary. I plotted a figure with Mathematica, and ...
5
votes
2answers
169 views

How to rescale ColorData in a non-linear fashion?

I want to use Rescale on a ColorData, like this: ColorData[{"TemperatureMap", {-100, 10}}] ...
2
votes
1answer
101 views

How to add color to a knot

Is there a way to use a colorscheme to a KnotData image? One way is probably convert it to a parametric form and then use ...
6
votes
2answers
728 views

Set the same color scale across multiple ListContourPlots?

This is probably straightforward - but how would I set the same color scale across multiple ListContourPlots? if I have values from 10 to 25 on one ListContourPlot and values from 40 to 100 on ...
3
votes
1answer
44 views

MatrixPlot ignores ColorFunction for 0 matrices

I noticed that when plotting a matrix with custom color function there seems to be a special behavior for matrices with just 0's. In this case the plot is simply white. If there is one non-zero ...
6
votes
1answer
150 views

How to interpolate colors on scattered points for a smooth visualization

I am a novice user, so please bear with me! I have a set of random points which are color-coded by some function. The point distribution is fairly dense so I should be able to see a smooth color ...
1
vote
1answer
49 views

Plot with Color Data as Third Coordinate of Ordered Pairs

Suppose I have a data set data={{0,0,-1},{0,1,-0.5},{1,1,0},{2,1,0.5},{2,2,1}}; where the first two coordinates are x and y values, and the third is input for ...
3
votes
1answer
250 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 (...
1
vote
2answers
92 views

Issues with ColorFunction

I have a function f[u,v] from $R^2 \to R$ that I want to use like coloring function over the surface: ...
6
votes
4answers
589 views

How to recreate the gnuplot color scheme “AFM Hot” in Mathematica?

I'm trying to build an 3D AFM image from raw data with Mathematica. So how do I recreate the "AFM hot" color scheme? I've tried "SolarColors" and ...
1
vote
1answer
58 views

Using ColorFunction to plot Cones with colors depending on orientation

I have an assembly of cones plotted with Graphics3D with positions and orientations according to data read from a file. Now I am using Hue to color the cones and I use the following code to plot them: ...
2
votes
1answer
93 views

Colors in ImageMarker

The symbol ImageMarker (new in 10.4) seems to ignore color commands: ...
9
votes
2answers
260 views

How to define variable “Rainbow” curve colors?

Firstly, I'm not asking about blending a color gradient on a curve. I would like to make the curve color uniform on all its lenght instead, but the color should change dynamically while we slide a ...
0
votes
1answer
28 views

Recovering colour code from splitting colour scheme gradient into n colours

I'd like to get a colour scheme gradient (e.g. ColorData["TemperatureMap"]), split the domain into n equidistant points, and then recover the colour codes (RGB or ...
12
votes
3answers
262 views

Inverse of Interpreter[“Color”]: Convert a RGBColor to a natural language color name

What is the best way to create the inverse function of Interpreter["Color"]? That function takes a natural language color name like ...
1
vote
1answer
55 views

Merging of multiple 3D plots with Show using unified ColorBar

This question follows my initial question that can be found here. I created the following 4D plot (3 spacial coordinate + color) by interpolating points separately. The full data (1.4Mb) can be ...
1
vote
3answers
176 views

How to apply a color gradient to a Rectangle primitive? [duplicate]

How can we apply a color gradient (say "Rainbow") to a Rectangle primitive ? Of course, I searched the documentation : http://reference.wolfram.com/language/ref/Rectangle.html, and also the site : ...
2
votes
0answers
59 views

Discrete color bar: height not adjusting

I am trying to adjust height of my color bar, but LegendMarkerSize is not doing what it is supposed to do. Code ...