My suggestion is - nograph should not compute the graph - nodisplay should build and save the graph but not show it - the necessary rewrite of the graph routines should factorize common code - we should only save graphs in one format (other on option) I suggest EPS, but would agree to PDF
Best
Michel
On 12/14/2011 03:20 PM, marco.ratto@jrc.ec.europa.eu wrote:
Dear Sebastien, Stephane,
I am a bit confused about the nograph option in estimation. While is stoch_simul the logic of this option is clearly to skip any plot in loops, the practice for estimation has been more to avoid having a lot of plots opened after estimation and or MH, but the plots are done (more a nodisplay than a nograph).
In recent commits, it happens that smoothed shocks and historical and smoothed variables are made behind the scene as "visible off", however the saved fig files are not visible when opened later on and, during the dynare session, such figures keep being opened behind the scene (no close command). So, "close all" needs to be typed to close all invisible plots.
At the same time, in dynare_estimation_init, priors are not plotted when nograph=1 even if plot_priors=1.
My question is: if the logic of nograph in estimation is to do the plots 'behind the scene', then priors should be plotted as well (so nograph is in fact a nodisplay option: I always found this is a useful feature since for non-trivial models the number of plots produced can be very large and it is good to have them saved without having a lot of figures opened in matlab). In this case, I would push on my personal repository the fix to the problem of saving fig's as visible without seeing any new plot popping up during computations.
If nograph should imply that no graph is ever produced in estimation as for in stoch_simul, then also plots for smoothed shocks and historical variables should be skipped when nograph=1.
How should I proceed? Thanks for your advice,
best, Marco
Michel Juillard michel.juillard@mjui.fr writes:
My suggestion is
- nograph should not compute the graph
- nodisplay should build and save the graph but not show it
- the necessary rewrite of the graph routines should factorize common code
- we should only save graphs in one format (other on option) I suggest EPS, but
would agree to PDF
I think we should have this discussion in trac ticket #216, which basically says the same thing:
https://www.dynare.org/trac/ticket/216
Best,
On 12/14/2011 03:20 PM, marco.ratto@jrc.ec.europa.eu wrote:
Dear Sebastien, Stephane,
I am a bit confused about the nograph option in estimation. While is stoch_simul the logic of this option is clearly to skip any plot in loops, the practice for estimation has been more to avoid having a lot of plots opened after estimation and or MH, but the plots are done (more a nodisplay than a nograph).
In recent commits, it happens that smoothed shocks and historical and smoothed variables are made behind the scene as "visible off", however the saved fig files are not visible when opened later on and, during the dynare session, such figures keep being opened behind the scene (no close command). So, "close all" needs to be typed to close all invisible plots.
At the same time, in dynare_estimation_init, priors are not plotted when nograph=1 even if plot_priors=1.
My question is: if the logic of nograph in estimation is to do the plots behind the scene', then priors should be plotted as well (so nograph is in fact a nodisplay option: I always found this is a useful feature since for non-trivial models the number of plots produced can be very large and it is good to have them saved without having a lot of figures opened in matlab). In this case, I would push on my personal repository the fix to the problem of saving fig's as visible without seeing any new plot popping up during computations.
If nograph should imply that no graph is ever produced in estimation as for in stoch_simul, then also plots for smoothed shocks and historical variables should be skipped when nograph=1.
How should I proceed? Thanks for your advice,
best, Marco
Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev
I think this will be a good implementation: I guess this will go for 4.3 release, leaving 4.2.4 untouched?
This implies two new options: nodisplay (default =1 ?) graph_format (default = 'eps'), but would allow 'fig', 'pdf' as well as multiple choices, e.g. eps AND fig [i.e char('eps','fig')]
Concerning the factorization of common code, we may think of writing two routines like -) dyn_figure which opens a new figure as visible off when nodisplay = 1: this will replace all figure instances. -) dyn_saveas, which saves the figure in the required format and set the figure visible just before saving the fig format if nodisplay=1): this will replace all saveas AND print -depsc2 AND print -dpdf instances.
What do you think?
Concerning 4.2.4, moreover, I think the current status in dynare_estimation_1 is a bit buggy, since when nograph=1 the plots are done as visible off and never closed, so a lot of plots (and associated memory) are opened without the user being aware of them. Moreover the saved fig are also not visible.
I did a fix of this making plots visible when needed, and close them as well. I committed dynare_estimation_1 on my personal repository.
Best Marco
On 12/15/2011 5:47 PM, Michel Juillard wrote:
My suggestion is
- nograph should not compute the graph
- nodisplay should build and save the graph but not show it
- the necessary rewrite of the graph routines should factorize common code
- we should only save graphs in one format (other on option) I suggest
EPS, but would agree to PDF
Best
Michel
On 12/14/2011 03:20 PM, marco.ratto@jrc.ec.europa.eu wrote:
Dear Sebastien, Stephane,
I am a bit confused about the nograph option in estimation. While is stoch_simul the logic of this option is clearly to skip any plot in loops, the practice for estimation has been more to avoid having a lot of plots opened after estimation and or MH, but the plots are done (more a nodisplay than a nograph).
In recent commits, it happens that smoothed shocks and historical and smoothed variables are made behind the scene as "visible off", however the saved fig files are not visible when opened later on and, during the dynare session, such figures keep being opened behind the scene (no close command). So, "close all" needs to be typed to close all invisible plots.
At the same time, in dynare_estimation_init, priors are not plotted when nograph=1 even if plot_priors=1.
My question is: if the logic of nograph in estimation is to do the plots 'behind the scene', then priors should be plotted as well (so nograph is in fact a nodisplay option: I always found this is a useful feature since for non-trivial models the number of plots produced can be very large and it is good to have them saved without having a lot of figures opened in matlab). In this case, I would push on my personal repository the fix to the problem of saving fig's as visible without seeing any new plot popping up during computations.
If nograph should imply that no graph is ever produced in estimation as for in stoch_simul, then also plots for smoothed shocks and historical variables should be skipped when nograph=1.
How should I proceed? Thanks for your advice,
best, Marco
marco.ratto@jrc.ec.europa.eu writes:
Concerning 4.2.4, moreover, I think the current status in dynare_estimation_1 is a bit buggy, since when nograph=1 the plots are done as visible off and never closed, so a lot of plots (and associated memory) are opened without the user being aware of them. Moreover the saved fig are also not visible.
I did a fix of this making plots visible when needed, and close them as well. I committed dynare_estimation_1 on my personal repository.
I merged this changeset.