JamesW
JamesW

Reputation: 139

Changing rotation, orientation and text size

I have the following code which creates a Complex Upset from a matrix with the additional orange highlight where there are three or more sets on the bars.

#where 'sets' comes from colnames() in the matrix

(upset(data,sets,
       min_size=1,
       name='Multiple Sets',
       wrap=TRUE,
       themes=upset_default_themes(text=list(element_text((family='Trebuchet MS')))),
       base_annotations = list(
         'Intersection size' = intersection_size(
           mapping=aes(fill=3Plus)
         ) +
           scale_fill_manual(values = c(
             'YES'='orange','NO'='black'
           ))
         +ylab("Count of Intersection")
         +theme(legend.position = "none")
         ),
       set_sizes=(
         upset_set_size()
         + ylab('Count of Set')
       )
       ))

The end user has requested that I increase the font size of everything to make it more readable when it is inserted into documents etc. but I cannot figure out how to do this. Can anyone please assist?

I was thinking of changing the orientation of the column labels as well so that the increased font size does not drag out over adjacent columns, but the justification is off when I use:

'Intersection size' = intersection_size(
           mapping=aes(fill=MCNFlag)
           ,text = list(angle=90)
         ) +
           scale_fill_manual(values = c(
             'YES'='orange','NO'='black'
           ))

I have tried using hjust and vjust here, but I get the error message that it is an unknown parameter. Thanks!

Upvotes: 0

Views: 55

Answers (0)

Related Questions