addAnnotationText: Add Text Annotation

View source: R/Annotations.R

addAnnotationTextR Documentation

Add Text Annotation

Description

Adds a text annotation to a Cytoscape network view. The object will also be added to the Annotation Panel in the GUI.

Usage

addAnnotationText(
  text = NULL,
  x.pos = NULL,
  y.pos = NULL,
  fontSize = NULL,
  fontFamily = NULL,
  fontStyle = NULL,
  color = NULL,
  angle = NULL,
  name = NULL,
  canvas = NULL,
  z.order = NULL,
  network = NULL,
  base.url = .defaultBaseUrl
)

Arguments

text

The text to be displayed

x.pos

(optional) X position in pixels from left; default is center of current view

y.pos

(optional) Y position in pixels from top; default is center of current view

fontSize

(optional) Numeric value; default is 12

fontFamily

(optional) Font family; default is Arial

fontStyle

(optional) Font style; default is

color

(optional) Hexidecimal color; default is #000000 (black)

angle

(optional) Angle of text orientation; default is 0.0 (horizontal)

name

(optional) Name of annotation object; default is "Text"

canvas

(optional) Canvas to display annotation, i.e., foreground (default) or background

z.order

(optional) Arrangement order specified by number (larger values are in front of smaller values); default is 0

network

(optional) Name or SUID of the network. Default is the "current" network active in Cytoscape.

base.url

(optional) Ignore unless you need to specify a custom domain, port or version to connect to the CyREST API. Default is http://localhost:1234 and the latest version of the CyREST API supported by this version of RCy3.

Value

A named list of annotation properties, including UUID

Examples


addAnnotationText("test1")
addAnnotationText("test2", 1000, 1000, name="T2")
addAnnotationText("test3", 1200, 1000, 30, "Helvetica", "bold", "#990000",
    40,name="T3", canvas="foreground",z=4)


cytoscape/RCy3 documentation built on April 7, 2024, 2:17 p.m.