| compose_open | R Documentation |
compose_open create plot layout and open PNG graphic device.
compose_open(...)
... |
Set of arguments, which are recognized via their names and classes:
|
Other usage of compose_open(...,dev=TRUE) is
compose_open(...,dev=FALSE) compose_close()
The reason to use compose_design function before compose_open is to reduce number of arguments in the case of complicated layout matrix and non-standard settings.
compose_open passes arguments to png function.
If character values are specified for arguments width, height or scale, then layout development is oriented to produce PNG file, which will be used as a paper copy. Character values for width and height are in centimeters. Character value V or 1:V of scale defines scale 1/V.
The Cairo device (device="cairo") is more quick on MS Windows computers. However Windows GDI may produce less depth of colors (even 8 BPP) in the case of no font antialiasing. Usage of Windows GDI (device="windows") is a way to produce illustations for scientific journals with strict requirements of mininal line width, font size, etc.
The PNG layout reserves extra margins for captions of color bars. These margins are filled by white spaces. The cropping of layout applies to created PNG file using read-write functions of package png. Only white ("white", "#FFFFFF") or transparent ("transparent") colors are regognized as white spaces. Therefore, specification of bg!="white" or bg!="transparent" breaks PNG image cropping.
It is noted that Cyrillics is supported on Windows GDI (device="windows") and is not supported on Cairo (device="cairo") types of PNG device on MS Windows platform.
Argument retina is ignored for leaflet-compatible tiling.
Name of created PNG file.
If dev=TRUE then output on console is layout matrix.
The set of required parameters for plotting are kept until function compose_close call via options.
ursaPngAuto |
For developers. Indicator of high-level functions for internal use (manual set; value is |
ursaPngBox |
Argument |
ursaPngDelafter |
Argument |
ursaPngDevice |
Argument |
ursaPngDpi |
Argument |
ursaPngFamily |
Applied for text plotting in annotations and legends. |
ursaPngFigure |
Set |
ursaPngFileout |
Name of created PNG file. |
ursaPngLayout |
Layout matrix, the object of class |
ursaPngPaperScale |
Numeric. Used for scalebar representation on the paper-based maps. If value |
ursaPngPlot |
The opposite to argument |
ursaPngScale |
The actual value of argument |
ursaPngShadow |
Set |
ursaPngSkipLegend |
Integer vector of non-negative length. Defines list of images panels, for which the color bars are not displayed. |
ursaPngWaitBeforeRemove |
Argument |
Nikita Platonov platonov@sevin.ru
session_grid(NULL)
b <- ursa_dummy(nband=4,min=0,max=50,mul=1/4,elements=16)
p <- list(colorize(b[1:2],pal.rich=240,pal.rotate=0)
,colorize(sqrt(b[3:4]),pal.rich=-15,pal.rotate=0,stretch="equal"))
p
## exam #01
compose_open(width=950,dpi=150,pointsize=16,legend=NULL,dev=TRUE)
## exam #02
compose_open(pointsize=8,dpi=150,scale="1:130000000")
compose_plot(colorize(b[1]),scalebar=TRUE,coast=FALSE)
compose_close()
## exam #03
cl <- compose_design(layout=c(2,4)
,legend=list(list("top","full"),list("bottom",1:3)))
compose_open(cl,dev=TRUE)
## exam #04
cl <- compose_design(p,layout=c(2,3),skip=c(2,4,6))
compose_open(cl,dev=TRUE)
## exam #05
cl <- compose_design(p,side=3)
compose_open(cl,dev=FALSE,bg="transparent")
compose_close()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.