This commit is contained in:
Thomas Breloff 2015-09-12 22:31:05 -04:00
parent 31e5d07a45
commit ccae6373be
2 changed files with 10 additions and 5 deletions

View File

@ -16,10 +16,15 @@ Please add wishlist items, bugs, or any other comments/questions to the issues l
## Installation
First, clone the package, and get any plotting packages you need (obviously, you should get at least one backend):
First, clone the package
```julia
Pkg.clone("https://github.com/tbreloff/Plots.jl.git")
```
then get any plotting packages you need (obviously, you should get at least one backend):
```julia
Pkg.add("Gadfly") # [optional]
Pkg.clone("https://github.com/tbreloff/Qwt.jl.git") # [optional] requires pyqt and pyqwt
Pkg.add("UnicodePlots") # [optional]
@ -28,7 +33,7 @@ Pkg.add("UnicodePlots") # [optional]
## Use
Load it in. The underlying plotting backends are not imported until `plotter()` is called (which happens
on your first call to `plot`). This means that you don't need any backends to be installed when you call `using Plots`.
on your first call to `plot` or `subplot`). This means that you don't need any backends to be installed when you call `using Plots`.
Plots will try to figure out a good default backend for you automatically based on what backends are installed.
```julia
@ -94,7 +99,7 @@ Here are some various args to supply, and the implicit mapping (AVec == Abstract
plot(df::DataFrame, columns; kw...) # one line per column, but on a subset of column names
```
[TODO] You can swap out `plot` for `subplot`. Each line will go into a separate plot. Use the layout keyword:
With `subplot`, create multiple plots at once, with flexible layout options:
```julia
y = rand(100,3)

View File

@ -13,7 +13,7 @@ try
facts("Gadfly") do
@fact plotter!(:gadfly) --> Plots.GadflyPackage()
@fact plotter() --> Plots.GadflyPackage()
@fact typeof(plot(1:10)) --> Plot
@fact typeof(plot(1:10)) --> Plots.Plot
# plot(x::AVec, y::AVec; kw...) # one line (will assert length(x) == length(y))
@ -43,7 +43,7 @@ try
facts("Qwt") do
@fact plotter!(:qwt) --> Plots.QwtPackage()
@fact plotter() --> Plots.QwtPackage()
@fact typeof(plot(1:10)) --> Plot
@fact typeof(plot(1:10)) --> Plots.Plot
# plot(y::AVec; kw...) # one line... x = 1:length(y)
@fact plot(1:10) --> not(nothing)