/* ** Plot results */ plotLayout(2, 1, 1); // Plot control structure struct plotControl myPlot; myPlot = plotGetDefaults("XY"); // Turn grid off plotSetGrid(&myPlot, "off"); // Font settings font_name = "Helvetica Neue"; font_color = "#666666"; title_size = 18; label_size = 14; legend_size = 10; /* ** Filtered data */ // Title plotSetTitle(&myPlot, "Nile Annual Flow Volumes at Aswan", font_name, title_size, font_color); // Legend plotSetLegend(&myPlot, "Filtered"$|"Observed", "top right", 1); plotSetLegendFont(&myPlot, font_name, legend_size, font_color); // Change color of axes numbers plotSetTicLabelFont(&myPlot, font_name, legend_size, font_color); // Set up to add plot of filtered data // Turn line symbol off plotSetLineSymbol(&myPlot, -1); // Time series plot of filtered data plotTS(myPlot, 1871, 1 , rslt.filtered_state'); /* ** Observed Data */ // Scatter plot of observed data x = seqa(1,1,rows(y)); plotAddScatter(x, y); /* ** Filtered State Variance */ // Plot filtered state variance plotLayout(2, 1, 2); // Plot control structure struct plotControl myPlot2; myPlot2 = plotGetDefaults("xy"); // Turn grid off plotSetGrid(&myPlot2, "off"); // Change color of axes numbers plotSetTicLabelFont(&myPlot, font_name, legend_size, font_color); // Turn line symbol off plotSetLineSymbol(&myPlot2, -1); // Label y plotSetYLabel(&myplot2, "Filtered State Variance [P_tt]", font_name, label_size, font_color); plotTS(myPlot2, 1871, 1 , arraytomat(areshape(rslt.filtered_state_cov, 100|1)));
Have a Specific Question?
Get a real answer from a real person
Need Support?
Get help from our friendly experts.