Stacked_bar plot for specific period of time?

Hello,
I have AMET output for a whole year and I can plot stacked_barplot from that output file. But I want to plot stacked_barplot for the specific months (for example Sept, Oct, and Nov).
I have added variable " AMET_ADD_QUERY" to the script. But It is giving the same output as whole year.

How do I plot for only specific months?

Thanks in advance

To plot specific months, you do indeed use the AMET_ADD_QUERY field. To plot just Sep, Oct, Nov, you would do the following

setenv AMET_ADD_QUERY “and (d.month=9 or d.month=10 or d.month=11)”

This tells AMET to only include data where the month field is equal to 9, 10, or 11 (Sep, Oct, or Nov). Pay close attention to the syntax of the query. You want to include the or statements within the and statement. If you don’t include the and statement, you’ll get a query of everything in the database. You don’t want that.

Let me know if you have any trouble.

Wyat

2 Likes

Great. It is working. I have one question for this plot bar name

Let’s say I want to modify the bar name “IMPROVE” to “OBSERVED” and “ARDEQ_REGION_F” to “MODELED”.

How do I do that?. I did not see any option in AQ_Stacked_Barplot.R script.

Thank you

You would need to modify the AQ_Stacked_Barplot.R script to make that change. The relevant section in that code is:

{
if (num_runs > 1) {
simulations ← paste(network_label,run_name1,run_name2,sep=",")
sim_names ← c(network_label[1],“Simulation 1”,“Simulation 2”)
}
else {
simulations ← paste(network_label,run_name1,sep="")
sim_names ← c(network_label[1],run_name1)
}
}

You would need to change network_label to “OBSERVED” and run_name1 to “MODELED”. That should change the labels underneath the bars.

Wyat

2 Likes

Hello @wyat.appel ,
I changed the relevant code:

But I am getting errors. The error logfile is