drawLinegraphTrack {gmoviz} | R Documentation |
Adds a line graph track to the existing plot. Must have
initialised the circular plot (by gmovizInitialise
first).
drawLinegraphTrack(plot_data, track_border_colour = "black", track_height = 0.3, yaxis_increment = NULL, ylim = NULL, line_shade_colour = "#5ab4ac", line_colour = "black", yaxis_label_size = 0.5, show_yaxis = TRUE, yaxis_tick_size = 0.4, yaxis_side = "left", yaxis_colour = "black", yaxis_location = CELL_META$sector.index, show_gridlines = TRUE, gridline_colour = "#aaaaaa")
plot_data |
Either: (1) a GRanges object with a metadata
column of y values to plot OR (2) a data frame with four columns; |
track_border_colour |
Colour of the border of the plotting region. |
track_height |
The proportion (between 0 and 1) of the circle taken up by this track. |
yaxis_increment |
The increment the y axis and gridlines will use. |
ylim |
Vector of length 2; upper and lower limits for y axis. |
line_shade_colour |
The colour the will be used to fill in under the line. Set this to NULL if you just want the line rather than the area. |
line_colour |
The colour of the line itself. |
yaxis_label_size |
Size of the labels on the y axis. |
show_yaxis |
If |
yaxis_tick_size |
Size of the ticks on the y axis. |
yaxis_side |
Side of the sector the y axis is on; either |
yaxis_colour |
Colour of the y axis. |
yaxis_location |
Sector the y axis is drawn on. |
show_gridlines |
If |
gridline_colour |
Colour of the gridlines. |
Adds a line graph track to existing visualisation.
gmovizInitialise
, which must be used to initialise
the graph before this function. Also drawScatterplotTrack
for
a similar function which displays data as a scatterplot rather than as a
line graph.
## you must initialise first! small_ideo <- data.frame(chr=c('region 1', 'region 2', 'region 3'), start=c(0, 0, 0), end=c(10000, 12000, 10000)) gmovizInitialise(small_ideo, custom_sector_width=c(0.3, 0.3, 0.3)) ## make the data smallplot_data <- data.frame( chr = sample(c('region 1', 'region 2','region 3'), size=300, replace=TRUE), start = seq(0, 10000, length.out=300), end = seq(0, 10000, length.out=300), val = rnorm(300, 2, 0.5)) ## line graph with no shading (just the line) drawLinegraphTrack(smallplot_data, line_shade_colour=NULL) ## line graph with shading (a filled in shape) drawLinegraphTrack(smallplot_data, line_shade_colour='#db009599')