Closed svdhoog closed 5 years ago
Otherwise we could rename it hardcoded to: Firm_price_total_debt_technology.png and for multiple variables we get: Firm_price_total_debt_technology_0.png, Firm_price_total_debt_technology_1.png, ...
Yes, option 1 is exactly what I meant.
Now the plot name is generic generated but no more hardcoded in the plot_config.yaml In addition I have added the plot_format parameter. You can choose between: png, pdf, ps, eps and svg (see here https://matplotlib.org/api/_as_gen/matplotlib.pyplot.savefig.html)
Good, thanks! I guess this means that in principle we should then remove all the settings for plot_name
on the readme page
https://github.com/svdhoog/FLAViz/blob/master/docs/visualisation_scripts/readme.rst
This would also mean that the files in the results folder now have changed to the generic names. However, for the readme page we actually refer to another folder than the results folder, so all links still work (luckily):
https://github.com/svdhoog/FLAViz/tree/master/docs/visualisation_scripts/plots
I would leave it like it is for now. The examples are still correct, since we can always override the generic name setting by explicit names, correct?
I've already edited the readme and removed all plot_name parameters. Also I've added plot_format as new parameter.
Right now there is no option for setting plot name manually. I can add that if you like. We could check if there is a plot_name set. Then it's explicit and otherwise we use the generic name which is autogenerated.
Yes, probably good to have a manual plot name option, just in case the generic naming causes problems in some cases.
Option was added again. If you do not set it, the plot name will be autogenerated.
Problem plot type histogram
Eurostat_unemployment_rate_set_841_1000_runs_histogram.png_unemployment_rate.png
This is generated when I set:
plot_name: Eurostat_unemployment_rate_set_841_1000_runs_histogram.png
So it appends _unemployment_rate.png
to whatever string is passed to plot_name
Problem plot type Time series
specified 2 sets, 10 runs per set. PNG files are numbered 0-19 if each time series plotted separately:
config.yaml
plot3:
timeseries:
agent: Eurostat
analysis: multiple_run
variables:
var1: [unemployment_rate]
set: [841,842]
run: [range,[1,10]]
major: [range,[6020,26000,20]]
minor: [0]
summary: custom_quantile
quantile_values:
lower_percentile : 0.20
upper_percentile : 0.80
plot3:
number_plots: many
plot_name: Eurostat_set_runs_timeseries
plot_title: Unemployment rate (monthly), sets 841-842
plot_legend: no
fill: yes
legend_location: best
xaxis_label: month
yaxis_label: unemployment rate
linestyle: solid
marker: None
Eurostat_set_runs_timeseries_0.png
Eurostat_set_runs_timeseries_1_1.png
...
Eurostat_set_runs_timeseries_19_19.png
TODO
Filenames are now uniform:
If no filename is specified in plot_config.yaml, then use "Agent_Variable", else use whatever is user-specified.
For filenames in many plot mode:
Resolved in commit d585600
Currently files are enumerated after the user-specified string in the plot_config.yaml. Better would be:
plot_name='Agent_Variable.png'
plot_format=[pdf|png]