I am making VPC plot using
vpc_plot(vpc_fpm; axis = (xlabel = "Time (hrs)", ylabel = "Concentration",
xticks = [0, 24, 96, 168, 240, 336, 504], yticks = [1000, 5000, 10000, 15000]),
yformatter = :plain)
- How can I change unit of time from hrs to days? I am wondering how to divide time colume by 24 hours.
- I would like to change y axis label to non scientific notation. I used
yformatter = :plain but it still gives me lable like 1.00x10^4. How can I change it to 10000?
I don’t know if it is possible to tell VPC plot to convert units directly. But you can rerun your model with the units as hours by dividing the time by 24 as you suggested.
yformatter = string. See if that helps.
Thank you so much!
I tried both
yformatter = string and
yformatter = :string, but unfortunately they didn’t work. But thank you for your help!
@Dawoon did you take a look at this post? NIBR data analysis - #51 by vijay
an excerpt from there
avg_pk_plots = summary_observations_vs_time(ncapop,
color = :black, linewidth = 2, whiskerwidth = 8,
paginate = true,
limit = 1,
axis = (xlabel = "Time (hours)",
ylabel = "Concentration (μg/mL)",
yscale=log10, ytickformat=x -> string.(round.(x; digits=1)),
yticks = [0.1, 1, 10],
ygridwidth = 3,
yminorgridcolor = :darkgrey,
yminorticksvisible = true,
yminorgridvisible = true,
yminorticks = IntervalsBetween(10),
xminorticksvisible = true,
xminorgridvisible = true,
xminorticks = IntervalsBetween(5),
limits = (nothing, nothing, nothing, 30),
spinewidth = 2),
#facet = ( combinelabels = true,),
figure = (resolution = (800,800),
fontsize = 22),)
Sorry, I missed your post. Your suggestion works well. Thank you so much!