fix ALL_ARGS; unicodeplots examples
@ -1,3 +1,19 @@
|
|||||||
|
# Examples for backend: unicodeplots
|
||||||
|
|
||||||
|
- Supported arguments: args, axis, color, kwargs, label, legend, linestyle, linetype, marker, markercolor, markersize, nbins, size, title, width, windowtitle, xlabel, ylabel, yrightlabel
|
||||||
|
- Supported values for axis: [:auto,:left]
|
||||||
|
- Supported values for linetype: [:none,:line,:step,:sticks,:scatter,:heatmap,:hexbin,:hist,:bar]
|
||||||
|
- Supported values for linestyle: [:auto,:solid]
|
||||||
|
- Supported values for marker: [:none,:auto,:ellipse]
|
||||||
|
- Is `subplot`/`subplot!` supported? Yes
|
||||||
|
|
||||||
|
### Initialize
|
||||||
|
|
||||||
|
```julia
|
||||||
|
using Plots
|
||||||
|
unicodeplots!()
|
||||||
|
```
|
||||||
|
|
||||||
### Lines
|
### Lines
|
||||||
|
|
||||||
A simple line plot of the 3 columns.
|
A simple line plot of the 3 columns.
|
||||||
@ -10,7 +26,7 @@ plot(rand(100,3))
|
|||||||
|
|
||||||
### Functions
|
### Functions
|
||||||
|
|
||||||
Plot multiple functions.
|
Plot multiple functions. You can also put the function first.
|
||||||
|
|
||||||
```julia
|
```julia
|
||||||
plot(0:0.01:4π,[sin,cos])
|
plot(0:0.01:4π,[sin,cos])
|
||||||
@ -30,7 +46,7 @@ plot([sin,cos],0,4π)
|
|||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
Or make a parametric plot with plot(fx, fy, umin, umax).
|
Or make a parametric plot (i.e. plot: (fx(u), fy(u))) with plot(fx, fy, umin, umax).
|
||||||
|
|
||||||
```julia
|
```julia
|
||||||
plot(sin,(x->begin # /Users/tom/.julia/v0.4/Plots/docs/example_generation.jl, line 33:
|
plot(sin,(x->begin # /Users/tom/.julia/v0.4/Plots/docs/example_generation.jl, line 33:
|
||||||
@ -54,7 +70,7 @@ plot(rand(10); title="TITLE",xlabel="XLABEL",ylabel="YLABEL",background_color=RG
|
|||||||
|
|
||||||
Use the `axis` or `axiss` arguments.
|
Use the `axis` or `axiss` arguments.
|
||||||
|
|
||||||
Note: This is only supported with Qwt right now
|
Note: Currently only supported with Qwt and PyPlot
|
||||||
|
|
||||||
```julia
|
```julia
|
||||||
plot(Vector[randn(100),randn(100) * 100]; axiss=[:left,:right],ylabel="LEFT",yrightlabel="RIGHT")
|
plot(Vector[randn(100),randn(100) * 100]; axiss=[:left,:right],ylabel="LEFT",yrightlabel="RIGHT")
|
||||||
@ -92,35 +108,38 @@ scatter!(rand(100); markersize=6,color=:blue)
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Lots of line types
|
### Suported line types
|
||||||
|
|
||||||
Options: (:line, :step, :stepinverted, :sticks, :scatter, :none, :heatmap, :hexbin, :hist, :bar)
|
All options: (:line, :orderedline, :step, :stepinverted, :sticks, :scatter, :none, :heatmap, :hexbin, :hist, :bar)
|
||||||
Note: some may not work with all backends
|
|
||||||
|
|
||||||
```julia
|
```julia
|
||||||
plot(rand(20,4); linetypes=[:line,:step,:sticks,:scatter],labels=["line","step","sticks","dots"])
|
types = intersect(supportedTypes(),[:line,:step,:stepinverted,:sticks,:scatter])
|
||||||
|
n = length(types)
|
||||||
|
x = Vector[sort(rand(20)) for i = 1:n]
|
||||||
|
y = rand(20,n)
|
||||||
|
plot(x,y; linetypes=types,labels=map(string,types))
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Lots of line styles
|
### Supported line styles
|
||||||
|
|
||||||
Options: (:solid, :dash, :dot, :dashdot, :dashdotdot)
|
All options: (:solid, :dash, :dot, :dashdot, :dashdotdot)
|
||||||
Note: some may not work with all backends
|
|
||||||
|
|
||||||
```julia
|
```julia
|
||||||
plot(rand(20,5); linestyles=[:solid,:dash,:dot,:dashdot,:dashdotdot],labels=["solid","dash","dot","dashdot","dashdotdot"])
|
styles = setdiff(supportedStyles(),[:auto])
|
||||||
|
plot(rand(20,length(styles)); linestyle=:auto,labels=map(string,styles))
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Lots of marker types
|
### Supported marker types
|
||||||
|
|
||||||
Options: (:none, :ellipse, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star1, :star2, :hexagon)
|
All options: (:none, :auto, :ellipse, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star1, :star2, :hexagon)
|
||||||
Note: some may not work with all backends
|
|
||||||
|
|
||||||
```julia
|
```julia
|
||||||
plot(repmat(collect(1:10)',10,1); markers=[:ellipse,:rect,:diamond,:utriangle,:dtriangle,:cross,:xcross,:star1,:star2,:hexagon],labels=["ellipse","rect","diamond","utriangle","dtriangle","cross","xcross","star1","star2","hexagon"],markersize=10)
|
markers = setdiff(supportedMarkers(),[:none,:auto])
|
||||||
|
plot([fill(i,10) for i = 1:length(markers)]; marker=:auto,labels=map(string,markers),markersize=10)
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
|
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
@ -6,7 +6,7 @@ immutable GadflyPackage <: PlottingPackage end
|
|||||||
gadfly!() = plotter!(:gadfly)
|
gadfly!() = plotter!(:gadfly)
|
||||||
|
|
||||||
|
|
||||||
supportedArgs(::GadflyPackage) = setdiff(ALL_ARGS, [:heatmap_c, :fillto, :pos])
|
supportedArgs(::GadflyPackage) = setdiff(ARGS, [:heatmap_c, :fillto, :pos])
|
||||||
supportedAxes(::GadflyPackage) = setdiff(ALL_AXES, [:right])
|
supportedAxes(::GadflyPackage) = setdiff(ALL_AXES, [:right])
|
||||||
supportedTypes(::GadflyPackage) = setdiff(TYPES, [:stepinverted])
|
supportedTypes(::GadflyPackage) = setdiff(TYPES, [:stepinverted])
|
||||||
supportedStyles(::GadflyPackage) = [:auto, :solid]
|
supportedStyles(::GadflyPackage) = [:auto, :solid]
|
||||||
|
|||||||
@ -7,7 +7,7 @@ pyplot!() = plotter!(:pyplot)
|
|||||||
|
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
|
|
||||||
supportedArgs(::PyPlotPackage) = setdiff(ALL_ARGS, [:reg, :heatmap_c, :fillto, :pos])
|
supportedArgs(::PyPlotPackage) = setdiff(ARGS, [:reg, :heatmap_c, :fillto, :pos])
|
||||||
# supportedAxes(::PyPlotPackage) = [:left]
|
# supportedAxes(::PyPlotPackage) = [:left]
|
||||||
# supportedTypes(::PyPlotPackage) = setdiff(TYPES, [:stepinverted])
|
# supportedTypes(::PyPlotPackage) = setdiff(TYPES, [:stepinverted])
|
||||||
supportedStyles(::PyPlotPackage) = setdiff(ALL_STYLES, [:dashdotdot])
|
supportedStyles(::PyPlotPackage) = setdiff(ALL_STYLES, [:dashdotdot])
|
||||||
|
|||||||
@ -7,7 +7,7 @@ unicodeplots!() = plotter!(:unicodeplots)
|
|||||||
|
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
|
|
||||||
supportedArgs(::UnicodePlotsPackage) = setdiff(ALL_ARGS, [:reg, :heatmap_c, :fillto, :pos])
|
supportedArgs(::UnicodePlotsPackage) = setdiff(ARGS, [:reg, :heatmap_c, :fillto, :pos])
|
||||||
supportedAxes(::UnicodePlotsPackage) = [:auto, :left]
|
supportedAxes(::UnicodePlotsPackage) = [:auto, :left]
|
||||||
supportedTypes(::UnicodePlotsPackage) = setdiff(ALL_TYPES, [:stepinverted])
|
supportedTypes(::UnicodePlotsPackage) = setdiff(ALL_TYPES, [:stepinverted])
|
||||||
supportedStyles(::UnicodePlotsPackage) = [:auto, :solid]
|
supportedStyles(::UnicodePlotsPackage) = [:auto, :solid]
|
||||||
|
|||||||