readme
This commit is contained in:
parent
31e5d07a45
commit
ccae6373be
11
README.md
11
README.md
@ -16,10 +16,15 @@ Please add wishlist items, bugs, or any other comments/questions to the issues l
|
|||||||
|
|
||||||
## Installation
|
## 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
|
```julia
|
||||||
Pkg.clone("https://github.com/tbreloff/Plots.jl.git")
|
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.add("Gadfly") # [optional]
|
||||||
Pkg.clone("https://github.com/tbreloff/Qwt.jl.git") # [optional] requires pyqt and pyqwt
|
Pkg.clone("https://github.com/tbreloff/Qwt.jl.git") # [optional] requires pyqt and pyqwt
|
||||||
Pkg.add("UnicodePlots") # [optional]
|
Pkg.add("UnicodePlots") # [optional]
|
||||||
@ -28,7 +33,7 @@ Pkg.add("UnicodePlots") # [optional]
|
|||||||
## Use
|
## Use
|
||||||
|
|
||||||
Load it in. The underlying plotting backends are not imported until `plotter()` is called (which happens
|
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.
|
Plots will try to figure out a good default backend for you automatically based on what backends are installed.
|
||||||
|
|
||||||
```julia
|
```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
|
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
|
```julia
|
||||||
y = rand(100,3)
|
y = rand(100,3)
|
||||||
|
|||||||
@ -13,7 +13,7 @@ try
|
|||||||
facts("Gadfly") do
|
facts("Gadfly") do
|
||||||
@fact plotter!(:gadfly) --> Plots.GadflyPackage()
|
@fact plotter!(:gadfly) --> Plots.GadflyPackage()
|
||||||
@fact plotter() --> 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))
|
# plot(x::AVec, y::AVec; kw...) # one line (will assert length(x) == length(y))
|
||||||
@ -43,7 +43,7 @@ try
|
|||||||
facts("Qwt") do
|
facts("Qwt") do
|
||||||
@fact plotter!(:qwt) --> Plots.QwtPackage()
|
@fact plotter!(:qwt) --> Plots.QwtPackage()
|
||||||
@fact plotter() --> 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)
|
# plot(y::AVec; kw...) # one line... x = 1:length(y)
|
||||||
@fact plot(1:10) --> not(nothing)
|
@fact plot(1:10) --> not(nothing)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user