![]() |
Background Images on Plots |
ColorTools Updates |
Custom Plot Shading |
Fractals |
Signal Processing |
Time Series |
Plots have several new options that make it possible to add a background image, as well as to programmatically set the plot size.
> | ![]() ![]() |
Example |
|||
Changing the size or background color of a plot is easily done using new options for plotting commands.
|
|
Example |
|||
Background images can be used to show the connection between mathematical expressions and real life structures. In this example, a parabola follows the rails of a roller coaster.
|
|
Example |
The following example plots the location of all earthquakes of magnitude 2.5 or greater over a 7 day period. Data compiled by the U.S. Geological Survey.
For more details on these new options, see the Background Images page. |
Several new commands in the ColorTools package allow collections of colors (palettes) to be extended or reduced. Such collections of colors can be easily used in the shading of multiple plot objects.
This section illustrates the functionality by extracting the colors from an external image file, reducing the full collection of its colors to a small representative list, extending that collection with additional colors, sorting that larger collection to increase visual distinction, and then using the final collection of colors as the basis of a new plotting color palette.
In addition, we demonstrate a new way to visualize collections of colors.
> | ![]() ![]() ![]() ![]() |
We can begin by reading an image file into the Maple session. The resulting Array structure is interpreted by Maple as an image, and can be viewed or embedded directly in the current document. The ability to programmatically embed images directly into your document is new in Maple 18.
> | ![]() |
> | ![]() |
The colors can be extracted from the image. The ColorsFromImage command can extract from the image a list of Color objects as a format understood by the ColorTools package.
> | ![]() ![]() |
![]() |
Below is a small selection of those colors.
> | ![]() |
![]() |
The new SpatterPlot and SpatterPlot3d commands of Maple 18 allow us to visualize the distribution of colors in the image in either two or three dimensions. These new commands also allow the colors to be plotted in various color spaces.
Here are the colors from the image, plotted in terms of the RGB and Lab color spaces.
> | ![]() |
|
Using the ReducePalette command, the list of colors from the image can be reduced to a much smaller, but still representative, list of colors.
> | ![]() |
![]() |
> | ![]() |
![]() |
The small list of representative colors can be further expanded to produce a larger palette.
> | ![]() |
![]() |
The above list of colors is not ordered in a manner suitable for plotting multiple curves, since the colors near the start of the list are too close together. Notice that the first and fourth colors are not readily distinguishable.
The expanded list of colors can be sorted by the new SortPalette command, so that the earlier colors are farther apart. This can make the final list of colors more suitable as a palette for plotting multiple curves, since the earlier colors will be more visually distinguishable in the given color space.
> | ![]() |
![]() |
> | ![]() |
![]() |
To set a new color palette for plotting, pass the above final color list to the setcolors command. This allows the colors to be used for shading multiple curves without requiring any reference to the color list within the plotting commands.
The Color object is just one of several formats to denote color that the setcolors command supports.
> | ![]() |
|
|
|
The extended palette can be plotted together with the original full list of colors from the image.
> | ![]() |
![]() |
Custom shading schemes are now supported for three-dimensional plotting when using the plot3d command as well as for two-dimensional density-style plotting using the surfdata command. Shading can be specified using coloring procedures, color data from existing 3-D plots, or images.
Examples |
||||||||
Continuing the example from the ColorTools section above, we can see how 3-D plots can now be easily shaded with color gradients. In this example, this is done using the RGB color space equivalent colors from the reduced list.
A 3-D plot can also be shaded with an image, a form of texture mapping. In the following example we apply a satellite map (image courtesy of NASA Blue Marble Next Generation) to a sphere to generating a representation to the Earth as a globe.
|
For more details, see Custom Plot Shading.
Another feature added in Maple 18 with applicability to 3-D plotting and solid modeling is the extrude command.
This takes a 2-D plot and extrudes it along a specified path. The default path is a uniform extrusion in the z-direction over the specified interval.
|
|
|||
|
|
The new Fractals package makes it easier to create and explore popular fractals, including Mandelbrot, Julia, Newton, and other time-iterative fractals.
> | ![]() |
> | ![]() |
> | ![]() |
> | ![]() |
For more information on the new Fractals package, see Escape-Time Fractals.
The Signal Processing package now features new commands for generating spectrograms as well as plots for signals.
To find out about other new functionality for Signal Processing, see Updates in Signal Processing.
Example |
||||||||||
|
The new Time Series Analysis package features several new plots, including TimeSeriesPlot, which displays time series data, and SeasonalSubseriesPlot, which displays seasonal time series data.
For more details on this package, see New Time Series Analysis Package.
Example |
|||||||||
To display a simple plot of the Time Series, use the TimeSeriesPlot command.
|
|||||||||
To show seasonal Time Series data, use the SeasonalSubseriesPlot command.
|