readme
This commit is contained in:
parent
c7d76a1f27
commit
3d3c50b2f5
30
README.md
30
README.md
@ -17,36 +17,23 @@ First, clone the package, and get any plotting packages you need:
|
||||
|
||||
```
|
||||
Pkg.clone("https://github.com/tbreloff/Plots.jl.git")
|
||||
Pkg.clone("https://github.com/tbreloff/Qwt.jl.git") # [optional] requires pyqt and pyqwt
|
||||
Pkg.add("Gadfly") # [optional]
|
||||
Pkg.clone("https://github.com/tbreloff/Qwt.jl.git") # [optional] requires pyqt and pyqwt
|
||||
```
|
||||
|
||||
## 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`.
|
||||
For now, the default backend is Qwt.
|
||||
For now, the default backend is Gadfly.
|
||||
|
||||
```
|
||||
using Plots
|
||||
```
|
||||
|
||||
Do a plot in Qwt, then save a png:
|
||||
|
||||
```
|
||||
plot(rand(10,2); marker = :rect)
|
||||
savepng(Plots.IMG_DIR * "qwt1.png")
|
||||
```
|
||||
|
||||
which saves:
|
||||
|
||||

|
||||
|
||||
|
||||
Do a plot in Gadfly, then save a png:
|
||||
|
||||
```
|
||||
plotter!(:gadfly) # switches the backend to Gadfly
|
||||
plot(rand(10,2); marker = :rect)
|
||||
savepng(Plots.IMG_DIR * "gadfly1.png")
|
||||
```
|
||||
@ -56,6 +43,19 @@ which saves:
|
||||

|
||||
|
||||
|
||||
Do a plot in Qwt, then save a png:
|
||||
|
||||
```
|
||||
plotter!(:qwt) # switches the backend to Qwt
|
||||
plot(rand(10,2); marker = :rect)
|
||||
savepng(Plots.IMG_DIR * "qwt1.png")
|
||||
```
|
||||
|
||||
which saves:
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
## plot and plotter! interface (WIP)
|
||||
|
||||
|
||||
@ -14,7 +14,8 @@ type CurrentPackage
|
||||
sym::Symbol
|
||||
pkg::PlottingPackage
|
||||
end
|
||||
const CURRENT_PACKAGE = CurrentPackage(:qwt, QwtPackage())
|
||||
# const CURRENT_PACKAGE = CurrentPackage(:qwt, QwtPackage())
|
||||
const CURRENT_PACKAGE = CurrentPackage(:gadfly, GadflyPackage())
|
||||
|
||||
|
||||
doc"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user