plot_run_vars.Rd
Plot the desired variables from the results of a PEcAn run.
Hits the /api/run/{run_id}/graph/{year}/{y_var}
API endpoint
plot_run_vars(
server,
run_id,
year,
y_var,
x_var = "time",
width = 800,
height = 600,
filename = "plot.png"
)
Server object obtained using the connect() function
ID of the PEcAn run whose details are needed
the year this data is for
the width of the image generated, default is 800 pixels.
the height of the image generated, default is 600 pixels.
File name to save the generated plot, default is 'plot.png'.
the variable to plot along the y-axis.
the variable to plot along the x-axis, by default time is used.
Response obtained from the /api/run/{run_id}/graph/{year}/{y_var}
endpoint
server <- connect(url="http://pecan.localhost:80", username="carya", password="illinois")
# Plot the Gross Primary Productivity vs Time for the run with ID '99000000282' for the year 2002
plot_run_vars(server, run_id=99000000282, year=2002, y_var="GPP")
#> Sorry! Server not responding.
# Plot the Total Respiration vs Soil Respiration for the run with ID '99000000283' for the year 2002 of custom size
plot_run_vars(server, run_id=99000000283, year=2002, y_var="TotalResp", x_var="SoilResp", width=500, height=400)
#> Sorry! Server not responding.