Search
Question: gviz: DataTrack: histogram like barplot baseline changed to most negative values when all score is negative
0
gravatar for wenhuo hu
5 months ago by
wenhuo hu200
United States
wenhuo hu200 wrote:

I am plotting by Gviz pacckage. I need to get a barplot for a range, for example, from chr1:1-100, with value/score 40, I will need a bar with the hight of 40. It works by choosing type='histogram' when the value is positive. It also works when there are scores mixed with positive and negative values. But when there are all negative scores, the base line changes to the most negative value, for example chr1:1-100 with value -20, and chr1:200-300 with value -50, the base line is -50, the bar is from -50 to -20, and from -50 to 0 respectively. While I need them still from 0 to -20, and from 0 to -50. 

Any suggestion?

ADD COMMENTlink modified 5 months ago by Robert Ivanek530 • written 5 months ago by wenhuo hu200
0
gravatar for Robert Ivanek
5 months ago by
Robert Ivanek530
Switzerland
Robert Ivanek530 wrote:

You can set the y-axis limits.

library(Gviz)
dt <- DataTrack(GRanges("chr1", IRanges(1:100,1:100), value=sample(-c(20,50), 100, replace=T)))
plotTracks(dt, type="histogram", ylim=c(-50,0))

 

ADD COMMENTlink written 5 months ago by Robert Ivanek530
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 335 users visited in the last hour