saveImage: saveImage

Description Usage Arguments Value Author(s) See Also Examples

Description

Write an image of the specified type to the specified file, at the specified scaling factor. Note: the file is written to the file system of the computer upon which Cytoscape is running, not R – in those cases where they are different.

Usage

1
saveImage(obj, file.name, image.type, scale)

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. 'jpg' is the only image type currently supported

scale

a numeric object. How large (or small) to scale the image.

Value

None.

Author(s)

Paul Shannon

See Also

selectNodes clearSelection

Examples

1
2
3
4
5
6
  cw <- new.CytoscapeWindow ('saveImage.test', graph=makeSimpleGraph())
  displayGraph (cw)
  layoutNetwork(cw, 'jgraph-spring')
  redraw (cw)
  filename = tempfile () # paste (getwd (), 'saveImageTest.jpg', sep='/')
  # saveImage (cw, filename, 'jpg', 2.0)   # doesn't yet work reliably at bioc

RCytoscape documentation built on Nov. 17, 2017, 10:52 a.m.