Now what would be really great is if Makie or Plots had a @curve
macro and some logic that determines a good scale for the axes like Wolfram Alpha does. Then I could just type this:
@curve(x^3 - 6x^2 + 4x + 12)
EDIT:
I think I could even get away with typing it like this:
@curve x^3 - 6x^2 + 4x + 12
EDIT #2:
Though the parsing might be too fragile without the parentheses. Note the difference between these two expressions:
julia> Meta.show_sexpr(:(@curve x^3 - 6x^2 + 4x + 12))
(:macrocall, Symbol("@curve"), :(#= REPL[30]:1 =#), (:call, :+, (:call, :-, (:call, :^, :x, 3), (:call, :*, 6, (:call, :^, :x, 2))), (:call, :*, 4, :x), 12))
julia> Meta.show_sexpr(:(@curve x^3 -6x^2 + 4x + 12))
(:macrocall, Symbol("@curve"), :(#= REPL[31]:1 =#), (:call, :^, :x, 3), (:call, :+, (:call, :*, -6, (:call, :^, :x, 2)), (:call, :*, 4, :x), 12))