Skip to content

Commit

Permalink
fix literate typo
Browse files Browse the repository at this point in the history
  • Loading branch information
dmetivie committed Jun 15, 2024
1 parent 70717d7 commit de6780b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions examples/plot_utilities.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""
# errorlinehist(y; kwargs):
errorlinehist(y; kwargs)
Function for parsing inputs to easily make a [`ribbons`] (https://ggplot2.tidyverse.org/reference/geom_ribbon.html),
stick errorbar (https://www.mathworks.com/help/matlab/ref/errorbar.html), or plume
(https://stackoverflow.com/questions/65510619/how-to-prepare-my-data-for-plume-plots) with several histograms plot.
# Inputs: default values are indicated with *s
Inputs: default values are indicated with *s
y is a Vector of vector
Expand All @@ -30,7 +30,8 @@ y is a Vector of vector
stickwidth (Float64 *.01*) - How much of the x-axis the horizontal aspect of the error stick should take up.
# Example
Example
```julia
using Distributions
Expand Down Expand Up @@ -59,7 +60,7 @@ errorlinehist(yc, errortype = :percentile, percentiles = [0,100], fillalpha = 0.

ngroups = length(v)

# compute weights (frequencies) by group using those edges
## compute weights (frequencies) by group using those edges
y = zeros(nbins, ngroups)
for i in 1:ngroups
v_i = filter(isfinite, v[i])
Expand Down Expand Up @@ -89,7 +90,6 @@ islabel(j, j_target, label, other_option) = j ∈ j_target ? label : :other_opti
Save the figure and crop it to avoid white spaces
"""
function savefigcrop(plt, save_name)
# save_name = replace(save_name, "." => "p")
isnothing(plt) ? savefig(string(save_name, ".pdf")) : savefig(plt, string(save_name, ".pdf"))
run(`pdfcrop $(string(save_name,".pdf"))`) # Petit délire pour croper proprement la figure
mv(string(save_name, "-crop", ".pdf"), string(save_name, ".pdf"), force=true)
Expand All @@ -104,7 +104,6 @@ ker(u) = 3 / 4 * (1 - abs(u)^2)
cyclic_moving_average(a::AbstractArray, window::Integer)
Simple periodic moving average with Epanechnikov kernel.
"""

function cyclic_moving_average(A::AbstractArray, t::AbstractVector, T::Integer, window)
a = zeros(T)
a[t] .= A
Expand Down
4 changes: 2 additions & 2 deletions examples/tuto_paper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ memory_past_cat = 1

md"""
h = 1 (day before dry) or 2 (day before wet)
$\mathbb{P}(Y = \text{Rain}\mid Z = k, H = h)$ with h = %$(memory_past_cat)
$\mathbb{P}(Y = \text{Rain}\mid Z = k, H = h)$ with h = $(memory_past_cat)
"""

p_FR_map_mean_prob = map_with_stations(LON_idx, LAT_idx, [[mean(succprob.(hmm_fit.B[k, :, j, memory_past_cat])) for j in 1:length(STAID)] for k in 1:K], colorbar_show=true)
Expand Down Expand Up @@ -628,7 +628,7 @@ md"""
"""

md"""
Historical vs %$(Nb) simulations distribution
Historical vs $(Nb) simulations distribution
"""

begin
Expand Down

0 comments on commit de6780b

Please sign in to comment.