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

Is geom_smooth() by default added through plotTemporal() in DGVMTools? #62

Closed halima1993 closed 3 years ago

halima1993 commented 3 years ago

Hey again Matthew, as I told you before I would like to calculate the total VegC, so I go for the code like you mentioned:

 cpool.ipsl<- defineSource(id = "ipsl_cm5a_mr_26_c3_1_1", 
dir = "E:/ipsl_cm5a_mr_26_c3_1_1", # this would normlly just be a character string containing a path format = GUESS, name = "ipsl_cm5a_mr_26_c3_1_1") 

#getting field 
ipslfield<- getField(source =cpool.ipsl,  

                  var = "cpool", cover.threshold = 0.01,verbose = TRUE, spatial.extent = mountains, spatial.extent.id = "SEA") #mainfile 
field.m2 <- addArea(input = ipslfield, unit = "m^2") 
print(field.m2@data) 
layerOp(x = field.m2, operator = "*", layers = c("VegC", "Area"), new.layer = "TotalVegC")  
print(field.m2) 
aggregate<-aggregateSpatial(field.m2, method="sum") 
plotTemporal(aggregate, layers=c("TotalVegC")) 
print(aggregate) 

I would like to know that is the geom_smooth() by default added through DGVMTools? B/c now all the plotTemporal graphs are giving a geom_smooth automatically even though no command is been given.

MagicForrest commented 3 years ago

Hi Halima,

Yes it is the default now. Maybe I will turn it off be default in a future release. You can do it with "plotTrend = FALSE" to plotTemporal().

In general, you can check the function documentation for these sorts of things, they should generally be up to date.

MagicForrest commented 3 years ago

The plotTrend argument to plotTemporal() is now set to FALSE by default in the Format-NetCDF branch which will be merged into master.