Justify title track when rotation = 0
1
0
Entering edit mode
Xenia • 0
@07a5ab1d
Last seen 5 days ago
United Kingdom

Hi,

I am plotting multiple tracks and for most of them the titles are vertical. I have one track that is relatively thin, so i would like to rotate the title of the track with rotation = 0. This works, however, the first letter hangs off of the left margin of the title panel, even if there is space on the right hand side (so it isn't a title width problem I dont think). Separately, I also observed that f I horizontally rotated the other titles, they would not align to the same margin on the left; i.e. they would have different indents. Is there a way to control the indent/margin within the title panel so that a) I can move this specific one more to the right or centre it within the title, and b) if i wanted to (in this case It isn't necessary since I will keep my other titles vertical), align them all?

Thank you!

Code should be placed in three backticks as shown below


feature_track             <- AnnotationTrack(
      features_data,
      chromosome                   = seq_name,
      name                         = "Transgene",
      strand                       = feature_strand,
      feature                      = features_data$feature,
      group                        = features_data$group,

      col                          = default_border_col,
      lwd                          = default_line_width,

      showId                       = TRUE,
      just.group                   = "left", #default is left. Either left, right, above or below.
      cex.group                    = cex_strain_name,

      id                           = features_data$label,
      showFeatureId                = TRUE,
      fontcolor.item               = default_font_col,
      cex.feature                  = cex_construct_labels,

      stacking                     = "squish",
      mergeGroups                  = FALSE,
      collapse                     = FALSE,
      shape                        = "fixedArrow",
      arrowHeadWidth               = 4,

      background.title               = "#565656",
      background.panel               = "#FAFAFA",
      col.border.title               = "#FAFAFA",
      rotation.title                 = 0,
      **just. title = "right",**
      frame                          = TRUE,
      col.frame                      = "#a0a7a8",
      col.title                      = "white",
      cex.title                      = cex_feature_track_name
      )

    displayPars(feature_track)    <- as.list(feature_colors)
    print(displayPars(feature_track))
  }
Gviz gviz • 105 views
ADD COMMENT

Login before adding your answer.

Traffic: 2131 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