Plotting multiple Masts
Opened this issue · 3 comments
Am curious if there is a way to save the plots of multiple masts and combine them into one for comparison. Thanks for the wonderful work!
Back home again...
Hi Andrew,
You mean something like returning the plot data by a plotting function to be used in combination with other?
aep.1 <- plotAep(mast.1, plot=FALSE) # store plot data of first mast
aep.2 <- plotAep(mast.2, plot=FALSE) # store plot data of second mast
combine.plots(aep.1, aep.2) # combine plots
Could indeed be helpful.
Closed?
Do you have a solution for this? I started working on this feature, but it is not as simple as I thought. Still interesting for me...
I have implemented a prototype. The function combine
takes the output of plot functions (currently only plot.aep) and combines two plots.
An example (see also ?combine
):
# prepare
data(winddata)
set1 <- set(height=40, v.avg=winddata[,2], v.std=winddata[,5], dir.avg=winddata[,14])
set2 <- set(height=30, v.avg=winddata[,6], v.std=winddata[,9], dir.avg=winddata[,16])
ts <- timestamp(timestamp=winddata[,1])
neubuerg <- mast(timestamp=ts, set1, set2)
neubuerg <- clean(mast=neubuerg)
neubuerg.wp <- profile(mast=neubuerg, v.set=c(1,2), dir.set=1, print=FALSE)
pw.56 <- pc("PowerWind_56_900kW.wtg")
## calculate aep
aep.59 <- aep(profile=neubuerg.wp, pc=pw.56, hub.h=59)
aep.71 <- aep(profile=neubuerg.wp, pc=pw.56, hub.h=71)
## plot
plt.59 <- plot(aep.59, type="n")
plt.71 <- plot(aep.71, type="n")
## combine plots
combine(plt.59, plt.71)
The legend is not very robust - maybe I have to build one from ground up...
I would appreciate any testing, bug reports and suggestions!