worksheet {DASplusR}R Documentation

Create and manipulate a worksheet

Description

Create up to 20 frames on a single graphic device

'worksheet' to create (overwrite) a worksheet

'worksheetFrame' to create a new frame by the coordinates of its left bottom corner and its right top corner

'activeFrame' to choose a frame for plotting

'saveWorksheet' to save a worksheet to a file

'loadWorksheet' to load a worksheet from a file

'frameColor' to change the color of a frame (default is transparent)

'deleteFrame' to delete a frame from the the worksheet

'worksheetExists' to test if a worksheet already exists (used by other DAS+R functions)

'clearWorksheet' to remove all frames from a worksheet

'deleteWorksheet' to completely remove a worksheet

Usage

          worksheet(width,height,col="transparent")
          worksheetFrame(xmin,ymin,xmax,ymax,col="transparent")
          activeFrame(new.screen=0)
          saveWorksheet(filename,size,coordinates,colors)
          loadWorksheet(filename)
          frameColor(active.screen,bg.color)
          worksheetExists()
          deleteFrame(active.screen)
          deleteWorksheet()
          clearWorksheet()
          

Arguments

width the width of the worksheet in cm
height the height of the worksheet in cm
xmin x-Coordinate of the left bottom corner
ymin y-Coordinate of the left bottom corner
xmax x-Coordinate of the right top corner
ymax y-Coordinate of the right top corner
col background color of the new frame or worksheet
new.screen frame that should be activated
filename name of a file for loading or saving
size vector with the width and height of the worksheet
coordinates n x 4 - matrix containing the coordinates of the leftbottom corner and of the right top coner for each frame
colors number of frames plus one vector containing the color of the worksheet and of all frames
active.screen frame that should be filled with bg.color or deleted
bg.color color for filling the frame with the number active.screen

Note

Before plotting into a frame, you have to activate the frame by the function 'activeFrame', by clicking on a frame or double click on a frame number inside the GUI 'Worksheet Menu'.

If you plot without selecting a frame, all frames will be cleared and the worksheet will be filled with the actual background color.

'Clear/Fill the active frame' is only filling the frame with its background color, so if it is 'transparent' nothing will happen.

Author(s)

Alexander Kowarik, TU Vienna, December 2007

See Also

split.screen.

Examples


          ## create a new worksheet with two frames
          data(KOLA95_C2MM)
          attach(KOLA95_C2MM)
          worksheet(20,20)
          worksheetFrame(0,0,10,20,col="blue")
          worksheetFrame(10,0,20,20)
          activeFrame(1)
          plot(density(na.omit(Al)),main="Density KOLA95_C2MM$Al")
          activeFrame(2)
          hist(na.omit(Al),main="Histogram KOLA95_C2MM$Al")

          ## create a A4 worksheet with four frames
          worksheet(25,18)
          worksheetFrame(0,0,16.75,18,col="transparent")
          worksheetFrame(8.25,9,16.75,18,col="transparent")
          worksheetFrame(16.75,9,25,18,col="transparent")
          worksheetFrame(16.75,0,25,9,col="transparent")
          activeFrame(1)
          hist(Si,main="KOLA95_C2MM$Si")
          activeFrame(4)
          plot(density(na.omit(Si)),xlab="",ylab="",main="")
          activeFrame(2)
          plot(YCOO~XCOO,col=rainbow(50)[cut(Si,50)],main="")
          activeFrame(3)
          boxplotDAS(KOLA95_Chor$Si, ylab="Si [mg/kg]",logV=FALSE)
          detach(KOLA95_C2MM)
          

[Package DASplusR version 0.0-1 Index]