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/Plots.jl.git")
|
||||||
Pkg.clone("https://github.com/tbreloff/Qwt.jl.git") # [optional] requires pyqt and pyqwt
|
|
||||||
Pkg.add("Gadfly") # [optional]
|
Pkg.add("Gadfly") # [optional]
|
||||||
|
Pkg.clone("https://github.com/tbreloff/Qwt.jl.git") # [optional] requires pyqt and pyqwt
|
||||||
```
|
```
|
||||||
|
|
||||||
## 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`). 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
|
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:
|
Do a plot in Gadfly, then save a png:
|
||||||
|
|
||||||
```
|
```
|
||||||
plotter!(:gadfly) # switches the backend to Gadfly
|
|
||||||
plot(rand(10,2); marker = :rect)
|
plot(rand(10,2); marker = :rect)
|
||||||
savepng(Plots.IMG_DIR * "gadfly1.png")
|
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)
|
## plot and plotter! interface (WIP)
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,8 @@ type CurrentPackage
|
|||||||
sym::Symbol
|
sym::Symbol
|
||||||
pkg::PlottingPackage
|
pkg::PlottingPackage
|
||||||
end
|
end
|
||||||
const CURRENT_PACKAGE = CurrentPackage(:qwt, QwtPackage())
|
# const CURRENT_PACKAGE = CurrentPackage(:qwt, QwtPackage())
|
||||||
|
const CURRENT_PACKAGE = CurrentPackage(:gadfly, GadflyPackage())
|
||||||
|
|
||||||
|
|
||||||
doc"""
|
doc"""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user