Plotting

All plotting functions accept a Vector{DataSeries} and an output directory. Each function saves the figure as both PDF and PNG.


Convenience wrapper

ViscoAnalysis.plot_allFunction
plot_all(series, outdir; Tref=10.0, ind_freq=1)

Convenience wrapper that runs every diagnostic plot in sequence. Does not run the model identification; call fit2S2P1D separately and pass the results to plot_model_fit.

Plots produced (one file per sheet unless noted):

  • Isothermal curves
  • Isochrone curves
  • Cole-Cole diagram
  • Black diagram
  • Kramers-Kronig verification
  • WLF shift factors
  • WLF stability
source

Individual plot functions

ViscoAnalysis.plot_isothermesFunction
plot_isothermes(series, outdir)

Isothermal curves: |E*| and φ vs frequency f [Hz], one curve per temperature. Saves isothermes_<sheetname>.pdf/.png in outdir.

source
ViscoAnalysis.plot_isochronesFunction
plot_isochrones(series, outdir)

Isochrone curves: |E*| and φ vs temperature T [°C], one curve per frequency. Saves isochrones_<sheetname>.pdf/.png in outdir.

source
ViscoAnalysis.plot_cole_coleFunction
plot_cole_cole(series, outdir)

Cole-Cole diagram: E₂ (imaginary) vs E₁ (real) on log-log axes, one scatter series per temperature. Saves Cole-Cole_<sheetname>.pdf/.png in outdir.

source
ViscoAnalysis.plot_blackFunction
plot_black(series, outdir)

Black diagram: |E*| vs φ on a semi-log axis, one scatter series per temperature. Saves Black_<sheetname>.pdf/.png in outdir.

source
ViscoAnalysis.plot_kramers_kronigFunction
plot_kramers_kronig(series, outdir)

Kramers-Kronig (BT2) verification: d log|E*|/d logω vs δ/90. A perfect material follows the identity line y = x. Saves Kramers-Kronig_<sheetname>.pdf/.png in outdir.

source
ViscoAnalysis.plot_wlfFunction
plot_wlf(series, outdir)

Shift factors log(aT) vs T with WLF curve, iterated over all reference temperatures. Saves WLF_<sheetname>.pdf/.png in outdir.

source
ViscoAnalysis.plot_wlf_stabilityFunction
plot_wlf_stability(series, outdir)

WLF stability plot: shift factors and WLF curves for all reference temperatures (tested values and intermediate midpoints), showing robustness of the WLF fit. Saves WLF_stability_<sheetname>.pdf/.png in outdir.

source
ViscoAnalysis.plot_model_fitFunction
plot_model_fit(series, fit_results, outdir; Tref=10.0, ind_freq=1)

Master curve with model overlay: |E*| and φ vs reduced angular frequency ωaT. Works with any AbstractFitResult (2S2P1D, 1S2P1D, Huet-Sayegh, …). Saves Results_<model>_Tref<T>.pdf/.png in outdir.

Arguments

  • series — Vector of DataSeries.
  • fit_results — Vector of AbstractFitResult, one per series entry.
  • outdir — Output directory.
  • Tref — Reference temperature used when building the master curves.
source

Output file naming

FunctionOutput filename
plot_isothermesisothermes_<sheetname>.pdf / .png
plot_isochronesisochrones_<sheetname>.pdf / .png
plot_cole_coleCole-Cole_<sheetname>.pdf / .png
plot_blackBlack_<sheetname>.pdf / .png
plot_kramers_kronigKramers-Kronig_<sheetname>.pdf / .png
plot_wlfWLF_<sheetname>.pdf / .png
plot_wlf_stabilityWLF_stability_<sheetname>.pdf / .png
plot_model_fitResults_<modelname>_Tref<T>.pdf / .png

Plot descriptions

Isothermal curves

plot_isothermes shows |E*| and φ as a function of frequency, with one curve per temperature. Temperatures are colour-coded from cold (blue) to hot (red).

Isochrone curves

plot_isochrones shows |E*| and φ as a function of temperature, with one curve per frequency.

Cole-Cole diagram

plot_cole_cole plots the loss modulus $E_2$ (imaginary part) against the storage modulus $E_1$ (real part) on a log-log scale. For a thermorheologically simple material, all temperature curves collapse onto a single arc.

Black diagram

plot_black plots |E*| (log scale) against φ (linear scale). Like the Cole-Cole diagram, a unique curve indicates thermorheological simplicity.

Kramers-Kronig verification

plot_kramers_kronig displays the BT2 approximation check: $d\log|E^*|/d\log\omega$ vs $\varphi/90°$. Points should fall near the $y = x$ line for consistent viscoelastic data.

WLF shift factors

plot_wlf displays the computed shift factors $\log_{10}(a_T)$ against temperature together with the fitted WLF curve, for each reference temperature in d.list_temp.

WLF stability

plot_wlf_stability overlays the WLF curves computed for all tested reference temperatures (solid lines) and intermediate midpoints (dashed lines) to assess the stability of the WLF identification.

Model overlay

plot_model_fit shows the experimental master curve (symbols) and the fitted model (lines) on two panels: |E*| and φ vs reduced angular frequency $\omega a_T$.


Usage examples

Generate all plots at once

using ViscoAnalysis

series = load_data("data.xlsx"; MPa=true)
mkpath("figures/")
plot_all(series, "figures/"; Tref=10.0)

Plot individual diagnostics

plot_isothermes(series, "figures/")
plot_cole_cole(series,  "figures/")
plot_black(series,      "figures/")
plot_wlf(series,        "figures/")

Overlay a fitted model

r = fit2S2P1D(series[1], 10.0)
plot_model_fit(series, [r], "figures/"; Tref=10.0)

Plot multiple models on the same data sheet

d = series[1]
r1 = fit2S2P1D(d, 10.0)
r2 = fitHS(d, 10.0)

# Each call creates a separate file, named after the model
plot_model_fit([d], [r1], "figures/"; Tref=10.0)
plot_model_fit([d], [r2], "figures/"; Tref=10.0)