Skip to content

Commit 81263a0

Browse files
authored
Merge pull request #173 from jverzani/plot
give up on plot([ex1, ex2], a , b) style; close #107
2 parents 1ecb231 + 9d58cf2 commit 81263a0

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/plot_recipes.jl

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@ plot(x^2 - 2x, 0, 4)
2222
```
2323
2424
25-
* `plot(exs::Vector{Sym}, a, b; kwargs...)` will plot the functions evaluating `exs` over [a,b]
26-
27-
Example:
28-
29-
```
30-
@vars x
31-
plot([sin(x), cos(x)], 0, 2pi)
32-
```
3325
3426
* `plot(ex1, ex2, a, b; kwargs...)` will plot the two expressions in a parametric plot over the interval `[a,b]`.
3527
@@ -83,6 +75,14 @@ vfieldplot(fx, fy)
8375
```
8476
8577
78+
* To plot two or more functions at once, the style `plot([ex1, ex2], a, b)` does not work. Rather, use
79+
`plot(ex1, a, b); plot!(ex2)`, as in:
80+
81+
```
82+
@vars x
83+
plot(sin(x), 0, 2pi)
84+
plot!(cos(x))
85+
```
8686
----
8787
8888
Some graphics provided by `SymPy` are available if `PyPlot` is installed.
@@ -127,7 +127,9 @@ using RecipesBase
127127
@recipe f{T<:Sym}(::Type{T}, v::T) = lambdify(v)
128128

129129
## for vectors of expressions
130-
@recipe f{S<:AbstractVector{Sym}}(::Type{S}, ss::S) = Function[lambdify(s) for s in ss]
130+
## This does not work. See: https://github.com/JuliaPlots/RecipesBase.jl/issues/19
131+
#@recipe f(ss::AbstractVector{Sym}) = lambdify.(ss)
132+
#@recipe function f{T<:Array{Sym,1}}(::Type{T}, ss::T) Function[lambdify(s) for s in ss] end
131133

132134
## A vector field plot can be visualized as an n × n collection of arrows
133135
## over the region xlims × ylims

0 commit comments

Comments
 (0)