saveImage: saveImage

Description Usage Arguments Value Author(s) See Also Examples

Description

Write an image of the specified type to the specified file. For image type 'png' there is an option to set the height of the image (see argument h). Note: the file is written to the file system of the computer upon which R is running, not Cytoscape – in those cases where they are different. It is saved to the working directory.

Usage

1
saveImage(obj, file.name, image.type, h = 600)

Arguments

obj

a CytoscapeWindowClass object.

file.name

a char object. Use an explicit, full path, or this file will be written into your home directory.

image.type

a char object. 'png', 'pdf', 'svg' are the only image types currently supported

h

a numeric object. The height of the image. Width will be automatically set based on the height. Option only available for 'png' image type. All other image types use the default of 600 for the height and it is not adjustable.

Value

None.

Author(s)

Tanja Muetze, Georgi Kolishovski, Paul Shannon

See Also

selectNodes clearSelection

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  ## Not run: 
  # first, delete existing windows to save memory:
  deleteAllWindows(CytoscapeConnection())

  cw <- CytoscapeWindow ('saveImage.test', graph=makeSimpleGraph())
  displayGraph (cw)
  layoutNetwork(cw, 'force-directed')
  redraw (cw)
  filename <- paste (getwd (), 'saveImageTest', sep='/')
  saveImage (cw, filename, 'svg')   # currently supports svg, pdf and png
  saveImage(cw, filename, 'png', 1600)

## End(Not run)

tmuetze/Bioconductor_RCy3_the_new_RCytoscape documentation built on May 31, 2019, 4:39 p.m.