lgatto / MSnbase

Base Classes and Functions for Mass Spectrometry and Proteomics
http://lgatto.github.io/MSnbase/
123 stars 50 forks source link

Allow different orientation of axis labels in image2 #571

Closed lmsimp closed 2 years ago

lmsimp commented 2 years ago

In this PR I have added two new arguments to image2 to allow users to set the las graphical parameter to change the orientation of axis labels. By default the x-axis labels are now perpendicular to the axes.

previous - image (1)

new default - image (2)

lmsimp commented 2 years ago

Related to the above, I also noticed that the default text sizes for the labels in image2 is. x.cex.axis = .75 and y.cex.axis = .75,. This is fine and imagine a smaller cex is needed as often we have many labels. However, I see that naplot which creates a heat map of missing values using image2, and also renders a barplot above it (as per the above) both have different cex.axis for each y-axis. I'm not sure if this intentional. I tend to think it looks messy. I think perhaps it is best to set the axis labels for the barplot also to .75 so it matches the heatmap?

lgatto commented 2 years ago

Thanks. Merged, but you are missing a version bump and the NEWS file. Will do it now, but keep an eye on these next time.