Items tagged with color color Tagged Items Feed



I would like to know whether it is possible to change the color of animations that have already been produced and assigned to a variable.


Let's take for example


P := plots:-animate(plot, [sin(x+t), x = -Pi .. Pi], t = -Pi .. Pi, frames = 8)


is there a command to change the color of the curve AFTER it has been produced?


The calculus to generate all my plots took 4 hours so I would like not to have them calculated again.



Hello everyone, I need your help again. I've been trying recently to select different colors and other line options to different curves in the 2D plot generated by the algorithm attached to this message, but I've had no success whatsoever. I tried using the setcolors([]) option, but it didn't work.

Any help with that would be much appreciated.


I would like to recolor a list of plots using Maple default values. I have produced a list of colors with the plots:-setcolors(default) command. However, the colors are returned as a list of Hex values.  I first converted the Hex values to RGB values and then attempted to adapt a procedure written by Joe Riel, named -recolor- (refer to Joe's answer from which this question is branched).

But I must have done something wrong.

The conversion from Hex to RGB...

I suffer from floaters, (objects that appear in ones vision), a condition that is worsened by looking at white surfaces.  Is there a way of changing the background colour of a maple worksheet from white to a darker shade, perhaps a light grey or something?

Hi all,

Is there any way to fill in colour to a polar plot using Maple 16? What I want to do is essentially make a coloured in pie slice using a defined radius and theta range.

I am aware of the function filled, which adds colour starting from the x-axis but that is not appropriate in this situation. I know of the filledregions function but that only works for implicit and contourplot, and as of yet I have not been able to use implicit...

How to color only certain bounded/intersection area of a graph in Maple?



I'm trying to plot the function (5*x)/(x^2-4) highlighting all of its characteristics (maxima, minima, convexity, concavity...). I would like to plot this function in different colors in accordance with the different intervals of concavity and convexity. In order to do this, I have tried to use the piecewise function, as shown on another question ( However, I feel I haven't understood...

Plot with different color...

October 07 2012 Nesrine 0



I need to know how I can obtain a curve with different color. I work with Maple 15

I have a function like this:

Plot (C1, C2, C3, t=1..200, color= red, green, dark)

where C1, C2, C3 are mathematic function and t is the time because these function depend of time.

I need to know where the curve is obtained how can I know that the color green correspond to the second function?


Thanks you in advances.


I'm playing at the moment with some calcuations on color space and even after a lot of trials on different softwares including photoshop and Igor Pro, I cannot obtain what I want... The advantage with Maple is that if I get this color space I will be then able to animate a point at the surface to describes the color evolution of a system... And that's what I try to do...

The idea is quiet simple but necessits the use of procedure and I'm not so good for that.

images on surfaces...

August 17 2012 acer 9686 Maple

Let's see how we can display patterns, or even images, on 3D plot surfaces. Here's a simple example.

The underlying mechanism is the COLOR() component of a POLYGONS(), GRID(), or MESH() piece of a PLOT3D() data structure. (See here, here, and here for some older posts which relate to that.)

The data stored in the MESH() of a 3D plot structure can be a list-of-lists or, more efficient, an Array. The dimensions of that Array are m-by-n-by-3 where m and n are usually the size of the grid of points in the x-y plane (or of points in the two independent parameter spaces). In modern Maple quite a few kinds of 3D plots will produce a GRID() or a MESH() which represent the m-by-n independent data points that can be controlled with the usual grid=[m,n] option.

The plot,color help-page describes how colors may specified (for each x-y point pair to be plotted) using a procedure f(x,y). And that's fine for explicit plots, though there are some subtleties there. What is not documented on that help-page is the possibility of efficiently using an m-by-n-by-3 or an m*n-by-3 datatype=float[8], order=C_order Array of RGB values or am m*n float[8] Vector of hue values to specify the color data. And that's what I've been learning about, by experiment.

A (three-layer, RGB or HSV) color image used by the ImageTools package is also an m-by-n-by-3 Array. And all these Arrays under discussion have m*n*3 entries, and with either some or no manipulation they can be interchanged. I wrote earlier about converting ImageTools image structures to and from 2D density-plots. But there is also an easy way to get a 3D density-plot from an ImageTools image with a single command. That command is ImageTools:-Preview, and it even has a useful options to rescale. The rescaling is often necessary so that the dimensions of the COLOR() Array in the result match the dimensions of the grid in the MESH() Array.

For the first example, producing the banded torus above, we can get the color data directly from a densityplot, without reshaping/manipulating the color Array or using any ImageTools routines. The color data is stored in a m*n Vector of hue values.

But first a quick note: Some plots/plottools commands produce a MESH() with the data in a list-of-lists-of-lists, or a POLYGONS() call on a sequence of listlists (eg. `torus` in Maple 14). For convenience conversion of the data to a 3-dimensional Array may be done. It's handy to use `op` to see the contents of the PLOT3D() structure, but a possible catastrophe if a huge listlist gets printed in the Standard GUI.




                         /     [ 1 .. 16384 Vector[column] ]\
                         |     [ Data Type: float[8]       ]|
               c := COLOR|HUE, [ Storage: rectangular      ]|
                         \     [ Order: C_order            ]/

#op(T); # Only view the operands in full with Maple 16!

# The following commands both produce the banded torus.

#op(0,T)(MESH(op([1,1..-1],T),c),op([2..-1],T)); # alternate way, M16 only


Most of the examples in this post use the command `op` or `indets` extract or replace the various parts of of the strcutures. Perhaps in future there could be an easy mechanism to pass the COLOR() Array directly to the plotting commands, using their `color` optional parameter.

In the next example we'll use an image file that is bundled with Maple as example data, and we'll use it to cover a sphere. We won't downsize the image, so that it looks sharp and clear (but note that this may make your Standard GUI session act a bit sluggish). Because we're not scaling down the image we must specify a grid=[m,n] size in the plotting command that matches the dimensions of the image. We'll use ImageTools:-Preview as a convenient mechanism to produce both the color Array as well as a 3D densityplot so that we can view the original image. Note that the data portion of the sphere plot structure is an m-by-n-by-3 Array in a MESH() which matches the dimensions of the m-by-n-by-3 Array in the COLOR() portion of the result from ImageTools:-Preview.




                 /                    [ 235 x 354 2-D  Array ]  
                 |                    [ Data Type: float[8]  ]  
             GRID|0 .. 266, 0 .. 400, [ Storage: rectangular ], 
                 \                    [ Order: C_order       ]  

                    /     [ 235 x 354 x 3 3-D  Array ]\\
                    |     [ Data Type: float[8]      ]||
               COLOR|RGB, [ Storage: rectangular     ]||
                    \     [ Order: C_order           ]//

q:=plot3d(1, x=0..2*Pi, y=0..Pi, coords=spherical, style=surface,

display(PLOT3D(MESH(op([1,1],q), op([1,4..-1],p)), op(2..-1,q)),


I'm relatively new to Maple and was wondering if there was a way to use a do loop to plot a succession of graphs with different colors and legends.
So far I have

for C to 7 do
S := 'S';
S := .7+.1*C;
p || C := plot(R[123], lambda = 5 .. 25, y = 0 .. 1, legend = "S=0.7+(0.1*C)")
end do ;


But I can't figure out how to actually get the legend to update or to assign a new color to each line.

(a colored band on a torus)

Someone asked me the other week whether a color gradient could be easily applied to a high density point-plot, either vertically or horizontally graded.

Without thinking, I said, "Sure, easy." But when I got to a computer, and gave it a little thought, I realized that it's not that easy to do it efficiently. And it really ought to be, even for tens of thousands of points.

There is a help-page plot,color which briefly describes some things that can be done with coloring plots. As of Maple 16, it mentions a "color data structure" which can be created by calls to the new ColorTools package. There is an example on that page for a single color, but not for several colors concurrently. Using Colortools to get a list of colors, for many points, can be done. (And there ought to be such an example.) But for the case of many data points that uses quite a lot of memory, and is slow.

Also, there is no 2D plotting equivalent to the 3D plotting colorfunc functionality. There ought to be. And just as the 3D colorfunc should be fixed to take three arguments (x,y, & z) any new 2D colorfunc should be made to take two arguments (x & y).

So, how can we apply a color gradient on a 25000 2D-point-plot, shaded by y-value? One way is to notice that the various 2D and 3D plot data structures can now store an efficient m-by-3 (or m-by-n-by-3) C_order, float[8] Array for the purpose of representing the chosen colors. (That is not documented, but can be learned by observation and inspection of various example plot structures.) We know that such an Array is relatively memory-light, and can be produced very quickly.

What this task has become is a 2D version of this method of inserting a custom made color sequence into a 3D plot, but more efficient on account of using a float[8] Array.

To get some decent timings the attached worksheet uses the time[real] command. Timings are computed both immediately after computation (same execution block) as well as after plot rendering (next execution block).

It takes about 1 sec for the Maple 16.01 64bit Standard GUI on Windows 7 to throw up and render the plot, for both methods.

It takes 3.4 sec, and a 108 MB increase in allocated memory, to compute the plot data structure result using ColorTools and a list. But it takes only 0.45 sec, and a 20.5 MB increase in allocated memory, to compute an equivalent plot data structure using the float[8] Array. (Timings on an Intel i7-960.)

[worksheet upload is misbehaving. So inlining the code.]







time[real]()-str; # in new execution group











time[real]()-str; # in new execution group



Hello everyone !


First of all, excuse my English if it's difficult to read, I'm french.


I'd like to draw a surface/shape in 3D in spherical and I used plot3d with coords=spherical to do so. But I'd like to color on the picture to change when R(theta,phi) changes. I could visualize how R is changing and where it is the same. But I have no idea how to do so...


I can't put the picture here, the formula is too long...

I would like to show a single plot comparing the 2nd, 3rd, and 4th degree Taylor polynomials of y=sqrt(2x+1) centered at x=4, with each polynomial having a different color. By default, Maple produces the plot with the function in red and all polynomials in blue. I can easily do this using the plot command, but I'd like to know if there is an option in the TaylorApproximation command that would achieve the same end result.


1 2 3 Page 1 of 3