Hi,
I’m trying to plot a few simple functions with Gadfly. I’m having trouble setting the ymin and ymax. I’m trying to follow the documentation example:
plot(f::Function, lower, upper, elements...; mapping...)
plot(f::Function, xmin, xmax, ymin, ymax, elements...; mapping...)
It plots fine when I’m using this format:
plot([A, B, C, D, E], -10, 10)
but that creates really high y values so my functions are squashed and aren’t very readable. I would like to limit the y scale too.
If I use this though:
plot([A, B, C, D, E], -10, 10, -10, 10)
I get this error:
LoadError: MethodError: no method matching plot(::Array{Function,1}, ::Int64, ::Int64, ::Int64, ::Int64)
Closest candidates are:
plot(!Matched::Function, ::Number, ::Number, ::Number, ::Number, !Matched::Union{Function, Gadfly.Element, Theme, Type}...; mapping...) ```
The whole block of code:
using Gadfly
A(x) = (1 - x)
B(x) = (1 / x)
C(x) = ((x -1) / x)
D(x) = (1 / (1 - x))
E(x) = (x / (x - 1))
p = plot([A, B, C, D, E], -10, 10, -10, 10)
draw(SVG("compositions.svg", 6inch, 6inch), p)