updates/Maple18/BackgroundImages - Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : updates/Maple18/BackgroundImages

Customizing Size and Background on 2-D Plots

 

Two new options, background  and size for 2-D plotting commands, allow you to superimpose a plot on a background image, set a background color or specify the size of the plot window.

withImageTools:withplots:withplottools:

Setting the Size of the Plot Window

Example

The width and height of the plot window can be given as the number of pixels.

plotsinx,size=500,300,axes=box

 

Example

If the width is given as a floating-point number, it is interpreted as a proportion of the worksheet width.

plotsinx,size=0.75,350,axes=box

 

Example

If the height is given as a floating-point number, it is interpreted as the ratio of the height to the width. The height can be the special name "golden"; in this case, the height/width ratio is the reciprocal of the golden ratio.

plotsinx,size=default,golden,axes=box

 

Using an Image as the Background

The image can be specified as either a name (string) of an image file or an image (array) usable by the package. By default, the plot is displayed with the dimensions of the image.

 

Example

The following example shows the location of all earthquakes of magnitude 2.5 or greater over a seven day period.

Reference: Data compiled by the U.S. Geological Survey.

 

Code to get Earthquake data.

displaylocMag, background = catkerneloptsdatadir,/images/worldmap.jpg, size = 800, 476, view = 180 .. 180, y60 .. y80, leg, axes = none;

 

Example

An image that can be produced or used with the ImageTools package can also be used as the background. The Fractals package can also produce such images.

restart:

withImageTools:withplots:withplottools:

p:=x5x2200:

solsℜ,ℑ~fsolvep,x,complex

sols:=2.32691465200619,1.71884377632728,2.32691465200619,1.71884377632728,0.872204327279742,2.73005723686502,0.872204327279742,2.73005723686502,2.90942064945291,0.

(2.1)

a,b:=3,3

a,b:=3,3

(2.2)

img:=Fractals:-EscapeTime:-Newton400,a+aI,b+bI,p

img:= 1..400 x 1..400 x 1..3 ArrayData Type: float8Storage: rectangularOrder: C_order

(2.3)

plotsols,style=point,symbol=diagonalcross,view=a..b,a..b,background=img

 

Setting a Background Color

The background option can also be used to set the background color.

Example

plotsinx,x=2π..2π,axis=color=white,background=Black

plotcosx+x,x=2π..2π,color=Black,background=Goldenrod,size=0.75,0.5


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam