Julia plots: replacing true tick values with counterfactual ones

Viewed 188

Is there a way to overwrite/replace tick values in Julia's Plots package? For instance, consider a plot of function y=x where I want to (counterfactually) replace the xtick for x='1' to be displayed as x='100'.

Thank you in advance.

1 Answers

Here it is:


using Plots
pyplot()
plot(1:10, sin.(1:10), 
    xformatter = xi -> string(Char(xi+64)),
    yformatter = yi -> yi==0 ? "zero" : "not zero")

Plots.jl with custom ticks

Related