Adding a legend to a GeneRegionTrack?
0
0
Entering edit mode
maltethodberg ▴ 180
@maltethodberg-9690
Last seen 1 hour ago
Denmark

Quick Gviz question:

For a DataTrack, there is an option to add a legend via setting legend=TRUE

I'm using the feature argument in GeneRegionTrack to color different features. Is there a way to add a legend to the track indicating what the colors mean? Simply supplying legend=TRUE does not work.

Gviz GeneRegionTrack • 1.1k views
ADD COMMENT
0
Entering edit mode

Hi,

Currently it is implemented only for DataTrack-Class. Do you have an example code where do you want to use it?

Best, Robert

ADD REPLY
0
Entering edit mode

The use case was manually setting colors of items on a GeneRegionTrack, for example colouring by strand. I figured a somewhat hacky workaround: You can use an OverlayTrack, to put a DataTrack with no data but a legend on top of a GeneRegionTrack. You have to do some fiddling to make sure the features plotted don't overlap the legend though.

ADD REPLY

Login before adding your answer.

Traffic: 507 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6