MagicForrest / DGVMTools

R package for processing, analysing and visualising ouput from Dynamic Global Vegetation Models (DGVMs)
GNU General Public License v3.0
26 stars 22 forks source link

Modifying Spatial and temporal plots text size, caption, etc... #32

Closed antonycastro closed 5 years ago

antonycastro commented 5 years ago

Hi again MagicForrest,

I write you because I need to polish theme and labels details in the plots produced with DGVMTools. I have attached two R-scripts and the case in a zip. I have two questions:

Looking forward to your feedback, kind regards Antony

Magic_forest.zip

MagicForrest commented 5 years ago

Hi Antony,

This is fairly straightforward, but will need to become familiar with ggplot2. Instead of immediately print the plot with “print(plotSpatialComparison(vegC.comparison))”; first keep the plot in an R variables like "p <- plotSpatialComparison(vegC.comparison)", and then you can modify it using ggplot2. For example:

p <- p + theme(text = element_text(size = 5))

Then, simply "print(p)".

You can do similar things for the x-axis breaks and adding captions.

The reason that you have "undefined_units" is because 'cmass_katrin' is not a known DGVMTools Quantity. The easiest way to solve that is just to rename the file back to cmass.out.

Let me know how you get on with those suggestions.

antonycastro commented 5 years ago

Very practical! All clear now. Thanks,