Questions tagged [color]
Questions on the color models, schemes, named colors and color functions supported by Mathematica.
1,253
questions
2
votes
1
answer
177
views
Colouring cells in a Voronoi mesh [closed]
Consider the following code
...
7
votes
2
answers
264
views
How to change colour of TogglerBar
Consider the following code
...
3
votes
0
answers
198
views
Preserving ColorFunction when exporting 3D density plot? [closed]
I am trying to produce a 3D density plot from a set of points. Minimal code to generate a similar set of points and plot is
...
3
votes
1
answer
275
views
How to create a multicolored string? [duplicate]
I'm interested in displaying a string composed from sub-strings of different colors.
Mathematica allows one to create a list comprising sub-strings of different colors, for example
...
1
vote
0
answers
135
views
How to map 2D coordinates to a unique colour (i.e. 2D colormap)?
Colourmaps in Mathematica usually map a single value with a colour.
Are there 2-dimensional colourmaps available where one can map 2d coordinates to a unique colour? (i.e. in a way that coordinates ...
1
vote
0
answers
231
views
Vector Color function usage
Can anyone explain why there is a difference between following plots:
...
4
votes
2
answers
260
views
Different colours for different sectors of piecewise function
I have some lines of code that generate numerical solutions to equations. Then I want to combine two of these in a piecewise function. The way I did it is the following -lf1[r] and lf4[r] are the ...
1
vote
0
answers
74
views
how to use interpolating functions to smoothly paint a polygon? [duplicate]
consider 4 different colors on the nodes (with different parameter values) how to interpolate when the color values are given on the nodes using the constructed interpolation functions to paint the ...
6
votes
3
answers
4k
views
Reverse ColorFunction or ColorData [duplicate]
please excuse my bad English, I'm not a native speaker.
This should be fairly simple: Is there a simple way to "reverse" ColorFunction or ColorData?
Let me explain what I mean. Let's say, we have ...
1
vote
1
answer
75
views
Different colors for each curve in a Plot[Table[],{}] [duplicate]
I'd like to plot a few curves in a plot but with different colors, like in this code :
...
4
votes
3
answers
337
views
How can I get a "RedLevel" instead of GrayLevel when drawing a densityplot?
I was trying different colorfunctions, but don't get the RedLevel like the picture as follow:
My picture is like this, a greylevel one.
3
votes
1
answer
84
views
Why do ColorSeparate and ColorConvert give slightly different output?
Consider the following test code:
...
5
votes
2
answers
315
views
Specifying background color seen through semi-transparent surface
I would like to plot a Sphere with an arrow, in which the label obscures part of the arrow, as shown here:
...
6
votes
1
answer
185
views
Canceling a color specification
I can get the default colors for one figure (Cuboid), and then color another figure (Sphere), as here:
Graphics3D[
{Cuboid[],
Red, Sphere[]}
]
However, if I ...
5
votes
3
answers
593
views
Color the polygons in PolyhedronData
What is the simplest method for coloring each polygon face of a polyhedron with a specified color? For instance suppose I have a list of $12$ colors (...
39
votes
2
answers
3k
views
How can I use Kenneth Moreland's "Diverging Color Maps for Scientific Visualization" in plots?
I often want to plot two dimensional data that is centered around zero (for me, this is usually a 2D optical spectroscopy signal, but there are other cases), and the MATLAB "Jet" color scheme is ...
6
votes
2
answers
387
views
How does one splice together parts of two 3D density plots, without changing the original colors?
How does one splice together the t=0 to 59 part of the first plot with the t=59 to 60 part of the second plot, without changing the original colors of either plot? I have spent hours looking for an ...
7
votes
2
answers
548
views
Automatically coloring plot labels the same as the plotted curves
Here is an example of a ListLinePlot. How can get the text of the PlotLabels option to be the same as the colors automatically ...
4
votes
2
answers
182
views
How to create a `BarChart[]` with color rules determined from categorical data?
Let's say I have a list of color names (strings), like this:
samples = {{"blue, red, red"}, {"purple, blue, purple"}, {"blue, blue"}};
Then I can plot the ...
3
votes
2
answers
952
views
How to plot a function for three variables in 2D plot?
I have a function and want to re-draw its plot for its three variables. Here is my function:
Where X is:
The plot of this function is:
I'm thinking to draw a beautiful plot something like this:
I ...
2
votes
1
answer
110
views
How to get the same color for the boundary and the shading in ListContourPlot?
If I specify the ContourShading to be the same color as the Contour they end up being a different color, see the example below.
...
1
vote
0
answers
102
views
Match light-shaded colors to plot themes for RegionPlot
I have a problem very similar to the one in the following topic:
Match colors to plot themes. I want to extract the color of a plot for the corresponding legend. However, as I use a RegionPlot I am ...
3
votes
1
answer
377
views
How to rescale the colorfunction?
I have a data file which has 3 columns (let's call them x, y, p). Here x and y columns represent the co-ordinates in the 2-d plane while the third column p represent the probability of an event ...
2
votes
1
answer
135
views
How can we change the Highlighted elements to a specific color?
edit I don't want highlighting, only font color. Sorry.
I want the Highlighted elements to be Blue Font. I can't understand this suggested previous post.
When I ...
3
votes
1
answer
105
views
Can I get a list of RGB colors from a graphics object?
I'm wondering if it is possible to get the list of RGBColor from a plot.
What I mean is simple. Suppose I plot list L with "TemperatureMap":
...
2
votes
1
answer
41
views
ColorFunction for LogPlot (and its cousins)
I have a ColorFunction that I use to color a Plot, with the option ...
1
vote
1
answer
444
views
BarLegend for custom colour function
How do I change this code so the desired BarLegend is displayed?
...
3
votes
1
answer
70
views
Is it possible to plot a function's value along a curve using different color?
I have a curve in 3D space which is green curve in the following picutre
The code for generating the curve is as follows:
...
6
votes
1
answer
298
views
Transforming 2D points on to a regular grid or lattice
I have a set of points in 2D generated by doing a DimensionReduce on a list of colors:
...
5
votes
3
answers
733
views
ColorFunction based on array index in ListLinePlot
ColorFunction specifies that for ListLinePlot it takes the $x,y$ data as inputs. I, however, would like to take the array index (...
0
votes
1
answer
164
views
Are there better ways to plot a continuous scalar function of three variables?
I am plotting a continuous scalar function of three variables with this code:
...
0
votes
1
answer
81
views
Change a formula [closed]
have a program consisting of a database of colors in L-a-b format. I want a formula to obtain the desired color by mixing different amounts of colors that are in the database.
For example: I want ...
2
votes
1
answer
158
views
How to match value coloring in Plot3d to value coloring of legend
In a Plot3D I want to change the displayed value range, see the following example.
The function generates the values {-1,1}, they are displayed correctly on the z-axis within {-2, 2}, but the color ...
1
vote
1
answer
93
views
Filling a region in a plot changes color in legend [closed]
I'd like to mark a region in my plot and after some research in the internet I found the solution I was looking for using the Filling option.
...
1
vote
0
answers
529
views
PlotLegend Colors Missing
I want a PlotLegend with the colors of the graphics.
p4 = Plot[y1[t] /. s1, {t, 0, tmax}, PlotRange -> All, PlotStyle -> {{Gray}}, PlotLegends -> "Y1"];
...
2
votes
2
answers
184
views
How can I plot a matrix with a two-dimensional color scheme?
Plotting a matrix with colors depending on the value of each entry is straightforward,
...
3
votes
2
answers
314
views
Plotting maxima within a simplex
I am trying to draw a particular maximum plot within a simplex. I have functions based on two variables:
Write p,q for the two variables where p,q \geq 0 and p + q \leq 1. This defines the simplex ...
4
votes
1
answer
361
views
Scaling contour plot colors over several orders of magnitude
I have this contour plot that has values ranging from ~0.01 to ~100, however, there aren't distinct colors between every order of magnitude. I've tried putting a Log scale on the ...
1
vote
1
answer
99
views
Plot: line colors when using assumptions
I want to vary a parameter via assumptions in a simple line plot and assign a different line color to each parameter value. Unfortunately all lines are the same color. I also tried to use Evaluate[], ...
9
votes
4
answers
412
views
Construct, in some manner, a four-dimensional "RegionPlot"
Let me abuse some Mathematica notation and formulate the following "command":
...
3
votes
3
answers
2k
views
How to change the colour of parts of a 3D plot, rather than the whole figure?
By exporting Matlab data to a txt file and importing it with List3DPlot, I plotted the density of states in a nanowire ...
4
votes
2
answers
611
views
Set PlotStyle to be the, say 3rd, default colour Mathematica v11
This question (at least for v10) seems to have been asked many times, but I cannot decipher the answers. I have read a few posts about this - but I don't know how to use any of the answers (e.g. How ...
-1
votes
1
answer
176
views
2
votes
1
answer
116
views
How do we color a plot based on a given function?
I'll explain the problem I have with a shorter example, since I'm working with a huge messy function. Suppose we have a real-function $f(t)$, and a curve $C(t) \in \mathbb R^3$. Now, I can use ...
2
votes
1
answer
146
views
Discolored ComplexPlot ColorFunction [closed]
I have this code.
...
3
votes
1
answer
180
views
How to label the nodes of a graph with the numbers in a list?
I have an adjacency matrix "am" and I want to color the nodes with four colors.
Here I what do...
...
2
votes
1
answer
247
views
Color scheme problem
I have a problem in the color scheme in a 2D spectra.
After a lot of calculations, i can generate a picture like this
in the last part using this instructions
...
4
votes
3
answers
325
views
Plotting a rectangle with a heat map
Consider the two table set below
t1= {0.44, 0.62, 0.77, 0.87, 0.93, 0.96, 0.98, 1}
t2= {0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25}
how can I create a plot ...
13
votes
4
answers
10k
views
How to create an inverse pole figure color map?
To interpret electron backscatter diffraction (EBSD) results, inverse pole figures are used. A three dimensional space of directions ([100], [110] and [111] for those who know about crystallography) ...
2
votes
0
answers
46
views
Almost unreadable input assistant text using the official stylesheet "ReverseColor"
When I use Mathematica's ReverseColor the input assistant is shown in almost the same color as the block's background. (Grey tones). See picture below:
Can this really be true? Or is it a bug on my ...