Compare commits

...

461 Commits

Author SHA1 Message Date
Thomas Breloff fd4dd13270 added svg in pyplot; deprecate qwt; writemime backup for html 2016-03-09 13:36:21 -05:00
Thomas Breloff ded9f332f6 plotlyjs fix 2016-03-09 11:13:31 -05:00
Thomas Breloff d09ca46141 plotlyjs fix 2016-03-09 10:59:33 -05:00
Thomas Breloff b28cd7f8bd plotlyjs fix 2016-03-09 10:23:14 -05:00
Tom Breloff a4054aa500 Merge pull request #159 from jheinen/dev
Fixed some TODOs (Issue $108)
2016-03-09 09:40:06 -05:00
Josef Heinen 3332bfcee1 Fixed some TODOs (Issue $108)
- support the grid keyword
- support handling of NaN (gaps in line segments)
- support xlims/ylims
- removed gr_state macro

The GR.savestate / GR.restorestate problem (caused by exceptions) will be solved
in GR - probably by something like GR.rewind() => to unwind the attribute stack.
2016-03-09 10:34:19 +01:00
Thomas Breloff cc798a0c0a working on plotlyjs 2016-03-09 00:16:16 -05:00
Thomas Breloff fe2030b7e3 working on plotlyjs 2016-03-08 17:52:39 -05:00
Thomas Breloff ed1cce86ef ijulia, plotly, and gr display fixes 2016-03-08 15:07:51 -05:00
Thomas Breloff 9a544b0ff3 warn about Bokeh; 3D parametric plots 2016-03-08 14:18:39 -05:00
Thomas Breloff 82f7b29836 aliases 2016-03-08 13:21:54 -05:00
Thomas Breloff 076acfb242 allow one-sided limits for pyplot 2016-03-07 21:58:01 -05:00
Thomas Breloff ed336bc0ff cleaned up magic args; fixed alphas 2016-03-07 21:38:31 -05:00
Thomas Breloff 5699446d69 winston warning 2016-03-07 20:36:19 -05:00
Thomas Breloff a43d32949e better handling of 3d matrix input 2016-03-07 16:49:13 -05:00
Thomas Breloff 02a1e648bc added gr test; refactored pyplot figure generation, added overwrite_figure arg, closes #144 2016-03-07 15:17:29 -05:00
Thomas Breloff 9d3e0651e2 GR fix handling of Shape; PyPlot marker colors fix (hack), closes #145 2016-03-07 12:57:46 -05:00
Thomas Breloff cdff5a9039 gr_state macro 2016-03-07 12:17:33 -05:00
Tom Breloff ba0b5500ca Merge pull request #149 from jheinen/dev
merging GR updates
2016-03-07 11:21:09 -05:00
Josef Heinen 1439a7e289 Added support for pie charts 2016-03-07 16:36:26 +01:00
Josef Heinen 9761ede5c4 Removed support for hline, vline markers
(not yet implemented)
2016-03-07 16:36:26 +01:00
Josef Heinen e342805752 Added missing marker shapes 2016-03-07 16:36:26 +01:00
Josef Heinen d08672aa71 Improved grid plotting logic 2016-03-07 16:36:26 +01:00
Josef Heinen a3d4e05b0e Improved background color handling 2016-03-07 16:36:26 +01:00
Josef Heinen 51eeed3d50 Improved subplot layout 2016-03-07 16:36:26 +01:00
Josef Heinen 51c45456c3 Disable alpha channel when converting PNGs 2016-03-07 16:36:26 +01:00
Josef Heinen 074ba63bf5 Fill workstation background instead of viewport 2016-03-07 16:36:25 +01:00
Josef Heinen f3d552d8a0 Temporary workaround for multiple mime output 2016-03-07 16:36:25 +01:00
Josef Heinen c5fb4a9228 Added some sanity checks 2016-03-07 16:36:25 +01:00
Josef Heinen 55d7e910e4 Added workaround for multiple mime output 2016-03-07 16:36:25 +01:00
Josef Heinen ea29af8d3d Removed 'private' keyword argument :scale 2016-03-07 16:36:25 +01:00
Thomas Breloff 88b9d71bd7 fixed default PyPlot gradient 2016-03-07 09:55:05 -05:00
Thomas Breloff 165c84c246 pyplot minmax fix; convertToAnyVector fix 2016-03-04 12:46:33 -05:00
Thomas Breloff 347820867d pyplot lim fixes 2016-03-03 21:43:08 -05:00
Thomas Breloff 26d0dfbf3d Merge branch 'dev' of github.com:tbreloff/Plots.jl into dev 2016-03-03 16:06:03 -05:00
Thomas Breloff 6aa4849266 pyplot lims udpate fix 2016-03-03 16:05:27 -05:00
Thomas Breloff 335b3802b8 added FixedSizeArrays requirement 2016-03-02 22:48:27 -05:00
Thomas Breloff 73bd3fa60c curves 2016-02-22 22:53:31 -05:00
Thomas Breloff 6b61c5900c generalize curves 2016-02-22 10:39:03 -05:00
Thomas Breloff 9da4083096 directed_curve 2016-02-20 20:57:56 -05:00
Thomas Breloff 86fe244d95 revert pyplot changes 2016-02-19 21:59:43 -05:00
Thomas Breloff 732f2846de directed_curve; working on PyPlot fixes 2016-02-19 18:24:56 -05:00
Thomas Breloff 4f238caf5c added annotation options 2016-02-18 22:59:31 -05:00
Thomas Breloff c9388e9f56 bezier curves 2016-02-18 18:28:59 -05:00
Thomas Breloff 2a9fa9539f fixes to logic accepting arrays of values; additional fixes in gadfly and pyplot for this 2016-02-17 10:32:12 -05:00
Thomas Breloff b8d136588c gif macro and every/when syntax 2016-02-16 18:02:04 -05:00
Thomas Breloff 92c9e82dee fix refdir 2016-02-16 16:45:46 -05:00
Thomas Breloff 0fdb48bda3 fixes for ticks 2016-02-16 16:22:54 -05:00
Thomas Breloff e8d4fd7aac skip pyplot test 4 2016-02-12 15:41:00 -05:00
Thomas Breloff 6a4a78a26a skip pyplot test 13 2016-02-12 15:17:31 -05:00
Thomas Breloff 6c6769ca98 handle vector of PlotText as annotations 2016-02-10 13:09:22 -05:00
Thomas Breloff 3e49af9093 allow Function for fillrange and zcolor; fix fill kw 2016-02-09 19:22:05 -05:00
Thomas Breloff 5f8ecfa3fa deprecated plotter.jl 2016-02-08 14:24:25 -05:00
Thomas Breloff aca03d2609 replaced dataframes() with require block 2016-02-08 14:23:02 -05:00
Thomas Breloff 5db9493d2b added dependency on Requires; added support for plotting tuples/FixedSizeArrays; added animate macro; legend ignores empty labels in gadfly/pyplot 2016-02-08 13:42:23 -05:00
Thomas Breloff ac3c041d6d split plotly into 2 different backends: plotly and plotlyjs 2016-02-05 15:44:27 -05:00
Thomas Breloff a319c0c94a legend and colorbar overhaul 2016-02-05 15:10:12 -05:00
Thomas Breloff f74d619748 pgfplots supported 2016-02-04 16:05:21 -05:00
Thomas Breloff eef1981f20 travis 2016-02-04 14:20:34 -05:00
Thomas Breloff ade9d86696 deprecated a bunch of images and docs-related stuff; cleaned up travis, imgcomp, and runtests 2016-02-04 14:00:19 -05:00
Thomas Breloff 935c1cfeab readme 2016-02-04 13:01:06 -05:00
Thomas Breloff 5706770a11 readme 2016-02-04 13:00:12 -05:00
Thomas Breloff 2643417c0b readme 2016-02-04 12:59:40 -05:00
Thomas Breloff d388036601 major overhaul to backend definition and initialization; added pgfplots template; some new reference images 2016-02-04 12:29:56 -05:00
Tom Breloff 96df75cc05 Merge pull request #132 from spencerlyon2/dev
fix change in checking if plotly_blink window is active
2016-02-03 14:32:32 -05:00
Spencer Lyon c62d8d6753 fix change in checking if plotly_blink window is active 2016-02-03 14:21:43 -05:00
Tom Breloff 1562c96d4c Merge pull request #130 from joshday/dev
Add plot!(f::Function) method
2016-02-03 13:30:47 -05:00
Josh Day 94c87d436f Update plot.jl 2016-02-03 12:47:48 -05:00
Tom Breloff b9c8ffb5cf Merge pull request #127 from spencerlyon2/sl/plotly-blink
Sl/plotly blink
2016-02-03 10:08:57 -05:00
Spencer Lyon a37a23bcfc PlotlyJS blink backend working 2016-02-03 09:58:04 -05:00
Spencer Lyon 863ad22b48 added writemime methods for plotly_blink 2016-02-03 09:58:04 -05:00
Tom Breloff bce865ff9f Merge pull request #126 from pkofod/dev
Add abline! which creates a straight line according to the formula b+…
2016-02-03 08:55:46 -05:00
Patrick Kofod Mogensen 1963fe208e Added an extrema(plt) which return the tuple (xmin, xmax), and changed abline! to use extrema. 2016-02-03 10:39:32 +01:00
Patrick Kofod Mogensen 5c4526725b Remove trailing spaces. 2016-02-03 10:32:58 +01:00
Patrick Kofod Mogensen 3f42e9c5bd Add abline! which creates a straight line according to the formula b+a*x, and export abline!
Also add utility functions xmin(plt::Plot) and xmax(plt::Plot).
2016-02-02 23:16:02 +01:00
Thomas Breloff b1c9d0a0af gadfly hist in legend 2016-02-02 10:49:33 -05:00
Thomas Breloff adcbfb4b9e Merge branch 'master' into dev 2016-02-01 13:45:55 -05:00
Thomas Breloff b3ebccab36 gradient fixes 2016-01-30 10:03:19 -05:00
Thomas Breloff d5797054fb ColorGradient fixes; allow default keywords in backend calls 2016-01-29 17:21:25 -05:00
Tom Breloff aab0ec22b9 Merge pull request #120 from Evizero/master
fix unicodeplots compat
2016-01-28 20:25:12 -05:00
Christof Stocker f7babcc1d2 fix unicodeplots compat 2016-01-29 02:06:22 +01:00
Tom Breloff d077307721 Merge pull request #117 from jheinen/dev
Improved GR framework support
2016-01-28 14:04:55 -05:00
Josef Heinen 72e8e10bd6 Improved graphics state handling 2016-01-28 18:26:56 +01:00
Josef Heinen 5ea9e8a0d7 Added support for OHLC charts 2016-01-28 13:44:40 +01:00
Josef Heinen 87b050fad2 Added path3d and scatter3d functions 2016-01-27 16:26:57 +01:00
Josef Heinen 0c8cd74e28 Improved surface output 2016-01-26 20:49:10 +01:00
Josef Heinen 445d970784 Added color bars and surface plots 2016-01-26 17:33:13 +01:00
Josef Heinen 125a1eb9fc Added support for subplots and further linetypes:
- heatmaps
- contour plots
2016-01-25 17:43:13 +01:00
Josef Heinen a2a578d04d Improved representation of legends 2016-01-24 10:47:32 +01:00
Josef Heinen 11e5c0aa9d Use SVG output for inline graphics (IJulia) 2016-01-22 13:00:30 +01:00
Josef Heinen 14b856b0cf Added support for two y-axis scales 2016-01-18 17:25:59 +01:00
Josef Heinen 2e8dd73822 Added more line plots 2016-01-16 15:20:16 +01:00
Josef Heinen da9fdb356c Added support for bar plots 2016-01-16 13:53:22 +01:00
Josef Heinen 054a99ca38 Added horizontal/vertical linetype 2016-01-16 13:23:23 +01:00
Josef Heinen baf33609af Allow combination of lines and markers 2016-01-14 15:50:48 +01:00
Josef Heinen b4eb0b6b41 Added histogram output 2016-01-12 16:33:07 +01:00
Josef Heinen 3e9a47a683 Changed default colormap 2016-01-11 18:16:31 +01:00
Josef Heinen d71c3ecd86 Added support for multiple marker colors / sizes 2016-01-10 19:06:47 +01:00
Josef Heinen e5a864a760 Implemented filled backgrounds 2016-01-09 14:05:02 +01:00
Josef Heinen 81b59f9bc9 Implemented annotations 2016-01-08 17:08:34 +01:00
Josef Heinen 2c2a36ce34 Use Plots predefined colors 2016-01-08 11:56:20 +01:00
Josef Heinen cb0020c629 Fixed problem with uninitialized strings 2016-01-07 14:28:08 +01:00
Josef Heinen 003d39c8cd Added support for inline graphics (IJulia) 2016-01-07 11:37:04 +01:00
Josef Heinen ca866183f1 Print TODO messages for missing features 2016-01-06 10:11:30 +01:00
Thomas Breloff b6e627369b backend priority 2016-01-03 09:53:33 -05:00
Thomas Breloff da96cfc158 Merge remote-tracking branch 'origin/master' into dev 2016-01-03 09:40:05 -05:00
Tom Breloff 0abbd53e07 Merge pull request #107 from jheinen/dev
Initial support for GR framework (GR.jl)
2016-01-03 09:35:40 -05:00
Tom Breloff 6fc0f858c7 Merge pull request #106 from rcnlee/master
Minor changes - animations and AbstractDataFrame
2016-01-03 09:35:24 -05:00
Josef Heinen b3613b68cd Moved GR calls into display method 2016-01-03 11:54:24 +01:00
Josef Heinen 2b6619b3c4 Avoid global 'fig' object 2016-01-03 10:32:47 +01:00
Josef Heinen a33161aa9c Reset default backend to PyPlot
GR should NOT be the default backend until it is finished :-)
2016-01-02 12:15:07 +01:00
Ritchie Lee 5c3c5b999f Support for SubDataFrame by switching to AbstractDataFrame 2016-01-02 02:06:51 -08:00
Josef Heinen 7acca18313 remove superfluous compat macros 2016-01-02 10:40:45 +01:00
Ritchie Lee 7b71d9a448 Small API change to animations
Animation constructor minor fix
2016-01-02 01:36:36 -08:00
Josef Heinen 64ffa3e70f Merge remote-tracking branch 'upstream/master' 2016-01-01 19:53:34 +01:00
Josef Heinen fd88972380 Added support for legends 2016-01-01 19:33:35 +01:00
Tom Breloff dd7b09552a Merge pull request #101 from tbreloff/dev
merging dev into master
2015-12-30 12:58:01 -05:00
Thomas Breloff 0b23aa9e7e relax tests 2015-12-30 12:36:18 -05:00
Thomas Breloff 0caa31bd6b fixes 2015-12-30 12:02:43 -05:00
Thomas Breloff cafac135a0 PyPlot fixes; test fixes 2015-12-30 11:24:44 -05:00
Thomas Breloff 6ac312bd49 removed nlevels keyword, now an alias to levels; cleanup 2015-12-30 10:13:53 -05:00
Tom Breloff 489877d6bf Merge pull request #99 from dlfivefifty/pull-request/c09545de
Add support for levels keyword in PyPlot
2015-12-30 09:38:27 -05:00
Josef Heinen b0b2e695e1 Added support for logarithmic / flipped axes 2015-12-30 11:52:19 +01:00
Josef Heinen c3808c0c5b gr.jl: implemented line/scatter plots 2015-12-29 20:15:10 +01:00
Sheehan Olver c09545de64 Add support for levels keyword in PyPlot 2015-12-29 15:32:49 +11:00
Josef Heinen 7566b0159c Start experimenting with GR.jl backend 2015-12-25 20:11:05 +01:00
Thomas Breloff ed7cc9b89e pyplot surface/wireframe fix for matrix x/y; fix in with, when backend unset 2015-12-23 22:15:13 -05:00
Thomas Breloff 55501e68fb added tex output; fixes for surface inputs; commented out plotly_blink 2015-12-23 13:03:25 -05:00
Thomas Breloff eabe670ae8 working on plotlyjs integration 2015-12-18 17:33:57 -05:00
Thomas Breloff 9fffef6f53 cleanup 2015-12-18 13:19:22 -05:00
Thomas Breloff 368429b757 working on glvisualize 2015-12-18 10:14:15 -05:00
Tom Breloff 49f774eb0d Merge pull request #92 from dlfivefifty/dev
Add initial support for GLVisualize
2015-12-18 09:29:58 -05:00
Sheehan Olver 0487d7a058 merge glvisualize 2015-12-18 15:32:35 +11:00
Sheehan Olver 5943e77563 Fix backend_name 2015-12-18 15:30:07 +11:00
Sheehan Olver b10f0fb945 Started supporting GLVisualize 2015-12-18 15:30:07 +11:00
Sheehan Olver c299891fb0 Merge pull request #1 from tbreloff/dev
Dev
2015-12-18 15:27:35 +11:00
Thomas Breloff fe0f22dfc0 changed :log to map to :log10, switched :log to :ln; better support for plotly axis attributes, ticks, scale, etc; fix plotly bg/fg colors 2015-12-17 14:59:50 -05:00
Thomas Breloff 002603c388 added wireframe linetype; support for surface and wireframe in pyplot 2015-12-17 11:55:26 -05:00
Thomas Breloff 30ef8456c3 added xlims/ylims support in plotly 2015-12-17 00:14:38 -05:00
Thomas Breloff bee1ce401a moved annotation arg from series to plot; added annotation support for plotly 2015-12-16 23:22:46 -05:00
Thomas Breloff e18c4a370a added vline/hline marker shapes; plotly set/get, ticks 2015-12-16 11:14:06 -05:00
Thomas Breloff 2a60a929f1 recipe fix; plotly fixes 2015-12-15 22:53:57 -05:00
Thomas Breloff 939295ab04 _apply_recipe fix 2015-12-15 17:31:11 -05:00
Tom Breloff f6a0ef6a61 Merge pull request #90 from pkofod/patch-1
Added :line as to supportedTypes
2015-12-15 09:28:45 -05:00
Patrick Kofod Mogensen b3bce314e9 Added :line as to supportedTypes 2015-12-15 14:26:17 +01:00
Thomas Breloff e28b85d8b6 plotly support for ijulia and subplots 2015-12-08 12:01:26 -05:00
Thomas Breloff a0af2fc997 fix. closes #84 2015-12-07 23:14:10 -05:00
Tom Breloff 7f7f5c6f12 Merge pull request #85 from stevengj/patch-1
don't test for 0.4-
2015-11-28 20:13:06 -05:00
Steven G. Johnson d21fbfc9be don't test for 0.4-
Testing version > 0.4- is wrong because it incorrectly implies that all pre-releases of 0.4 work.  Either test for the specific 0.4 build you need, or test for `VERSION > v"0.4"` (i.e., the release version).

However, since you REQUIRE julia 0.4 anyway, you can omit this test entirely.
2015-11-25 17:00:57 -05:00
Thomas Breloff 366dc1cca9 travis 2015-11-24 17:43:18 -05:00
Thomas Breloff e9e3913bb7 switch tests to use ExamplePlots and VisualRegressionTests 2015-11-24 17:08:15 -05:00
Thomas Breloff 5491f6eff7 issubplot in _apply_recipe 2015-11-24 13:56:20 -05:00
Thomas Breloff 32e36ba324 added 3d example 2015-11-24 13:05:07 -05:00
Thomas Breloff 9d4c456461 plotly 3d path/scatter, surface 2015-11-24 12:39:54 -05:00
Thomas Breloff cdc7920dff added _apply_recipe 2015-11-24 10:45:49 -05:00
Thomas Breloff cdb4901d91 plotly fill, nbins, density; ref img 2015-11-23 23:05:24 -05:00
Thomas Breloff c7f3520ea8 plotly linestyle/markershape and others 2015-11-23 22:20:04 -05:00
Thomas Breloff f0e728c316 working on plotly; added contour and pie examples 2015-11-23 17:46:30 -05:00
Thomas Breloff 4b1f127eaf surface arg is now z; added orientation arg; working on plotly 2015-11-22 22:34:30 -05:00
Thomas Breloff 1db2d8d8d8 removed tests 2015-11-22 21:13:33 -05:00
Thomas Breloff 87bb45d01b added Surface, removed x/y length assert; added Surface createKWargsList; closes #82 2015-11-22 11:21:07 -05:00
Thomas Breloff 6beadcece8 fixes for contours in pyplot and gadfly 2015-11-21 13:59:26 -05:00
Thomas Breloff fc6f0f3a86 fixes in supported 2015-11-21 10:10:09 -05:00
Thomas Breloff ef7370f56d added density type 2015-11-21 09:26:35 -05:00
Thomas Breloff 52ba7cdbff working on plotly 2015-11-20 23:53:19 -05:00
Thomas Breloff b0c9dd44e9 working on plotly 2015-11-20 23:24:38 -05:00
Thomas Breloff 92ec093ed9 working on plotly 2015-11-20 18:36:50 -05:00
Thomas Breloff 6d2a1aafd2 working on plotly/web 2015-11-20 16:25:50 -05:00
Thomas Breloff f3a7734584 ref imgs 2015-11-20 14:28:26 -05:00
Thomas Breloff 9cf92f37f5 preparing for MLPlots; removed corrplot 2015-11-20 14:05:06 -05:00
Thomas Breloff 34831d42a4 subplot palette fix, added copy methods for Plot and Subplot 2015-11-20 12:55:45 -05:00
Thomas Breloff 607d5d7841 fixed empty plot() in gadfly backend 2015-11-20 10:17:31 -05:00
Thomas Breloff 75adfd2e9d new init logic; fix pyplot subplot bug 2015-11-20 09:26:43 -05:00
Thomas Breloff e92b5b2d35 fixed gadfly scales bug and new ref img; closes #74 2015-11-20 08:58:45 -05:00
Thomas Breloff a8c40a5493 started work on plotly 2015-11-18 21:26:16 -05:00
Thomas Breloff be5c3fb55c img_eps 2015-11-17 16:20:24 -05:00
Thomas Breloff e6e4a63022 added QuartzImageIO to test REQUIRE 2015-11-17 16:19:05 -05:00
Thomas Breloff 1cdc8928ba various fixes for pyplot and gadfly; new ref imgs 2015-11-17 15:59:45 -05:00
Thomas Breloff ad111a0163 added mpl version log 2015-11-17 11:48:10 -05:00
Thomas Breloff 7091a4899c imgcomp cleanup; pyplot dpi fix; new ref imgs 2015-11-17 11:19:12 -05:00
Thomas Breloff 3bd9e70fa9 moved PyPlot to first priority 2015-11-16 16:06:48 -05:00
Thomas Breloff 54bd2c620e gadfly ref imgs 2015-11-16 15:50:02 -05:00
Thomas Breloff 121640b1b3 fixed gadfly hline/vline constructors 2015-11-16 15:37:55 -05:00
Thomas Breloff 55e388513c fixes for gadfly and unicodeplots 2015-11-12 17:30:55 -05:00
Thomas Breloff b153dcbd63 reference images; gadfly markersize fix 2015-11-11 21:47:53 -05:00
Thomas Breloff 242cbe5ecb z/zcolor 2015-11-11 17:46:44 -05:00
Thomas Breloff f1cca13796 fix pyplot alpha and added stroke support 2015-11-11 16:27:21 -05:00
Thomas Breloff 918ba72107 readme 2015-11-10 16:41:26 -05:00
Thomas Breloff e596f27666 fixed numeric array without numeric type; updated readme; closes #64 2015-11-10 16:38:47 -05:00
Thomas Breloff a40d0000c5 fixed pyplot 2015-11-09 09:19:00 -05:00
Thomas Breloff fb82da74a1 gadfly layer order; fixes #63 2015-11-07 21:58:04 -05:00
Thomas Breloff b0991a0624 working on args 2015-11-06 15:58:15 -05:00
Thomas Breloff 6236acea02 working on markerstroke, name changes, and arg improvements 2015-11-06 15:49:27 -05:00
Thomas Breloff 391c7e8570 name changes; require to 0.4 2015-11-06 11:46:24 -05:00
Thomas Breloff 58041cc64e working on big renaming 2015-11-05 16:39:04 -05:00
Thomas Breloff 8c7d3a6e92 working on stroke/fill 2015-11-05 11:52:22 -05:00
Thomas Breloff ae1982369c working on bokeh 2015-11-03 15:48:04 -05:00
Thomas Breloff 5f85ac01f7 working on bokeh backend 2015-11-03 13:45:23 -05:00
Thomas Breloff cca263fb2b with method fix 2015-10-30 12:47:48 -04:00
Thomas Breloff 809ed02b85 gadfly/immerse downgrade fix 2015-10-30 10:03:10 -04:00
Thomas Breloff 9eab1083ab working on with 2015-10-29 17:18:14 -04:00
Thomas Breloff 60523bef80 working on 3d plotting 2015-10-29 15:44:07 -04:00
Thomas Breloff 46b959ff3c color reorg 2015-10-29 14:31:36 -04:00
Thomas Breloff 42c3827ded 0.3 fix 2015-10-29 13:26:40 -04:00
Thomas Breloff 26e4b4efda back to 0.3; working on fixes 2015-10-29 12:57:07 -04:00
Thomas Breloff 2169ab3bb8 ref imgs 2015-10-29 12:50:25 -04:00
Thomas Breloff 85dad8db88 removed gitattributes 2015-10-29 11:25:08 -04:00
Thomas Breloff 8120c34064 added smooth and opacity args for pyplot; fixes in regressionXY, replaceAliases 2015-10-28 12:14:58 -04:00
Thomas Breloff 1f1d1f70a1 fix for group arg 2015-10-28 01:37:52 -04:00
Thomas Breloff 373d868a17 gadfly color fixes; pyplot grid support 2015-10-28 01:12:20 -04:00
Thomas Breloff 834ba9bc61 fix imgcmp 2015-10-27 23:37:58 -04:00
Thomas Breloff 3ffec5aed9 fixed colors from subplot changes; fix imgcmp; new refimgs 2015-10-27 23:03:30 -04:00
Thomas Breloff ef20c1d684 subplot initargs fix 2015-10-27 22:08:47 -04:00
Thomas Breloff 697a59568c fixes 2015-10-27 20:08:33 -04:00
Thomas Breloff e58fb935b0 several fixes, plus qwt pos/size 2015-10-27 19:25:27 -04:00
Thomas Breloff 044d23f8a5 working on fixing problems with subplots and contours 2015-10-27 18:03:37 -04:00
Thomas Breloff 1604d867c3 cleared out examples markdown 2015-10-27 13:43:49 -04:00
Thomas Breloff 011db481c3 cleaned out examples and img directories 2015-10-27 13:42:29 -04:00
Thomas Breloff c404cdc38a qwt subplot pos/size 2015-10-27 13:38:16 -04:00
Thomas Breloff 20689af7dd alpha kw for colors; pyplot fix, debugshow 2015-10-27 12:40:38 -04:00
Thomas Breloff 9ea0585d71 support for contours in gadfly/immerse/pyplot 2015-10-26 18:07:22 -04:00
Thomas Breloff 614c5f694b readme 2015-10-26 15:58:26 -04:00
Thomas Breloff fa36aae068 readme 2015-10-26 15:52:44 -04:00
Thomas Breloff 3e85232310 readme 2015-10-26 15:46:34 -04:00
Thomas Breloff 894928d7ca fixes, examples, and readme; also deprecated winston 2015-10-26 14:03:06 -04:00
Thomas Breloff afb1486f86 tests and readme 2015-10-26 13:18:22 -04:00
Thomas Breloff 2799bd18e1 moved refimg dirs 2015-10-26 12:44:16 -04:00
Thomas Breloff 43c2a885b9 travis and 0.3 fixes 2015-10-26 12:25:09 -04:00
Thomas Breloff be7feb0eaa travis and readme 2015-10-26 11:43:30 -04:00
Thomas Breloff e3d653a8d9 tests 2015-10-26 11:38:33 -04:00
Thomas Breloff b9f9d8160d working on tests 2015-10-26 11:28:49 -04:00
Thomas Breloff 141b5c604d pyplot test fixes; pyplot ref imgs; travis fix 2015-10-26 10:52:29 -04:00
Thomas Breloff 8a0fc00435 imgcmp and travis 2015-10-26 09:59:26 -04:00
Thomas Breloff a3a8cb9368 nnet 2015-10-26 01:40:12 -04:00
Thomas Breloff 96c66b33a2 nnet 2015-10-26 00:11:43 -04:00
Thomas Breloff 62fad3724f pyplot push and nnet 2015-10-25 17:08:42 -04:00
Thomas Breloff ca2b6c87ef enabled lfs 2015-10-25 13:53:09 -04:00
Thomas Breloff 20348645a3 pyplot fixes 2015-10-25 00:44:18 -04:00
Thomas Breloff a9b39fad64 pyplot gui fixes and background/foreground fixes with writemime 2015-10-25 00:34:20 -04:00
Thomas Breloff 1c556ade57 more subplot fixes 2015-10-24 22:29:27 -04:00
Thomas Breloff e08957f5ec cleanup and fixes for subplot logic 2015-10-24 20:59:42 -04:00
Thomas Breloff e76ded69e6 some fixes for subplots and imgcmp 2015-10-24 16:11:55 -04:00
Thomas Breloff 7e740861d8 palette fixes and working on imgcmp 2015-10-24 15:09:13 -04:00
Thomas Breloff f28e65a26c meetup 2015-10-24 00:00:26 -04:00
Thomas Breloff a29f0c820b nnet 2015-10-23 17:05:35 -04:00
Thomas Breloff b2bc30cfed qwt fix 2015-10-23 15:58:42 -04:00
Thomas Breloff 6ce235bb68 immerse gui fix 2015-10-23 13:53:13 -04:00
Thomas Breloff 479ab989df immerse subplot gui fix; pyplot colorbars; subplot creation fix 2015-10-23 13:26:34 -04:00
Thomas Breloff 8d490b9e52 meetup nnet 2015-10-22 16:53:39 -04:00
Thomas Breloff 949f11a8c9 meetup 2015-10-22 15:10:15 -04:00
Thomas Breloff d4896e1978 improved color palette generation; removed some predefined gradients 2015-10-22 12:16:00 -04:00
Thomas Breloff c4020080b3 nnet 2015-10-22 00:40:41 -04:00
Thomas Breloff 5a68003d16 fixed empty plots 2015-10-21 21:30:05 -04:00
Thomas Breloff 9fcc3cdc24 pre/post processing subplots 2015-10-21 13:52:58 -04:00
Thomas Breloff ee80ce5ae6 subplots and colors 2015-10-21 12:27:13 -04:00
Thomas Breloff 456c4019c4 misc 2015-10-21 01:34:50 -04:00
Thomas Breloff f65627a505 travis; wine 2015-10-21 00:44:48 -04:00
Thomas Breloff 38d1fc15fe travis; wine 2015-10-21 00:29:53 -04:00
Thomas Breloff 5eead5b0fa travis; wine 2015-10-21 00:21:55 -04:00
Thomas Breloff 4223bd57f1 travis; wine 2015-10-21 00:15:11 -04:00
Thomas Breloff 5bfa653858 travis; wine 2015-10-20 23:57:18 -04:00
Thomas Breloff 5342764caf travis 2015-10-20 23:23:38 -04:00
Thomas Breloff 04a44a82c9 tests 2015-10-20 23:07:47 -04:00
Thomas Breloff c28820f39c colors and tests 2015-10-20 17:11:21 -04:00
Thomas Breloff 546955a78b working on colors and tests 2015-10-20 14:49:01 -04:00
Thomas Breloff d1e9cc5800 palettes notebook 2015-10-20 12:55:36 -04:00
Thomas Breloff 4ef2fb9933 palettes notebook 2015-10-20 12:23:45 -04:00
Thomas Breloff d7bc8adf21 palettes notebook 2015-10-20 12:15:13 -04:00
Thomas Breloff b5f44efc69 palettes notebook 2015-10-20 11:56:06 -04:00
Thomas Breloff 5e8abea222 palettes notebook 2015-10-20 11:53:02 -04:00
Thomas Breloff f291454ccb palettes notebook 2015-10-20 10:40:49 -04:00
Thomas Breloff bac6637b46 messing with colors 2015-10-20 08:24:58 -04:00
Thomas Breloff 866ac9fb72 working on test framework 2015-10-19 17:53:17 -04:00
Thomas Breloff 8208f6947f pdf/ps/svg outputs 2015-10-19 14:11:22 -04:00
Thomas Breloff dcd50a7c62 started work on imgcomp tests 2015-10-19 00:31:43 -04:00
Thomas Breloff 781aa86568 started work on imgcomp tests 2015-10-19 00:24:04 -04:00
Thomas Breloff 3facc116c8 gadfly examples 2015-10-18 00:56:38 -04:00
Thomas Breloff 9178c3b087 winston examples 2015-10-18 00:50:30 -04:00
Thomas Breloff 5c6c85a22f qwt fixes and examples 2015-10-18 00:41:04 -04:00
Thomas Breloff b8adb4d229 unicodeplots examples 2015-10-18 00:08:42 -04:00
Thomas Breloff 093118da8b unicodeplots examples 2015-10-17 23:52:07 -04:00
Thomas Breloff 0aa760119f examples 2015-10-17 23:43:52 -04:00
Thomas Breloff 60b3a1583d examples 2015-10-17 23:31:50 -04:00
Thomas Breloff 593c47b938 examples 2015-10-17 23:29:03 -04:00
Thomas Breloff 0f6bb7ce6f examples 2015-10-17 23:10:45 -04:00
Thomas Breloff 048c2541e6 readme 2015-10-17 23:07:35 -04:00
Thomas Breloff f3e7d1a43b examples 2015-10-17 22:43:36 -04:00
Thomas Breloff 5df24d6683 custom markers example; pyplot markers 2015-10-17 22:16:06 -04:00
Thomas Breloff 73779898b7 pyplot fonts and fixes; examples 2015-10-17 16:49:45 -04:00
Thomas Breloff 7200b6adc6 pyplot set/get data; examples 2015-10-17 16:17:18 -04:00
Thomas Breloff d48f15ab4d examples 2015-10-17 15:22:00 -04:00
Thomas Breloff 2747671935 readme 2015-10-17 14:07:53 -04:00
Thomas Breloff d86f24dd35 pyplot fixes 2015-10-17 01:26:58 -04:00
Thomas Breloff 60edccade5 readme 2015-10-16 17:46:20 -04:00
Thomas Breloff 540460cae9 readme 2015-10-16 17:37:30 -04:00
Thomas Breloff df44d86f46 examples and readme 2015-10-16 17:25:54 -04:00
Thomas Breloff c287b446c9 fixes and examples 2015-10-16 17:21:28 -04:00
Thomas Breloff 1db36c05a8 animations 2015-10-16 16:36:40 -04:00
Thomas Breloff 2c884ab5ab animations 2015-10-16 12:03:40 -04:00
Thomas Breloff cd0dfc956d gadfly cleanup 2015-10-16 11:03:34 -04:00
Thomas Breloff 03392a5f03 gadfly cleanup 2015-10-16 10:58:44 -04:00
Thomas Breloff a7da999bd7 Font and tick/guide/legend fonts 2015-10-16 10:52:36 -04:00
Thomas Breloff 47f21b1652 fixes; changed reg to smooth, added loess smoothing in gadfly 2015-10-16 00:47:46 -04:00
Thomas Breloff 7c91d10c79 several fixes after gadfly reorg 2015-10-16 00:21:37 -04:00
Thomas Breloff fac2f5494b gadfly overhaul 2015-10-15 23:11:17 -04:00
Thomas Breloff bfcdb7e840 example 2015-10-15 17:30:44 -04:00
Thomas Breloff 21d55db3b4 slides 2015-10-15 17:19:57 -04:00
Thomas Breloff 18e49888fe jpg 2015-10-15 16:51:48 -04:00
Thomas Breloff 7ba2f61361 0.3 fix 2015-10-15 16:50:57 -04:00
Thomas Breloff 407df158ef PlotText/text for annotations; fixes 2015-10-15 14:46:29 -04:00
Thomas Breloff eab46ba9c4 fixes 2015-10-15 01:34:06 -04:00
Thomas Breloff 39318e5e61 working on shapes 2015-10-14 20:53:44 -04:00
Thomas Breloff ac1ce03fe5 working on shapes overhaul 2015-10-14 20:46:17 -04:00
Thomas Breloff 4fa697ec75 big shapes overhaul; gadfly ShapeGeometry; some reorg and cleanup... still working on it 2015-10-14 18:14:44 -04:00
Thomas Breloff 027961bffa various fixes 2015-10-14 12:11:20 -04:00
Thomas Breloff 7dfcbabe0c wine 2015-10-13 17:35:10 -04:00
Thomas Breloff dfc7658426 misc 2015-10-13 16:51:19 -04:00
Thomas Breloff 04c6726b76 pyplot cleanup 2015-10-13 15:56:14 -04:00
Thomas Breloff 8fdbbe4c16 pyplot subplots 2015-10-13 15:30:25 -04:00
Thomas Breloff 09fceab75b pyplot subplots 2015-10-13 15:02:27 -04:00
Thomas Breloff 8df4c27285 pyplot, corrplot, and nba 2015-10-13 01:16:11 -04:00
Thomas Breloff e38820b74a working on pyplot 2015-10-12 18:16:55 -04:00
Thomas Breloff c052e731f8 fix links to keep separate lims per row/column 2015-10-12 16:42:34 -04:00
Thomas Breloff 3636860262 subplot linkfunc, fixes, cleanup 2015-10-12 14:31:27 -04:00
Thomas Breloff ce7421bef4 immerse fix 2015-10-12 10:42:29 -04:00
Thomas Breloff 23b51c4c3e working on pyplot subplots 2015-10-10 00:57:48 -04:00
Thomas Breloff 48d802fc40 qwt subplots 2015-10-10 00:03:23 -04:00
Thomas Breloff 51e8f3ff6e working on subplots 2015-10-09 23:21:45 -04:00
Thomas Breloff 7917397bf3 working on corrplot and recipes 2015-10-09 17:08:17 -04:00
Thomas Breloff e0c0052b63 working on corrplot and recipes 2015-10-09 17:08:06 -04:00
Thomas Breloff 15a4b50ce4 working on corrplot and recipes 2015-10-09 17:03:54 -04:00
Thomas Breloff a51a8abf27 working on subplots and recipes 2015-10-09 16:00:24 -04:00
Thomas Breloff 45747e3635 working on recipes 2015-10-09 14:35:00 -04:00
Thomas Breloff 64b8e15918 working on subplots and recipes 2015-10-09 13:12:40 -04:00
Thomas Breloff f4b716b255 working on linked subplots 2015-10-08 17:44:00 -04:00
Thomas Breloff 1115ff83bb working on contours 2015-10-08 14:18:49 -04:00
Thomas Breloff c24550c756 0.3 fix gadfly shapes 2015-10-08 14:01:30 -04:00
Thomas Breloff b5cdfe30ea readme and examples 2015-10-08 13:33:14 -04:00
Thomas Breloff a10e594da1 tests 2015-10-08 12:31:33 -04:00
Thomas Breloff 63aee387f0 badges and test fix 2015-10-08 12:05:21 -04:00
Thomas Breloff ab9de1e199 added 0.3 and nightly to travis; force Winston to use gtk 2015-10-08 11:48:54 -04:00
Thomas Breloff e60c463328 0.3 support; require Compat; pyplot scatter colormaps 2015-10-08 11:30:20 -04:00
Thomas Breloff 537d74196b working on contours 2015-10-08 07:49:26 -04:00
Thomas Breloff a8bbbe8582 working on contours 2015-10-08 00:49:30 -04:00
Thomas Breloff 29471a7aac readme 2015-10-07 18:18:44 -04:00
Thomas Breloff 894a4a5567 winston fixes/examples and updated readme 2015-10-07 18:09:32 -04:00
Thomas Breloff f7cd5276f0 fixed qwt and examples 2015-10-07 17:42:08 -04:00
Thomas Breloff 95b8c71083 examples 2015-10-07 17:04:19 -04:00
Thomas Breloff 52c82e6fe2 examples 2015-10-07 16:54:42 -04:00
Thomas Breloff cef1abd6aa readme 2015-10-07 16:29:32 -04:00
Thomas Breloff 91da261128 working on colors/args and examples 2015-10-07 16:04:30 -04:00
Thomas Breloff 1c70346a61 bringing pyplot up to speed 2015-10-07 13:45:38 -04:00
Thomas Breloff 2de017086d working on colors and args 2015-10-07 12:50:07 -04:00
Thomas Breloff d6253c72d4 working on colors, args, and axis flip 2015-10-06 18:19:44 -04:00
Thomas Breloff e5007b6c87 working on colors, args, and axis flip 2015-10-06 17:51:54 -04:00
Thomas Breloff bbc18549b3 working on args 2015-10-06 11:37:45 -05:00
Thomas Breloff b6855b6fba working on args 2015-10-06 10:07:18 -05:00
Thomas Breloff 70db97d576 working on args 2015-10-06 09:49:33 -05:00
Thomas Breloff f632f2f39e working on args 2015-10-06 09:04:57 -05:00
Thomas Breloff b23f968d57 working on axis/line/marker/fill overhaul 2015-10-06 08:45:53 -05:00
Thomas Breloff ea88877a11 working on color schemes 2015-10-05 17:06:52 -05:00
Thomas Breloff 1de3decede working on color schemes 2015-10-05 16:28:43 -05:00
Thomas Breloff 78045fd2ab working on spy and nbins tuple 2015-10-04 21:39:32 -05:00
Thomas Breloff 7c8898158b working on gadfly continuous colors 2015-10-04 16:52:29 -05:00
Thomas Breloff 3fc5f87388 added better error for Winston output_surface 2015-10-04 09:41:42 -05:00
Thomas Breloff 623ca1effc winston log10 scale 2015-10-03 17:18:58 -05:00
Thomas Breloff da05e7fe5e qwt log10 scale 2015-10-03 17:03:13 -05:00
Thomas Breloff f3734d4c64 added pyplot scales 2015-10-03 09:46:02 -05:00
Thomas Breloff 9ab458e109 switched gadfly heatmap to Geom.histogram2d 2015-10-01 12:55:05 -05:00
Thomas Breloff d4c72e6f78 gadfly ribbon 2015-09-30 10:36:00 -04:00
Thomas Breloff 1f58ef5140 don't error on savefig without an ext, use default; closes #32 2015-09-30 09:55:07 -04:00
Thomas Breloff 69d574c587 added scales globally and to gadfly/immerse 2015-09-30 09:18:16 -04:00
Thomas Breloff a027fdded7 autoload dataframes 2015-09-29 14:40:11 -04:00
Thomas Breloff 443df0501d supported graphs 2015-09-29 14:27:18 -04:00
Thomas Breloff d68fe5f80d supported readme 2015-09-29 14:14:13 -04:00
Thomas Breloff ebf868bae3 supported readme 2015-09-29 14:13:46 -04:00
Thomas Breloff 8a9b3286e9 supportedGraphs utils and pngs; removed args/kwargs from defaults 2015-09-29 14:05:24 -04:00
Thomas Breloff a0455561b6 unicode hline/vline; supportGraph utils 2015-09-29 13:46:31 -04:00
Thomas Breloff 518ccf5a74 pyplot hline/vline 2015-09-29 12:20:58 -04:00
Thomas Breloff 54f09c58cb unicodeplots lims 2015-09-29 12:00:48 -04:00
Thomas Breloff 029ad1045a qwt lims/ticks 2015-09-29 11:50:02 -04:00
Thomas Breloff 2f55fb4d84 winston lims 2015-09-29 10:40:46 -04:00
Thomas Breloff add724eee9 working on gadfly ticks 2015-09-29 09:50:53 -04:00
Thomas Breloff 07324ae892 working on gadfly ticks 2015-09-29 09:49:58 -04:00
Thomas Breloff ffc05e971f working on ticks 2015-09-28 23:49:03 -04:00
Thomas Breloff 30f42fd1d4 added lims/ticks for pyplot 2015-09-28 22:49:46 -04:00
Thomas Breloff f284857438 added qwt hline/vline; working on setTicksFromStringVector 2015-09-28 17:56:32 -04:00
Thomas Breloff 06ab514472 qwt annotations and examples 2015-09-28 17:11:43 -04:00
Thomas Breloff 85b65acbe0 readme 2015-09-28 16:48:32 -04:00
Thomas Breloff 4d1d9de22f gitignore 2015-09-28 16:43:04 -04:00
Thomas Breloff a68ec9b191 savefig and png 2015-09-28 16:42:02 -04:00
Thomas Breloff e386636d66 readme 2015-09-28 16:01:48 -04:00
Thomas Breloff cc3311b8eb examples 2015-09-28 15:49:46 -04:00
Thomas Breloff d3d1181769 examples and readme 2015-09-28 15:44:50 -04:00
Thomas Breloff 001abf684c examples 2015-09-28 15:35:45 -04:00
Thomas Breloff 92a65296b5 redid supportedArgs 2015-09-28 15:21:45 -04:00
Thomas Breloff 3a7887d003 working on massive naming overhaul and fixes 2015-09-28 14:58:56 -04:00
Thomas Breloff 3334c4a87a winston annotations 2015-09-28 12:52:44 -04:00
Thomas Breloff 228ce768e0 pyplot annotations and ioff fix 2015-09-28 12:09:52 -04:00
Thomas Breloff eafc1a784c working on annotations 2015-09-28 11:09:45 -04:00
Thomas Breloff fd3a4d0a0e working on annotations 2015-09-28 10:46:53 -04:00
Thomas Breloff 77d679b63b working on handling string input data 2015-09-27 23:46:42 -04:00
Thomas Breloff 730d764c6e gadfly color group 2015-09-25 17:03:57 -04:00
Thomas Breloff 6f1ef82e89 gadfly color groups for line segments 2015-09-25 16:47:17 -04:00
Thomas Breloff d4da910f19 call Gadfly.get_stroke_vector; added getindex/setindex to qwt 2015-09-25 13:33:06 -04:00
Thomas Breloff a0a0773bd2 fix push warning 2015-09-25 09:42:16 -04:00
Thomas Breloff 9ce8d138d5 working on data updating and notebooks 2015-09-25 01:00:22 -04:00
Thomas Breloff 0041b034e0 working on various things 2015-09-24 16:47:30 -04:00
Thomas Breloff d781c437de started real time updates; fixes #29 (pyplot ijulia display) 2015-09-24 13:01:31 -04:00
Thomas Breloff 2fe21b8547 fixes, gadfly star shape, readme example 2015-09-24 00:35:18 -04:00
Thomas Breloff dbc90c9417 working on groups and iris notebook 2015-09-23 23:34:54 -04:00
Thomas Breloff 431d60a58a working on groups and iris notebook 2015-09-23 23:15:15 -04:00
Thomas Breloff fcfcc9a94a working on groups and iris notebook 2015-09-23 17:13:20 -04:00
Thomas Breloff 870fb4e2df working on groups and iris notebook 2015-09-23 17:12:26 -04:00
Thomas Breloff e3612b973f working on groups and iris notebook 2015-09-23 16:48:49 -04:00
Thomas Breloff 75f4ca928f working on auto-labels from dataframes meta info, and started group arg 2015-09-23 15:34:42 -04:00
Thomas Breloff 22fd25b30f readme 2015-09-23 13:36:51 -04:00
Thomas Breloff 610ddb09ff readme and cleanup 2015-09-23 13:33:12 -04:00
Thomas Breloff 33602aca11 fixed tests 2015-09-23 13:03:37 -04:00
Thomas Breloff a207856e99 lims/ticks for gadfly/immerse 2015-09-23 12:45:24 -04:00
Thomas Breloff 80e8b5b5e4 fixes 2015-09-23 11:35:08 -04:00
Thomas Breloff 273996aa91 working on ticks/lims 2015-09-23 00:14:32 -04:00
Thomas Breloff 646b88c5be working on ticks 2015-09-22 23:30:20 -04:00
Thomas Breloff 88cfd82a25 unicodeplots fixes 2015-09-22 17:19:37 -04:00
Thomas Breloff 2f8436be87 winston examples 2015-09-22 17:04:51 -04:00
Thomas Breloff a6237cdda3 qwt examples 2015-09-22 17:02:19 -04:00
Thomas Breloff eb93a767fc pyplot fixes and examples 2015-09-22 16:57:23 -04:00
Thomas Breloff 41852412ca gadfly/immerse fixes and examples 2015-09-22 16:46:54 -04:00
Thomas Breloff 224b2b7323 various fixes; readme 2015-09-22 16:30:40 -04:00
Thomas Breloff ec939f9f9a more display fun 2015-09-22 14:56:37 -04:00
Thomas Breloff eced15b712 working on display/writemime overhaul 2015-09-22 12:54:55 -04:00
Thomas Breloff f8fb473981 reexport Colors; move default backend choice into __init__; fixed pickDefaultBackend 2015-09-22 08:10:30 -04:00
Thomas Breloff f2bcb77cfb trying fgcolor gadfly 2015-09-22 00:04:35 -04:00
Thomas Breloff dc5da28176 initial dataframes support 2015-09-21 23:36:07 -04:00
Thomas Breloff be43e64743 foreground_color fixes and added support in pyplot 2015-09-21 23:04:37 -04:00
Thomas Breloff 454630dace qwt fixes 2015-09-21 22:14:59 -04:00
Thomas Breloff c9df244333 qwt fixes 2015-09-21 17:38:27 -04:00
Thomas Breloff 2649d97d69 readme 2015-09-21 17:31:36 -04:00
Thomas Breloff bcb9ac5501 readme 2015-09-21 17:29:51 -04:00
Thomas Breloff 76d1e26f7d readme 2015-09-21 17:04:20 -04:00
Thomas Breloff ba13ab9926 readme 2015-09-21 16:59:15 -04:00
Thomas Breloff c43b34b67f auto-generated readme 2015-09-21 16:49:45 -04:00
Thomas Breloff 3739c2881b fixed linetype aliases; for qwt as well 2015-09-21 16:18:58 -04:00
Thomas Breloff bc13b81351 working on readme_template; added path linetype and sorting logic for line 2015-09-21 16:03:59 -04:00
Thomas Breloff 86a56e487a working on aliases 2015-09-21 14:38:03 -04:00
Thomas Breloff 031058cd0c cleanup and renaming constants 2015-09-21 12:15:40 -04:00
Thomas Breloff 85040d6104 fix creating empty plot with plot() 2015-09-21 12:05:17 -04:00
Thomas Breloff efbf74b44c working on auto generated color palette 2015-09-21 11:45:37 -04:00
Thomas Breloff 774fc42e8e replaced creation of kw args 2015-09-20 23:48:45 -04:00
Thomas Breloff 692cfe4f52 added srand calls to tests and examples 2015-09-20 22:59:25 -04:00
Thomas Breloff 8b34d4417b gadfly display size and fix: check for line_style 2015-09-20 21:12:56 -04:00
Thomas Breloff c20a7b3c69 added fillto for gadfly/immerse 2015-09-19 17:23:18 -04:00
Thomas Breloff ff6e83c55e working on new plot logic 2015-09-19 14:39:25 -04:00
Thomas Breloff 6aa56fd30f fixed subplot bug 2015-09-19 00:38:50 -04:00
Thomas Breloff f5a6f129dd foreground_color 2015-09-19 00:05:24 -04:00
Thomas Breloff 5405c1d240 working on colors 2015-09-18 17:20:35 -04:00
Thomas Breloff 455f85e230 working on colors, args 2015-09-18 16:53:43 -04:00
Thomas Breloff fa899a67a7 added support for gadfly linestyles... depends on gadfly PR 695 2015-09-18 12:26:18 -04:00
Thomas Breloff 56cf25eebf gadfly shapes 2015-09-18 01:55:16 -04:00
Thomas Breloff 1a490551e6 working on arg aliases and reorg 2015-09-18 01:48:00 -04:00
Thomas Breloff 4514802e35 replacing String with AbstractString 2015-09-17 21:32:27 -04:00
205 changed files with 9409 additions and 3384 deletions
+3 -1
View File
@@ -1,4 +1,6 @@
*.jl.cov
*.jl.*.cov
*.jl.mem
.DS_Store
.DS_Store
examples/.ipynb_checkpoints/*
examples/meetup/.ipynb_checkpoints/*
+12 -2
View File
@@ -5,9 +5,19 @@ os:
- osx
julia:
- 0.4
#- nightly
notifications:
email: false
email: true
# uncomment the following lines to override the default test script
script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia -e 'Pkg.clone(pwd()); Pkg.build("Plots"); Pkg.add("Gadfly"); Pkg.test("Plots"; coverage=true)'
- julia -e 'Pkg.clone(pwd()); Pkg.build("Plots")'
# - julia -e 'Pkg.clone("https://github.com/tbreloff/Images.jl.git"); Pkg.checkout("Images","tom_imgcompare");'
# - julia -e 'Pkg.clone("Images"); Pkg.build("Images")'
# - julia -e 'Pkg.clone("ImageMagick"); Pkg.build("ImageMagick")'
- julia -e 'Pkg.clone("https://github.com/tbreloff/VisualRegressionTests.jl.git");'
- julia -e 'Pkg.clone("https://github.com/tbreloff/ExamplePlots.jl.git");'
- julia -e 'Pkg.clone("Cairo"); Pkg.build("Cairo")'
- julia -e 'ENV["PYTHON"] = ""; Pkg.clone("PyPlot"); Pkg.build("PyPlot")'
- julia -e 'Pkg.test("Plots"; coverage=false)'
# - julia -e 'cd(Pkg.dir("Plots")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder()); Codecov.submit(process_folder())'
+12 -272
View File
@@ -1,281 +1,21 @@
# Plots
[![Build Status](https://travis-ci.org/tbreloff/Plots.jl.svg?branch=master)](https://travis-ci.org/tbreloff/Plots.jl)
[![Plots](http://pkg.julialang.org/badges/Plots_0.3.svg)](http://pkg.julialang.org/?pkg=Plots&ver=0.3)
[![Plots](http://pkg.julialang.org/badges/Plots_0.4.svg)](http://pkg.julialang.org/?pkg=Plots&ver=0.4)
<!-- [![Coverage Status](https://coveralls.io/repos/tbreloff/Plots.jl/badge.svg?branch=master)](https://coveralls.io/r/tbreloff/Plots.jl?branch=master) -->
<!-- [![codecov.io](http://codecov.io/github/tbreloff/Plots.jl/coverage.svg?branch=master)](http://codecov.io/github/tbreloff/Plots.jl?branch=master) -->
#### Author: Thomas Breloff (@tbreloff)
Plotting interface and wrapper for several plotting packages.
Plots is a plotting API and toolset. My goals with the package are:
Please add wishlist items, bugs, or any other comments/questions to the issues list.
## Examples for each implemented backend:
- [Qwt.jl](docs/qwt_examples.md)
- [Gadfly.jl](docs/gadfly_examples.md)
- [UnicodePlots.jl](docs/unicodeplots_examples.md)
- [PyPlot.jl](docs/pyplot_examples.md)
- [Immerse.jl](docs/immerse_examples.md)
- [Winston.jl](docs/winston_examples.md)
## Installation
First, add the package
```julia
Pkg.add("Plots")
```
then get any plotting packages you need (obviously, you should get at least one backend):
```julia
Pkg.add("Gadfly")
Pkg.add("Immerse")
Pkg.add("UnicodePlots")
Pkg.add("PyPlot") # requires python and matplotlib
Pkg.clone("https://github.com/tbreloff/Qwt.jl.git") # requires pyqt and pyqwt
Pkg.add("Winston")
```
## Use
Load it in. The underlying plotting backends are not imported until `plotter()` is called (which happens
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
using Plots
```
Do a plot in Gadfly, then save a png:
```julia
# switch to Gadfly as a backend
gadfly!()
# This will bring up a browser window with the plot. Add a semicolon to skip display.
plot(rand(10,2); marker = :rect, markersizes=[10,30])
# save it as a PNG
savepng(Plots.IMG_DIR * "gadfly1.png")
```
which saves:
![gadfly_plt](img/gadfly1.png)
See the examples pages for lots of examples of plots, and what those commands produce for each supported backend.
## API
Call `plotter!(backend::Symbol)` or the shorthands (`gadfly!()`, `qwt!()`, `unicodeplots!()`, etc) to set the current plotting backend.
Subsequent commands are converted into the relevant plotting commands for that package:
```julia
gadfly!()
plot(1:10) # this effectively calls `y = 1:10; Gadfly.plot(x=1:length(y), y=y)`
qwt!()
plot(1:10) # this effectively calls `Qwt.plot(1:10)`
```
Use `plot` to create a new plot object, and `plot!` to add to an existing one:
```julia
plot(args...; kw...) # creates a new plot window, and sets it to be the `currentPlot`
plot!(args...; kw...) # adds to the `currentPlot`
plot!(plotobj, args...; kw...) # adds to the plot `plotobj`
```
Now that you know which plot object you're updating (new, current, or other), I'll leave it off for simplicity.
Here are some various args to supply, and the implicit mapping (AVec == AbstractVector and AMat == AbstractMatrix):
```julia
# one line... x = 1:length(y)
plot(y::AVec; kw...)
# one line (will assert length(x) == length(y))
plot(x::AVec, y::AVec; kw...)
# multiple lines (one per column of x), all sharing x = 1:size(y,1)
plot(y::AMat; kw...)
# multiple lines (one per column of x), all sharing x (will assert length(x) == size(y,1))
plot(x::AVec, y::AMat; kw...)
# multiple lines (one per column of x/y... will assert size(x) == size(y))
plot(x::AMat, y::AMat; kw...)
# one line, map function for range [xmin,xmax]
plot(f::Function, xmin::Real, xmax::Real; kw...)
# multiple lines, map functions for range [xmin,xmax]
plot(f::AVec{Function}, xmin::Real, xmax::Real; kw...)
# parametric plot... x = fx(u), y = fy(u)
plot(fx::Function, fy::Function, umin::Real, umax::Real; kw...)
# one line, y = f(x)... can swap x and f
plot(x::AVec, f::Function; kw...)
# multiple lines, yᵢⱼ = f(xᵢⱼ)... can swap f and x
plot(x::AMat, f::Function; kw...)
# multiple lines, yᵢⱼ = fⱼ(xᵢ)
plot(x::AVec, fs::AVec{Function}; kw...)
# multiple lines, each with x = 1:length(y[i])
plot(y::AVec{AVec}; kw...)
# multiple lines, will assert length(x) == length(y[i])
plot(x::AVec, y::AVec{AVec}; kw...)
# multiple lines, will assert length(x[i]) == length(y[i])
plot(x::AVec{AVec}, y::AVec{AVec}; kw...)
# n lines, all empty (for updating plots)
plot(n::Integer; kw...)
# TODO: DataFrames, categorical values
```
With `subplot`, create multiple plots at once, with flexible layout options:
```julia
y = rand(100,3)
subplot(y; n = 3) # create an automatic grid, and let it figure out the shape
subplot(y; n = 3, nr = 1) # create an automatic grid, but fix the number of rows
subplot(y; n = 3, nc = 1) # create an automatic grid, but fix the number of columns
subplot(y; layout = [1, 2]) # explicit layout. Lists the number of plots in each row
```
__Tip__: You can call `subplot!(args...; kw...)` to add to an existing subplot.
__Tip__: Calling `subplot!` on a `Plot` object, or `plot!` on a `Subplot` object will throw an error.
Shorthands:
```julia
scatter(args...; kw...) = plot(args...; kw..., linetype = :scatter)
scatter!(args...; kw...) = plot!(args...; kw..., linetype = :scatter)
bar(args...; kw...) = plot(args...; kw..., linetype = :bar)
bar!(args...; kw...) = plot!(args...; kw..., linetype = :bar)
histogram(args...; kw...) = plot(args...; kw..., linetype = :hist)
histogram!(args...; kw...) = plot!(args...; kw..., linetype = :hist)
heatmap(args...; kw...) = plot(args...; kw..., linetype = :heatmap)
heatmap!(args...; kw...) = plot!(args...; kw..., linetype = :heatmap)
sticks(args...; kw...) = plot(args...; kw..., linetype = :sticks, marker = :ellipse)
sticks!(args...; kw...) = plot!(args...; kw..., linetype = :sticks, marker = :ellipse)
```
Some keyword arguments you can set:
```
axis # :left or :right
color # can be a string ("red") or a symbol (:red) or a ColorsTypes.jl
# Colorant (RGB(1,0,0)) or :auto (which lets the package pick)
label # string or symbol, applies to that line, may go in a legend
width # width of a line
linetype # :line, :step, :stepinverted, :sticks, :scatter, :none, :heatmap, :hexbin, :hist, :bar
linestyle # :solid, :dash, :dot, :dashdot, :dashdotdot
marker # :none, :ellipse, :rect, :diamond, :utriangle, :dtriangle,
# :cross, :xcross, :star1, :star2, :hexagon
markercolor # same choices as `color`, or :match will set the color to be the same as `color`
markersize # size of the marker
nbins # number of bins for heatmap/hexbin and histograms
heatmap_c # color cutoffs for Qwt heatmaps
fillto # fillto value for area plots
title # string or symbol, title of the plot
xlabel # string or symbol, label on the bottom (x) axis
ylabel # string or symbol, label on the left (y) axis
yrightlabel # string or symbol, label on the right (y) axis
reg # true or false, add a regression line for each line
size # (Int,Int), resize the enclosing window
pos # (Int,Int), move the enclosing window to this position
windowtitle # string or symbol, set the title of the enclosing windowtitle
screen # Integer, move enclosing window to this screen number (for multiscreen desktops)
```
Note that not every backend supports all options.
If you don't include a keyword argument, these are the defaults:
```
axis = :left
color = :auto
label = automatically generated (y1, y2, ...., or y1 (R), y2 (R) for the right axis)
width = 1
linetype = :line
linestype = :solid
marker = :none
markercolor = :match
markersize = 3
nbins = 100
heatmap_c = (0.15, 0.5)
fillto = nothing
title = ""
xlabel = ""
ylabel = ""
yrightlabel = ""
reg = false
size = (600,400)
pos = (0,0)
windowtitle = "Plots.jl"
screen = 1
```
__Tip__: You can see the default value for a given argument with `plotDefault(arg::Symbol)`, and set the default value with `plotDefault!(arg::Symbol, value)`
__Tip__: When plotting multiple lines, you can give every line the same trait by using the singular, or add an "s" to pluralize.
(yes I know it's not gramatically correct, but it's easy to use and implement)
```julia
# Note: The same width is applied to both lines, whereas
# each line gets different color and axis.
plot(rand(100,2); colors = [:red, RGB(.5,.5,0)],
axiss = [:left, :right],
width = 5)
```
## TODO features:
- [x] Plot vectors/matrices/functions
- [ ] Plot DataFrames
- [ ] Scales
- [ ] Categorical Inputs (strings, etc... for hist, bar? or can split one series into multiple?)
- [ ] Custom markers
- [ ] Special plots (boxplot, ohlc?)
- [x] Subplots
- [x] Histograms
- [ ] 3D plotting
- [ ] Scenes/Drawing
- [ ] Graphs
- [ ] Interactivity (GUIs)
## TODO backends:
- [x] Gadfly.jl
- [x] Immerse.jl
- [x] PyPlot.jl
- [x] UnicodePlots.jl
- [x] Qwt.jl
- [x] Winston.jl
- [ ] GLPlot.jl
- [ ] Bokeh.jl
- [ ] Vega.jl
- [ ] Gaston.jl
- [ ] Plotly.jl
- [ ] GoogleCharts.jl
- [ ] PLplot.jl
- [ ] TextPlots.jl
- [ ] ASCIIPlots.jl
- [ ] Sparklines.jl
- [ ] Hinton.jl
- [ ] ImageTerm.jl
- [ ] GraphViz.jl
- [ ] TikzGraphs.jl
- [ ] GraphLayout.jl
## More information on backends (both supported and unsupported)
See the wiki at: https://github.com/JuliaPlot/juliaplot_docs/wiki
- **Intuitive**. Start generating complex plots without reading volumes of documentation. Commands should "just work".
- **Concise**. Less code means fewer mistakes and more efficient development/analysis.
- **Flexible**. Produce your favorite plots from your favorite package, but quicker and simpler.
- **Consistent**. Don't commit to one graphics package. Use the same code and access the strengths of all backends.
- **Lightweight**. Very few dependencies, since backends are loaded and initialized dynamically.
Use the preprocessing pipeline in Plots to fully describe your visualization before it calls the backend code. This maintains modularity and allows for efficient separation of front end code, algorithms, and backend graphics. New graphical backends can be added with minimal effort.
View the [full documentation](http://plots.readthedocs.org).
+5 -1
View File
@@ -1,3 +1,7 @@
julia 0.4-
julia 0.4
Colors
Reexport
Compat
Requires
FixedSizeArrays
+419
View File
@@ -0,0 +1,419 @@
module PlotExamples
using Plots
using Colors
using Compat
const DOCDIR = Pkg.dir("Plots") * "/docs"
const IMGDIR = Pkg.dir("Plots") * "/img"
"""
Holds all data needed for a documentation example... header, description, and plotting expression (Expr)
"""
type PlotExample
header::@compat(AbstractString)
desc::@compat(AbstractString)
exprs::Vector{Expr}
end
# the examples we'll run for each
const examples = PlotExample[
PlotExample("Lines",
"A simple line plot of the columns.",
[
:(plot(Plots.fakedata(50,5), w=3))
]),
PlotExample("Functions, adding data, and animations",
"Plot multiple functions. You can also put the function first, or use the form `plot(f, xmin, xmax)` where f is a Function or AbstractVector{Function}.\n\nGet series data: `x, y = plt[i]`. Set series data: `plt[i] = (x,y)`. Add to the series with `push!`/`append!`.\n\nEasily build animations. (`convert` or `ffmpeg` must be available to generate the animation.) Use command `gif(anim, filename, fps=15)` to save the animation.",
[
:(p = plot([sin,cos], zeros(0), leg=false)),
:(anim = Animation()),
:(for x in linspace(0, 10π, 100)
push!(p, x, Float64[sin(x), cos(x)])
frame(anim)
end)
]),
PlotExample("Parametric plots",
"Plot function pair (x(u), y(u)).",
[
:(plot(sin, x->sin(2x), 0, 2π, line=4, leg=false, fill=(0,:orange)))
]),
PlotExample("Colors",
"Access predefined palettes (or build your own with the `colorscheme` method). Line/marker colors are auto-generated from the plot's palette, unless overridden. Set the `z` argument to turn on series gradients.",
[
:(y = rand(100)),
:(plot(0:10:100,rand(11,4),lab="lines",w=3, palette=:grays, fill=(0.5,:auto))),
:(scatter!(y, zcolor=abs(y-.5), m=(:heat,0.8,stroke(1,:green)), ms=10*abs(y-0.5)+4, lab="grad"))
]),
PlotExample("Global",
"Change the guides/background/limits/ticks. Convenience args `xaxis` and `yaxis` allow you to pass a tuple or value which will be mapped to the relevant args automatically. The `xaxis` below will be replaced with `xlabel` and `xlims` args automatically during the preprocessing step. You can also use shorthand functions: `title!`, `xaxis!`, `yaxis!`, `xlabel!`, `ylabel!`, `xlims!`, `ylims!`, `xticks!`, `yticks!`",
[
:(y = rand(20,3)),
:(plot(y, xaxis=("XLABEL",(-5,30),0:2:20,:flip), background_color = RGB(0.2,0.2,0.2), leg=false)),
:(hline!(mean(y,1)+rand(1,3), line=(4,:dash,0.6,[:lightgreen :green :darkgreen]))),
:(vline!([5,10])),
:(title!("TITLE")),
:(yaxis!("YLABEL", :log10))
]),
PlotExample("Two-axis",
"Use the `axis` arguments.\n\nNote: Currently only supported with Qwt and PyPlot",
[
:(plot(Vector[randn(100), randn(100)*100], axis = [:l :r], ylabel="LEFT", yrightlabel="RIGHT", xlabel="X", title="TITLE"))
]),
PlotExample("Arguments",
"Plot multiple series with different numbers of points. Mix arguments that apply to all series (marker/markersize) with arguments unique to each series (colors). Special arguments `line`, `marker`, and `fill` will automatically figure out what arguments to set (for example, we are setting the `linestyle`, `linewidth`, and `color` arguments with `line`.) Note that we pass a matrix of colors, and this applies the colors to each series.",
[
:(ys = Vector[rand(10), rand(20)]),
:(plot(ys, line=(:dot,4,[:black :orange]), marker=([:hex :d],12,0.8,stroke(3,:gray))))
]),
PlotExample("Build plot in pieces",
"Start with a base plot...",
[
:(plot(rand(100)/3, reg=true, fill=(0,:green)))
]),
PlotExample("",
"and add to it later.",
[
:(scatter!(rand(100), markersize=6, c=:orange))
]),
PlotExample("Heatmaps",
"",
[
:(heatmap(randn(10000),randn(10000), nbins=20))
]),
PlotExample("Line types",
"",
[
:(types = intersect(supportedTypes(), [:line, :path, :steppre, :steppost, :sticks, :scatter])'),
:(n = length(types)),
:(x = Vector[sort(rand(20)) for i in 1:n]),
:(y = rand(20,n)),
:(plot(x, y, line=(types,3), lab=map(string,types), ms=15))
]),
PlotExample("Line styles",
"",
[
:(styles = setdiff(supportedStyles(), [:auto])'),
:(plot(cumsum(randn(20,length(styles)),1), style=:auto, label=map(string,styles), w=5))
]),
PlotExample("Marker types",
"",
[
:(markers = setdiff(supportedMarkers(), [:none,:auto,Shape])'),
:(n = length(markers)),
:(x = linspace(0,10,n+2)[2:end-1]),
:(y = repmat(reverse(x)', n, 1)),
:(scatter(x, y, m=(8,:auto), lab=map(string,markers), bg=:linen))
]),
PlotExample("Bar",
"x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)",
[
:(bar(randn(999)))
]),
PlotExample("Histogram",
"",
[
:(histogram(randn(1000), nbins=20))
]),
PlotExample("Subplots",
"""
subplot and subplot! are distinct commands which create many plots and add series to them in a circular fashion.
You can define the layout with keyword params... either set the number of plots `n` (and optionally number of rows `nr` or
number of columns `nc`), or you can set the layout directly with `layout`.
""",
[
:(subplot(randn(100,5), layout=[1,1,3], t=[:line :hist :scatter :step :bar], nbins=10, leg=false))
]),
PlotExample("Adding to subplots",
"Note here the automatic grid layout, as well as the order in which new series are added to the plots.",
[
:(subplot(Plots.fakedata(100,10), n=4, palette=[:grays :blues :heat :lightrainbow], bg=[:orange :pink :darkblue :black]))
]),
PlotExample("",
"",
[
:(subplot!(Plots.fakedata(100,10)))
]),
PlotExample("Open/High/Low/Close",
"Create an OHLC chart. Pass in a vector of OHLC objects as your `y` argument. Adjust the tick width with arg `markersize`.",
[
:(n=20),
:(hgt=rand(n)+1),
:(bot=randn(n)),
:(openpct=rand(n)),
:(closepct=rand(n)),
:(y = [OHLC(openpct[i]*hgt[i]+bot[i], bot[i]+hgt[i], bot[i], closepct[i]*hgt[i]+bot[i]) for i in 1:n]),
:(ohlc(y; markersize=8))
]),
PlotExample("Annotations",
"Currently only text annotations are supported. Pass in a tuple or vector-of-tuples: (x,y,text). `annotate!(ann)` is shorthand for `plot!(; annotation=ann)`",
[
:(y = rand(10)),
:(plot(y, ann=(3,y[3],text("this is #3",:left)))),
:(annotate!([(5,y[5],text("this is #5",16,:red,:center)),
(10,y[10],text("this is #10",:right,20,"courier"))]))
]),
PlotExample("Custom Markers",
"A `Plots.Shape` is a light wrapper around vertices of a polygon. For supported backends, pass arbitrary polygons as the marker shapes. Note: The center is (0,0) and the size is expected to be rougly the area of the unit circle.",
[
:(verts = [(-1.0,1.0),(-1.28,0.6),(-0.2,-1.4),(0.2,-1.4),(1.28,0.6),(1.0,1.0),
(-1.0,1.0),(-0.2,-0.6),(0.0,-0.2),(-0.4,0.6),(1.28,0.6),(0.2,-1.4),
(-0.2,-1.4),(0.6,0.2),(-0.2,0.2),(0.0,-0.2),(0.2,0.2),(-0.2,-0.6)])
:(plot(0.1:0.2:0.9, 0.7rand(5)+0.15,
l=(3,:dash,:lightblue),
m=(Shape(verts),30,RGBA(0,0,0,0.2)),
bg=:pink, fg=:darkblue,
xlim = (0,1), ylim=(0,1), leg=false))
]),
PlotExample("Contours",
"",
[
:(x = 1:0.3:20),
:(y = x),
:(f(x,y) = sin(x)+cos(y)),
:(contour(x, y, f, fill=true))
]),
PlotExample("Pie",
"",
[
:(x = ["Nerds", "Hackers", "Scientists"]),
:(y = [0.4, 0.35, 0.25]),
:(pie(x, y, title="The Julia Community", l=0.5))
]),
PlotExample("3D",
"",
[
:(n = 100),
:(ts = linspace(0,8π,n)),
:(x = ts .* map(cos,ts)),
:(y = 0.1ts .* map(sin,ts)),
:(z = 1:n),
:(plot(x, y, z, zcolor=reverse(z), m=(10,0.8,:blues,stroke(0)), leg=false, w=5)),
:(plot!(zeros(n),zeros(n),1:n, w=10))
])
]
function createStringOfMarkDownCodeValues(arr, prefix = "")
string("`", prefix, join(sort(map(string, arr)), "`, `$prefix"), "`")
end
createStringOfMarkDownSymbols(arr) = isempty(arr) ? "" : createStringOfMarkDownCodeValues(arr, ":")
function generate_markdown(pkgname::Symbol)
# set up the backend, and don't show the plots by default
pkg = backend(pkgname)
# default(:show, false)
# mkdir if necessary
try
mkdir("$IMGDIR/$pkgname")
end
# open the markdown file
md = open("$DOCDIR/$(pkgname)_examples.md", "w")
write(md, "## Examples for backend: $pkgname\n\n")
write(md, "### Initialize\n\n```julia\nusing Plots\n$(pkgname)()\n```\n\n")
for (i,example) in enumerate(examples)
try
# we want to always produce consistent results
srand(1234)
# run the code
map(eval, example.exprs)
# # save the png
# imgname = "$(pkgname)_example_$i.png"
# NOTE: uncomment this to overwrite the images as well
if i == 2
imgname = "$(pkgname)_example_$i.gif"
gif(anim, "$IMGDIR/$pkgname/$imgname", fps=15)
else
imgname = "$(pkgname)_example_$i.png"
png("$IMGDIR/$pkgname/$imgname")
end
# write out the header, description, code block, and image link
write(md, "### $(example.header)\n\n")
write(md, "$(example.desc)\n\n")
write(md, "```julia\n$(join(map(string, example.exprs), "\n"))\n```\n\n")
write(md, "![](../img/$pkgname/$imgname)\n\n")
catch ex
# TODO: put error info into markdown?
warn("Example $pkgname:$i failed with: $ex")
end
#
end
write(md, "- Supported arguments: $(createStringOfMarkDownCodeValues(supportedArgs(pkg)))\n")
write(md, "- Supported values for axis: $(createStringOfMarkDownSymbols(supportedAxes(pkg)))\n")
write(md, "- Supported values for linetype: $(createStringOfMarkDownSymbols(supportedTypes(pkg)))\n")
write(md, "- Supported values for linestyle: $(createStringOfMarkDownSymbols(supportedStyles(pkg)))\n")
write(md, "- Supported values for marker: $(createStringOfMarkDownSymbols(supportedMarkers(pkg)))\n")
write(md, "- Is `subplot`/`subplot!` supported? $(subplotSupported(pkg) ? "Yes" : "No")\n\n")
write(md, "(Automatically generated: $(now()))")
close(md)
end
# make and display one plot
function test_examples(pkgname::Symbol, idx::Int; debug = true)
Plots._debugMode.on = debug
println("Testing plot: $pkgname:$idx:$(examples[idx].header)")
backend(pkgname)
backend()
map(eval, examples[idx].exprs)
plt = current()
gui(plt)
plt
end
# generate all plots and create a dict mapping idx --> plt
function test_examples(pkgname::Symbol; debug = false)
Plots._debugMode.on = debug
plts = Dict()
for i in 1:length(examples)
# if examples[i].header == "Subplots" && !subplotSupported()
# break
# end
try
plt = test_examples(pkgname, i, debug=debug)
plts[i] = plt
catch ex
# TODO: put error info into markdown?
warn("Example $pkgname:$i:$(examples[i].header) failed with: $ex")
end
end
plts
end
# axis # :left or :right
# color # can be a string ("red") or a symbol (:red) or a ColorsTypes.jl
# # Colorant (RGB(1,0,0)) or :auto (which lets the package pick)
# label # string or symbol, applies to that line, may go in a legend
# width # width of a line
# linetype # :line, :step, :stepinverted, :sticks, :scatter, :none, :heatmap, :hexbin, :hist, :bar
# linestyle # :solid, :dash, :dot, :dashdot, :dashdotdot
# marker # :none, :ellipse, :rect, :diamond, :utriangle, :dtriangle,
# # :cross, :xcross, :star1, :star2, :hexagon
# markercolor # same choices as `color`, or :match will set the color to be the same as `color`
# markersize # size of the marker
# nbins # number of bins for heatmap/hexbin and histograms
# heatmap_c # color cutoffs for Qwt heatmaps
# fill # fill value for area plots
# title # string or symbol, title of the plot
# xlabel # string or symbol, label on the bottom (x) axis
# ylabel # string or symbol, label on the left (y) axis
# yrightlabel # string or symbol, label on the right (y) axis
# reg # true or false, add a regression line for each line
# size # (Int,Int), resize the enclosing window
# pos # (Int,Int), move the enclosing window to this position
# windowtitle # string or symbol, set the title of the enclosing windowtitle
# screen # Integer, move enclosing window to this screen number (for multiscreen desktops)
@compat const _ltdesc = Dict(
:none => "No line",
:line => "Lines with sorted x-axis",
:path => "Lines",
:steppre => "Step plot (vertical then horizontal)",
:steppost => "Step plot (horizontal then vertical)",
:sticks => "Vertical lines",
:scatter => "Points, no lines",
:heatmap => "Colored regions by density",
:hexbin => "Similar to heatmap",
:hist => "Histogram (doesn't use x)",
:bar => "Bar plot (centered on x values)",
:hline => "Horizontal line (doesn't use x)",
:vline => "Vertical line (doesn't use x)",
:ohlc => "Open/High/Low/Close chart (expects y is AbstractVector{Plots.OHLC})",
:contour => "Contour lines (uses z)",
:path3d => "3D path (uses z)",
:scatter3d => "3D scatter plot (uses z)",
)
function buildReadme()
readme = readall("$DOCDIR/readme_template.md")
# build keyword arg table
table = "Keyword | Default | Type | Aliases \n---- | ---- | ---- | ----\n"
allseries = merge(Plots._seriesDefaults, @compat(Dict(:line=>nothing, :marker=>nothing, :fill=>nothing)))
allplots = merge(Plots._plotDefaults, @compat(Dict(:xaxis=>nothing, :yaxis=>nothing)))
alldefs = merge(allseries, allplots)
for k in Plots.sortedkeys(alldefs)
# for d in (Plots._seriesDefaults, Plots._plotDefaults)
# for k in Plots.sortedkeys(d)
aliasstr = createStringOfMarkDownSymbols(aliases(Plots._keyAliases, k))
table = string(table, "`:$k` | `$(alldefs[k])` | $(haskey(allseries,k) ? "Series" : "Plot") | $aliasstr \n")
# end
end
readme = replace(readme, "[[KEYWORD_ARGS_TABLE]]", table)
# build linetypes table
table = "Type | Desc | Aliases\n---- | ---- | ----\n"
for lt in Plots._allTypes
aliasstr = createStringOfMarkDownSymbols(aliases(Plots._typeAliases, lt))
table = string(table, "`:$lt` | $(_ltdesc[lt]) | $aliasstr \n")
end
readme = replace(readme, "[[LINETYPES_TABLE]]", table)
# build linestyles table
table = "Type | Aliases\n---- | ----\n"
for s in Plots._allStyles
aliasstr = createStringOfMarkDownSymbols(aliases(Plots._styleAliases, s))
table = string(table, "`:$s` | $aliasstr \n")
end
readme = replace(readme, "[[LINESTYLES_TABLE]]", table)
# build markers table
table = "Type | Aliases\n---- | ----\n"
for s in Plots._allMarkers
aliasstr = createStringOfMarkDownSymbols(aliases(Plots._markerAliases, s))
table = string(table, "`:$s` | $aliasstr \n")
end
readme = replace(readme, "[[MARKERS_TABLE]]", table)
readme_fn = Pkg.dir("Plots") * "/README.md"
f = open(readme_fn, "w")
write(f, readme)
close(f)
gadfly()
Plots.dumpSupportGraphs()
end
default(size=(500,300))
# run it!
# note: generate separately so it's easy to comment out
# @osx_only generate_markdown(:unicodeplots)
# generate_markdown(:qwt)
# generate_markdown(:gadfly)
# generate_markdown(:pyplot)
# generate_markdown(:immerse)
# generate_markdown(:winston)
end # module
+305
View File
@@ -0,0 +1,305 @@
# Plots
[![Build Status](https://travis-ci.org/tbreloff/Plots.jl.svg?branch=master)](https://travis-ci.org/tbreloff/Plots.jl)
[![Plots](http://pkg.julialang.org/badges/Plots_0.3.svg)](http://pkg.julialang.org/?pkg=Plots&ver=0.3)
[![Plots](http://pkg.julialang.org/badges/Plots_0.4.svg)](http://pkg.julialang.org/?pkg=Plots&ver=0.4)
<!-- [![Coverage Status](https://coveralls.io/repos/tbreloff/Plots.jl/badge.svg?branch=master)](https://coveralls.io/r/tbreloff/Plots.jl?branch=master) -->
<!-- [![codecov.io](http://codecov.io/github/tbreloff/Plots.jl/coverage.svg?branch=master)](http://codecov.io/github/tbreloff/Plots.jl?branch=master) -->
#### Author: Thomas Breloff (@tbreloff)
Plots is a plotting API and toolset. My goals with the package are:
- **Intuitive**. Start generating complex plots without reading volumes of documentation. Commands should "just work".
- **Concise**. Less code means fewer mistakes and more efficient development/analysis.
- **Flexible**. Produce your favorite plots from your favorite package, but quicker and simpler.
- **Consistent**. Don't commit to one graphics package. Use the same code and access the strengths of all backends.
- **Lightweight**. Very few dependencies, since backends are loaded and initialized dynamically.
Use the preprocessing pipeline in Plots to fully describe your visualization before it calls the backend code. This maintains modularity and allows for efficient separation of front end code, algorithms, and backend graphics. New graphical backends can be added with minimal effort.
Check out the [summary graphs](img/supported/supported.md) for the features that each backend supports.
Please add wishlist items, bugs, or any other comments/questions to the issues list.
## Examples for each implemented backend:
- [Gadfly.jl/Immerse.jl](https://github.com/tbreloff/ExamplePlots.jl/tree/master/docs/gadfly_examples.md)
- [PyPlot.jl](https://github.com/tbreloff/ExamplePlots.jl/tree/master/docs/pyplot_examples.md)
- [UnicodePlots.jl](https://github.com/tbreloff/ExamplePlots.jl/tree/master/docs/unicodeplots_examples.md)
- [Qwt.jl](https://github.com/tbreloff/ExamplePlots.jl/tree/master/docs/qwt_examples.md)
Also check out the many [IJulia notebooks](http://nbviewer.ipython.org/github/tbreloff/ExamplePlots.jl/tree/master/examples/) with many examples.
## Installation
First, add the package
```julia
Pkg.add("Plots")
# if you want the latest features:
Pkg.checkout("Plots")
# or for the bleeding edge:
Pkg.checkout("Plots", "dev")
```
then get any plotting packages you need (obviously, you should get at least one backend).
```julia
Pkg.add("Gadfly")
Pkg.add("Immerse")
Pkg.add("PyPlot")
Pkg.add("UnicodePlots")
Pkg.add("Qwt")
Pkg.add("Bokeh")
```
## Use
Load it in. The underlying plotting backends are not imported until `backend()` is called (which happens
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
using Plots
```
Do a plot in Gadfly (inspired by [this example](http://gadflyjl.org/geom_point.html)), then save a png:
```julia
gadfly() # switch to Gadfly as a backend
dataframes() # turn on support for DataFrames inputs
# load some data
using RDatasets
iris = dataset("datasets", "iris");
# This will bring up a browser window with the plot. Add a semicolon at the end to skip display.
scatter(iris, :SepalLength, :SepalWidth, group=:Species, m=([:+ :d :s], 12), smooth=0.99, bg=:black)
# save a png (equivalent to png("gadfly1.png") and savefig("gadfly1.png"))
png("gadfly1")
```
![gadfly_plt](img/gadfly1.png)
## API
Call `backend(backend::Symbol)` or the shorthands (`gadfly()`, `qwt()`, `unicodeplots()`, etc) to set the current plotting backend.
Subsequent commands are converted into the relevant plotting commands for that package:
```julia
gadfly()
plot(1:10) # this effectively calls `y = 1:10; Gadfly.plot(x=1:length(y), y=y)`
qwt()
plot(1:10) # this effectively calls `Qwt.plot(1:10)`
```
Use `plot` to create a new plot object, and `plot!` to add to an existing one:
```julia
plot(args...; kw...) # creates a new plot window, and sets it to be the `current`
plot!(args...; kw...) # adds to the `current`
plot!(plotobj, args...; kw...) # adds to the plot `plotobj`
```
Now that you know which plot object you're updating (new, current, or other), I'll leave it off for simplicity.
There are many ways to pass in data to the plot functions... some examples:
- Vector-like (subtypes of AbstractArray{T,1})
- Matrix-like (subtypes of AbstractArray{T,2})
- Vectors of Vectors
- Functions
- Vectors of Functions
- DataFrames with column symbols (initialize with `dataframes()`)
In general, you can pass in a `y` only, or an `x` and `y`, both of whatever type(s) you want, and Plots will slice up the data as needed.
For matrices, data is split by columns. For functions, data is mapped. For DataFrames, a Symbol/Symbols in place of x/y will map to
the relevant column(s).
Here are some example usages... remember you can always use `plot!` to update an existing plot, and that, unless specified, you will update the `current()`.
```julia
plot() # empty plot object
plot(4) # initialize with 4 empty series
plot(rand(10)) # plot 1 series... x = 1:10
plot(rand(10,5)) # plot 5 series... x = 1:10
plot(rand(10), rand(10)) # plot 1 series
plot(rand(10,5), rand(10)) # plot 5 series... y is the same for all
plot(sin, rand(10)) # y = sin(x)
plot(rand(10), sin) # same... y = sin(x)
plot([sin,cos], 0:0.1:π) # plot 2 series, sin(x) and cos(x)
plot([sin,cos], 0, π) # plot sin and cos on the range [0, π]
plot(1:10, Any[rand(10), sin]) # plot 2 series, y = rand(10) for the first, y = sin(x) for the second... x = 1:10 for both
plot(dataset("Ecdat", "Airline"), :Cost) # plot from a DataFrame (call `dataframes()` first to import DataFrames and initialize)
```
All plot methods accept a number of keyword arguments (see the tables below), which follow some rules:
- Many arguments have aliases which are replaced during preprocessing. `c` is the same as `color`, `m` is the same as `marker`, etc. You can choose how verbose you'd like to be. (see the tables below)
- There are some special arguments (`xaxis`, `yaxis`, `line`, `marker`, `fill` and the aliases `l`, `m`, `f`) which magically set many related things at once. (see the __Tip__ below)
- If the argument is a "matrix-type", then each column will map to a series, cycling through columns if there are fewer columns than series. Anything else will apply the argument value to every series.
- Many arguments accept many different types... for example the `color` (also `markercolor`, `fillcolor`, etc) argument will accept strings or symbols with a color name, or any `Colors.Colorant`, or a `ColorScheme`, or a symbol representing a `ColorGradient`, or an AbstractVector of colors/symbols/etc...
You can update certain plot settings after plot creation (not supported on all backends):
```julia
plot!(title = "New Title", xlabel = "New xlabel", ylabel = "New ylabel")
plot!(xlims = (0, 5.5), ylims = (-2.2, 6), xticks = 0:0.5:10, yticks = [0,1,5,10])
# using shorthands:
xaxis!("mylabel", :log10, :flip)
```
With `subplot`, create multiple plots at once, with flexible layout options:
```julia
y = rand(100,3)
subplot(y; n = 3) # create an automatic grid, and let it figure out the shape
subplot(y; n = 3, nr = 1) # create an automatic grid, but fix the number of rows
subplot(y; n = 3, nc = 1) # create an automatic grid, but fix the number of columns
subplot(y; layout = [1, 2]) # explicit layout. Lists the number of plots in each row
```
__Tip__: You can call `subplot!(args...; kw...)` to add to an existing subplot.
__Tip__: Calling `subplot!` on a `Plot` object, or `plot!` on a `Subplot` object will throw an error.
Shorthands:
```julia
scatter(args...; kw...) = plot(args...; kw..., linetype = :scatter)
scatter!(args...; kw...) = plot!(args...; kw..., linetype = :scatter)
bar(args...; kw...) = plot(args...; kw..., linetype = :bar)
bar!(args...; kw...) = plot!(args...; kw..., linetype = :bar)
histogram(args...; kw...) = plot(args...; kw..., linetype = :hist)
histogram!(args...; kw...) = plot!(args...; kw..., linetype = :hist)
heatmap(args...; kw...) = plot(args...; kw..., linetype = :heatmap)
heatmap!(args...; kw...) = plot!(args...; kw..., linetype = :heatmap)
sticks(args...; kw...) = plot(args...; kw..., linetype = :sticks, marker = :ellipse)
sticks!(args...; kw...) = plot!(args...; kw..., linetype = :sticks, marker = :ellipse)
hline(args...; kw...) = plot(args...; kw..., linetype = :hline)
hline!(args...; kw...) = plot!(args...; kw..., linetype = :hline)
vline(args...; kw...) = plot(args...; kw..., linetype = :vline)
vline!(args...; kw...) = plot!(args...; kw..., linetype = :vline)
ohlc(args...; kw...) = plot(args...; kw..., linetype = :ohlc)
ohlc!(args...; kw...) = plot!(args...; kw..., linetype = :ohlc)
title!(s::AbstractString) = plot!(title = s)
xlabel!(s::AbstractString) = plot!(xlabel = s)
ylabel!(s::AbstractString) = plot!(ylabel = s)
xlims!{T<:Real,S<:Real}(lims::Tuple{T,S}) = plot!(xlims = lims)
ylims!{T<:Real,S<:Real}(lims::Tuple{T,S}) = plot!(ylims = lims)
xticks!{T<:Real}(v::AVec{T}) = plot!(xticks = v)
yticks!{T<:Real}(v::AVec{T}) = plot!(yticks = v)
xflip!(flip::Bool = true) = plot!(xflip = flip)
yflip!(flip::Bool = true) = plot!(yflip = flip)
xaxis!(args...) = plot!(xaxis = args)
yaxis!(args...) = plot!(yaxis = args)
annotate!(anns) = plot!(annotation = anns)
```
### Keyword arguments:
[[KEYWORD_ARGS_TABLE]]
### Plot types:
[[LINETYPES_TABLE]]
### Line styles:
[[LINESTYLES_TABLE]]
### Markers:
[[MARKERS_TABLE]]
__Tip__: With supported backends, you can pass a `Plots.Shape` object for the `marker`/`markershape` arguments. `Shape` takes a vector of 2-tuples in the constructor, defining the points of the polygon's shape in a unit-scaled coordinate space. To make a square, for example, you could do `Shape([(1,1),(1,-1),(-1,-1),(-1,1)])`
__Tip__: You can see the default value for a given argument with `default(arg::Symbol)`, and set the default value with `default(arg::Symbol, value)` or `default(; kw...)`. For example set the default window size and whether we should show a legend with `default(size=(600,400), leg=false)`.
__Tip__: There are some helper arguments you can set: `xaxis`, `yaxis`, `line`, `marker`, `fill`. These go through special preprocessing to extract values into individual arguments. The order doesn't matter, and if you pass a single value it's equivalent to wrapping it in a Tuple. Examples:
```
plot(y, xaxis = ("mylabel", :log, :flip, (-1,1))) # this sets the `xlabel`, `xscale`, `xflip`, and `xlims` arguments automatically
plot(y, line = (:bar, :blue, :dot, 10)) # this sets the `linetype`, `color`, `linestyle`, and `linewidth` arguments automatically
plot(y, marker = (:rect, :red, 10)) # this sets the `markershape`, `markercolor`, and `markersize` arguments automatically
plot(y, fill = (:green, 10)) # this sets the `fillcolor` and `fillrange` arguments automatically
# Note: `fillrange` can be:
a number (fill to horizontal line)
a vector of numbers (different for each data point)
a tuple of vectors (fill a band)
```
__Tip__: When plotting multiple lines, you can set all series to use the same value, or pass in a matrix to cycle through values. Example:
```julia
plot(rand(100,4); color = [:red RGB(0,0,1)], # (Matrix) lines 1 and 3 are red, lines 2 and 4 are blue
axis = :auto, # lines 1 and 3 are on the left axis, lines 2 and 4 are on the right
markershape = [:rect, :star] # (Vector) ALL lines are passed the vector [:rect, :star1]
width = 5) # all lines have a width of 5
```
__Tip__: Not all features are supported for each backend, but you can see what's supported by calling the functions: `supportedArgs()`, `supportedAxes()`, `supportedTypes()`, `supportedStyles()`, `supportedMarkers()`, `subplotSupported()`
__Tip__: Call `gui()` to display the plot in a window. Interactivity depends on backend. Plotting at the REPL (without semicolon) implicitly calls `gui()`.
### Animations
Animations are created in 3 steps (see example #2):
- Initialize an `Animation` object.
- Save each frame of the animation with `frame(anim)`.
- Convert the frames to an animated gif with `gif(anim, filename, fps=15)`
## TODO features:
- [x] Plot vectors/matrices/functions
- [x] Plot DataFrames
- [x] Histograms
- [x] Grouping
- [x] Annotations
- [x] Scales
- [x] Categorical Inputs (strings, etc... for hist, bar? or can split one series into multiple?)
- [x] Custom markers
- [x] Animations
- [x] Subplots
- [ ] Contours
- [ ] Boxplots
- [ ] 3D plotting
- [ ] Scenes/Drawing
- [ ] Graphs
- [ ] Interactivity (GUIs)
## TODO backends:
- [x] Gadfly.jl
- [x] Immerse.jl
- [x] PyPlot.jl
- [x] UnicodePlots.jl
- [x] Qwt.jl
- [x] Winston.jl (deprecated)
- [ ] GLPlot.jl
- [ ] Bokeh.jl
- [ ] Vega.jl
- [ ] Gaston.jl
- [ ] Plotly.jl
- [ ] GoogleCharts.jl
- [ ] PLplot.jl
- [ ] TextPlots.jl
- [ ] ASCIIPlots.jl
- [ ] Sparklines.jl
- [ ] Hinton.jl
- [ ] ImageTerm.jl
- [ ] GraphViz.jl
- [ ] TikzGraphs.jl
- [ ] GraphLayout.jl
## More information on backends (both supported and unsupported)
See the wiki at: https://github.com/JuliaPlot/juliaplot_docs/wiki
Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

+23
View File
@@ -0,0 +1,23 @@
## Supported keyword arguments
![args](Plots.supportGraphArgs.png)
## Supported plot types
![types](Plots.supportGraphTypes.png)
## Supported markers
![markers](Plots.supportGraphMarkers.png)
## Supported line styles
![styles](Plots.supportGraphStyles.png)
## Supported scales
![scales](Plots.supportGraphScales.png)
## Supported axes
![axes](Plots.supportGraphAxes.png)
+333
View File
@@ -0,0 +1,333 @@
immutable GadflyPackage <: PlottingPackage end
immutable ImmersePackage <: PlottingPackage end
immutable PyPlotPackage <: PlottingPackage end
immutable QwtPackage <: PlottingPackage end
immutable UnicodePlotsPackage <: PlottingPackage end
immutable WinstonPackage <: PlottingPackage end
immutable BokehPackage <: PlottingPackage end
immutable PlotlyPackage <: PlottingPackage end
immutable GRPackage <: PlottingPackage end
immutable GLVisualizePackage <: PlottingPackage end
immutable NoPackage <: PlottingPackage end
typealias GadflyOrImmerse @compat(Union{GadflyPackage, ImmersePackage})
export
gadfly,
immerse,
pyplot,
qwt,
unicodeplots,
bokeh,
plotly,
gr,
glvisualize
# winston
gadfly(; kw...) = (default(; kw...); backend(:gadfly))
immerse(; kw...) = (default(; kw...); backend(:immerse))
pyplot(; kw...) = (default(; kw...); backend(:pyplot))
qwt(; kw...) = (default(; kw...); backend(:qwt))
unicodeplots(; kw...) = (default(; kw...); backend(:unicodeplots))
bokeh(; kw...) = (default(; kw...); backend(:bokeh))
plotly(; kw...) = (default(; kw...); backend(:plotly))
gr(; kw...) = (default(; kw...); backend(:gr))
glvisualize(; kw...) = (default(; kw...); backend(:glvisualize))
# winston(; kw...) = (default(; kw...); backend(:winston))
backend_name(::GadflyPackage) = :gadfly
backend_name(::ImmersePackage) = :immerse
backend_name(::PyPlotPackage) = :pyplot
backend_name(::UnicodePlotsPackage) = :unicodeplots
backend_name(::QwtPackage) = :qwt
backend_name(::BokehPackage) = :bokeh
backend_name(::PlotlyPackage) = :plotly
backend_name(::GRPackage) = :gr
backend_name(::GLVisualizePackage) = :glvisualize
backend_name(::NoPackage) = :none
include("backends/supported.jl")
include("backends/qwt.jl")
include("backends/gadfly.jl")
include("backends/unicodeplots.jl")
include("backends/pyplot.jl")
include("backends/immerse.jl")
include("backends/winston.jl")
include("backends/web.jl")
include("backends/bokeh.jl")
include("backends/plotly.jl")
include("backends/gr.jl")
include("backends/glvisualize.jl")
# ---------------------------------------------------------
plot(pkg::PlottingPackage; kw...) = error("plot($pkg; kw...) is not implemented")
plot!(pkg::PlottingPackage, plt::Plot; kw...) = error("plot!($pkg, plt; kw...) is not implemented")
_update_plot(pkg::PlottingPackage, plt::Plot, d::Dict) = error("_update_plot($pkg, plt, d) is not implemented")
# Base.display(pkg::PlottingPackage, plt::Plot) = error("display($pkg, plt) is not implemented")
_update_plot_pos_size{P<:PlottingPackage}(plt::PlottingObject{P}, d::Dict) = nothing #error("_update_plot_pos_size(plt,d) is not implemented for $P")
subplot(pkg::PlottingPackage; kw...) = error("subplot($pkg; kw...) is not implemented")
subplot!(pkg::PlottingPackage, subplt::Subplot; kw...) = error("subplot!($pkg, subplt; kw...) is not implemented")
# Base.display(pkg::PlottingPackage, subplt::Subplot) = error("display($pkg, subplt) is not implemented")
# ---------------------------------------------------------
const BACKENDS = [:qwt, :gadfly, :unicodeplots, :pyplot, :immerse, :bokeh, :plotly, :gr]
const _initialized_backends = Set{Symbol}()
backends() = BACKENDS
function _backend_instance(sym::Symbol)
sym == :qwt && return QwtPackage()
sym == :gadfly && return GadflyPackage()
sym == :unicodeplots && return UnicodePlotsPackage()
sym == :pyplot && return PyPlotPackage()
sym == :immerse && return ImmersePackage()
sym == :winston && return WinstonPackage()
sym == :bokeh && return BokehPackage()
sym == :plotly && return PlotlyPackage()
sym == :gr && return GRPackage()
sym == :glvisualize && return GLVisualizePackage()
sym == :none && return NoPackage()
error("Unsupported backend $sym")
end
type CurrentBackend
sym::Symbol
pkg::PlottingPackage
end
CurrentBackend(sym::Symbol) = CurrentBackend(sym, _backend_instance(sym))
# ---------------------------------------------------------
function pickDefaultBackend()
for pkgstr in ("PyPlot", "Immerse", "Qwt", "Gadfly", "GR", "UnicodePlots", "Bokeh", "GLVisualize")
if Pkg.installed(pkgstr) != nothing
return backend(symbol(lowercase(pkgstr)))
end
end
backend(:plotly)
end
# ---------------------------------------------------------
"""
Returns the current plotting package name. Initializes package on first call.
"""
function backend()
global CURRENT_BACKEND
if CURRENT_BACKEND.sym == :none
pickDefaultBackend()
end
currentBackendSymbol = CURRENT_BACKEND.sym
if !(currentBackendSymbol in _initialized_backends)
# initialize
println("[Plots.jl] Initializing backend: ", CURRENT_BACKEND.sym)
if currentBackendSymbol == :qwt
try
@eval import Qwt
@eval export Qwt
catch err
warn("Couldn't import Qwt. Install it with: Pkg.clone(\"https://github.com/tbreloff/Qwt.jl.git\")\n (Note: also requires pyqt and pyqwt).")
rethrow(err)
end
elseif currentBackendSymbol == :gadfly
try
@eval import Gadfly, Compose
@eval export Gadfly, Compose
@eval include(joinpath(Pkg.dir("Plots"), "src", "backends", "gadfly_shapes.jl"))
catch err
warn("Couldn't import Gadfly. Install it with: Pkg.add(\"Gadfly\").")
rethrow(err)
end
elseif currentBackendSymbol == :unicodeplots
try
@eval import UnicodePlots
@eval export UnicodePlots
catch err
warn("Couldn't import UnicodePlots. Install it with: Pkg.add(\"UnicodePlots\").")
rethrow(err)
end
elseif currentBackendSymbol == :pyplot
try
@eval import PyPlot
@eval export PyPlot
@eval const pycolors = PyPlot.pywrap(PyPlot.pyimport("matplotlib.colors"))
@eval const pypath = PyPlot.pywrap(PyPlot.pyimport("matplotlib.path"))
@eval const mplot3d = PyPlot.pywrap(PyPlot.pyimport("mpl_toolkits.mplot3d"))
# @eval const pycolorbar = PyPlot.pywrap(PyPlot.pyimport("matplotlib.colorbar"))
if !isa(Base.Multimedia.displays[end], Base.REPL.REPLDisplay)
PyPlot.ioff() # stops wierd behavior of displaying incomplete graphs in IJulia
# # TODO: how the hell can I use PyQt4??
# "pyqt4"=>:qt_pyqt4
# PyPlot.backend[1] = "pyqt4"
# PyPlot.gui[1] = :qt_pyqt4
# PyPlot.switch_backend("Qt4Agg")
# only turn on the gui if we want it
if PyPlot.gui != :none
PyPlot.pygui(true)
end
end
catch err
warn("Couldn't import PyPlot. Install it with: Pkg.add(\"PyPlot\").")
rethrow(err)
end
elseif currentBackendSymbol == :immerse
try
@eval import Immerse, Gadfly, Compose, Gtk
@eval export Immerse, Gadfly, Compose, Gtk
@eval include(joinpath(Pkg.dir("Plots"), "src", "backends", "gadfly_shapes.jl"))
catch err
# error("Couldn't import Immerse. Install it with: Pkg.add(\"Immerse\").\n Error: ", err)
warn("Couldn't import Immerse. Install it with: Pkg.add(\"Immerse\").")
rethrow(err)
end
elseif currentBackendSymbol == :bokeh
try
@eval import Bokeh
@eval export Bokeh
catch err
warn("Couldn't import Bokeh. Install it with: Pkg.add(\"Bokeh\").")
rethrow(err)
end
elseif currentBackendSymbol == :plotly
try
@eval begin
import JSON
JSON._print(io::IO, state::JSON.State, dt::Union{Date,DateTime}) = print(io, '"', dt, '"')
############################
# borrowed from https://github.com/spencerlyon2/Plotlyjs.jl/blob/master/src/display.jl
_js_path = joinpath(Pkg.dir("Plots"), "deps", "plotly-latest.min.js")
# if we're in IJulia call setupnotebook to load js and css
if isijulia()
# the first script is some hack I needed to do in order for the notebook
# to not complain about Plotly being undefined
display("text/html", """
<script type="text/javascript">
require=requirejs=define=undefined;
</script>
<script type="text/javascript">
$(open(readall, _js_path, "r"))
</script>
""")
# display("text/html", "<p>Plotly javascript loaded.</p>")
end
# end borrowing (thanks :)
###########################
try
include(joinpath(Pkg.dir("Plots"), "src", "backends", "plotly_blink.jl"))
catch err
warn("Error including PlotlyJS: $err\n Note: Will fall back to built-in display.")
end
end
catch err
warn("Couldn't setup Plotly")
rethrow(err)
end
elseif currentBackendSymbol == :gr
try
@eval import GR
catch err
warn("Couldn't import GR. Install it with: Pkg.add(\"GR\").")
end
elseif currentBackendSymbol == :glvisualize
try
@eval import GLVisualize
@eval export GLVisualize
catch err
warn("Couldn't setup GLVisualize")
rethrow(err)
end
elseif currentBackendSymbol == :winston
warn("Winston support is deprecated and broken. Try another backend: $BACKENDS")
try
@eval ENV["WINSTON_OUTPUT"] = "gtk"
@eval import Winston, Gtk
@eval export Winston, Gtk
catch err
warn("Couldn't import Winston. Install it with: Pkg.add(\"Winston\").")
rethrow(err)
end
else
error("Unknown backend $currentBackendSymbol. Choose from: $BACKENDS")
end
push!(_initialized_backends, currentBackendSymbol)
end
CURRENT_BACKEND.pkg
end
"""
Set the plot backend. Choose from: :qwt, :gadfly, :unicodeplots, :immerse, :pyplot
"""
function backend(pkg::PlottingPackage)
CURRENT_BACKEND.sym = backend_name(pkg)
CURRENT_BACKEND.pkg = pkg
end
function backend(modname)
# set the PlottingPackage
if modname == :qwt
CURRENT_BACKEND.pkg = QwtPackage()
elseif modname == :gadfly
CURRENT_BACKEND.pkg = GadflyPackage()
elseif modname == :unicodeplots
CURRENT_BACKEND.pkg = UnicodePlotsPackage()
elseif modname == :pyplot
CURRENT_BACKEND.pkg = PyPlotPackage()
elseif modname == :immerse
CURRENT_BACKEND.pkg = ImmersePackage()
elseif modname == :winston
CURRENT_BACKEND.pkg = WinstonPackage()
elseif modname == :bokeh
CURRENT_BACKEND.pkg = BokehPackage()
elseif modname == :plotly
CURRENT_BACKEND.pkg = PlotlyPackage()
elseif modname == :gr
CURRENT_BACKEND.pkg = GRPackage()
elseif modname == :glvisualize
CURRENT_BACKEND.pkg = GLVisualizePackage()
else
error("Unknown backend $modname. Choose from: $BACKENDS")
end
# update the symbol
CURRENT_BACKEND.sym = modname
# println("[Plots.jl] Switched to backend: ", modname)
# return the package
CURRENT_BACKEND.pkg
end
Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Vendored Executable
+41
View File
File diff suppressed because one or more lines are too long
-198
View File
@@ -1,198 +0,0 @@
module PlotExamples
using Plots
using Colors
const DOCDIR = Pkg.dir("Plots") * "/docs"
const IMGDIR = Pkg.dir("Plots") * "/img"
doc"""
Holds all data needed for a documentation example... header, description, and plotting expression (Expr)
"""
type PlotExample
header::String
desc::String
exprs::Vector{Expr}
end
# the examples we'll run for each
const examples = PlotExample[
PlotExample("Lines",
"A simple line plot of the 3 columns.",
[:(plot(rand(100,3)))]),
PlotExample("Functions",
"Plot multiple functions. You can also put the function first.",
[:(plot(0:0.01:4π, [sin,cos]))]),
PlotExample("",
"You can also call it with plot(f, xmin, xmax).",
[:(plot([sin,cos], 0, 4π))]),
PlotExample("",
"Or make a parametric plot (i.e. plot: (fx(u), fy(u))) with plot(fx, fy, umin, umax).",
[:(plot(sin, x->sin(2x), 0, 2π, legend=false))]),
PlotExample("Global",
"Change the guides/background without a separate call.",
[:(plot(rand(10); title="TITLE", xlabel="XLABEL", ylabel="YLABEL", background_color = RGB(0.5,0.5,0.5)))]),
PlotExample("Two-axis",
"Use the `axis` or `axiss` arguments.\n\nNote: Currently only supported with Qwt and PyPlot",
[:(plot(Vector[randn(100), randn(100)*100]; axiss = [:left,:right], ylabel="LEFT", yrightlabel="RIGHT"))]),
PlotExample("Vectors w/ pluralized args",
"Plot multiple series with different numbers of points. Mix arguments that apply to all series (singular... see `marker`) with arguments unique to each series (pluralized... see `colors`).",
[:(plot(Vector[rand(10), rand(20)]; marker=:ellipse, markersize=8, colors=[:red,:blue]))]),
PlotExample("Build plot in pieces",
"Start with a base plot...",
[:(plot(rand(100)/3; reg=true, fillto=0))]),
PlotExample("",
"and add to it later.",
[:(scatter!(rand(100); markersize=6, color=:blue))]),
PlotExample("Heatmaps",
"",
[:(heatmap(randn(10000),randn(10000); nbins=100))]),
PlotExample("Line types",
"",
[:(types = intersect(supportedTypes(), [:line, :step, :stepinverted, :sticks, :scatter])),
:(n = length(types)),
:(x = Vector[sort(rand(20)) for i in 1:n]),
:(y = rand(20,n)),
:(plot(x, y; linetypes=types, labels=map(string,types)))]),
PlotExample("Line styles",
"",
[:(styles = setdiff(supportedStyles(), [:auto])), :(plot(rand(20,length(styles)); linestyle=:auto, labels=map(string,styles)))]),
PlotExample("Marker types",
"",
[:(markers = setdiff(supportedMarkers(), [:none,:auto])), :(scatter(0.5:9.5, [fill(i-0.5,10) for i=length(markers):-1:1]; marker=:auto, labels=map(string,markers), markersize=10))]),
PlotExample("Bar",
"x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)",
[:(bar(randn(1000)))]),
PlotExample("Histogram",
"note: fillto isn't supported on all backends",
[:(histogram(randn(1000); nbins=50, fillto=20))]),
PlotExample("Subplots",
"""
subplot and subplot! are distinct commands which create many plots and add series to them in a circular fashion.
You can define the layout with keyword params... either set the number of plots `n` (and optionally number of rows `nr` or
number of columns `nc`), or you can set the layout directly with `layout`.
Note: Gadfly is not very friendly here, and although you can create a plot and save a PNG, I haven't been able to actually display it.
""",
[:(subplot(randn(100,5); layout=[1,1,3], linetypes=[:line,:hist,:scatter,:step,:bar], nbins=10, legend=false))]),
PlotExample("Adding to subplots",
"Note here the automatic grid layout, as well as the order in which new series are added to the plots.",
[:(subplot(randn(100,5); n=4))]),
PlotExample("",
"",
[:(subplot!(randn(100,3)))]),
PlotExample("Open/High/Low/Close",
"Create an OHLC chart. Pass in a vector of 4-tuples as your `y` argument. Adjust the tick width with arg `markersize`.",
[:(n=20), :(hgt=rand(n)+1), :(bot=randn(n)), :(openpct=rand(n)), :(closepct=rand(n)), :(y = [(openpct[i]*hgt[i]+bot[i], bot[i]+hgt[i], bot[i], closepct[i]*hgt[i]+bot[i]) for i in 1:n]), :(ohlc(y; markersize=8))]),
]
function createStringOfMarkDownCodeValues(arr, prefix = "")
string("`", prefix, join(arr, "`, `$prefix"), "`")
end
createStringOfMarkDownSymbols(arr) = createStringOfMarkDownCodeValues(arr, ":")
function generate_markdown(pkgname::Symbol)
# set up the plotter, and don't show the plots by default
pkg = plotter!(pkgname)
# plotDefault!(:show, false)
# mkdir if necessary
try
mkdir("$IMGDIR/$pkgname")
end
# open the markdown file
md = open("$DOCDIR/$(pkgname)_examples.md", "w")
write(md, "# Examples for backend: $pkgname\n\n")
write(md, "- Supported arguments: $(createStringOfMarkDownCodeValues(supportedArgs(pkg)))\n")
write(md, "- Supported values for axis: $(createStringOfMarkDownSymbols(supportedAxes(pkg)))\n")
write(md, "- Supported values for linetype: $(createStringOfMarkDownSymbols(supportedTypes(pkg)))\n")
write(md, "- Supported values for linestyle: $(createStringOfMarkDownSymbols(supportedStyles(pkg)))\n")
write(md, "- Supported values for marker: $(createStringOfMarkDownSymbols(supportedMarkers(pkg)))\n")
write(md, "- Is `subplot`/`subplot!` supported? $(subplotSupported(pkg) ? "Yes" : "No")\n\n")
write(md, "### Initialize\n\n```julia\nusing Plots\n$(pkgname)!()\n```\n\n")
for (i,example) in enumerate(examples)
try
# run the code
map(eval, example.exprs)
# save the png
imgname = "$(pkgname)_example_$i.png"
# NOTE: uncomment this to overwrite the images as well
# savepng("$IMGDIR/$pkgname/$imgname")
# write out the header, description, code block, and image link
write(md, "### $(example.header)\n\n")
write(md, "$(example.desc)\n\n")
write(md, "```julia\n$(join(map(string, example.exprs), "\n"))\n```\n\n")
write(md, "![](../img/$pkgname/$imgname)\n\n")
catch ex
# TODO: put error info into markdown?
warn("Example $pkgname:$i failed with: $ex")
end
#
end
close(md)
end
# make and display one plot
function test_example(pkgname::Symbol, idx::Int)
println("Testing plot: $pkgname:$idx:$(examples[idx].header)")
plotter!(pkgname)
plotter()
map(eval, examples[idx].exprs)
plt = currentPlot()
display(plt)
plt
end
# generate all plots and create a dict mapping idx --> plt
function test_all_examples(pkgname::Symbol)
plts = Dict()
for i in 1:length(examples)
if examples[i].header == "Subplots" && !subplotSupported()
break
end
try
plt = test_example(pkgname, i)
plts[i] = plt
catch ex
# TODO: put error info into markdown?
warn("Example $pkgname:$i:$(examples[i].header) failed with: $ex")
end
end
plts
end
# run it!
# note: generate separately so it's easy to comment out
# @osx_only generate_markdown(:unicodeplots)
# generate_markdown(:qwt)
# generate_markdown(:gadfly)
# generate_markdown(:pyplot)
# generate_markdown(:immerse)
# generate_markdown(:winston)
end # module
-227
View File
@@ -1,227 +0,0 @@
# Examples for backend: gadfly
- Supported arguments: `args`, `axis`, `color`, `kwargs`, `label`, `legend`, `linestyle`, `linetype`, `marker`, `markercolor`, `markersize`, `nbins`, `reg`, `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`, `:hline`, `:vline`, `:ohlc`
- Supported values for linestyle: `:auto`, `:solid`
- Supported values for marker: `:none`, `:auto`, `:rect`, `:ellipse`, `:diamond`, `:utriangle`, `:dtriangle`, `:cross`, `:xcross`, `:star1`, `:star2`, `:hexagon`
- Is `subplot`/`subplot!` supported? Yes
### Initialize
```julia
using Plots
gadfly!()
```
### Lines
A simple line plot of the 3 columns.
```julia
plot(rand(100,3))
```
![](../img/gadfly/gadfly_example_1.png)
### Functions
Plot multiple functions. You can also put the function first.
```julia
plot(0:0.01:4π,[sin,cos])
```
![](../img/gadfly/gadfly_example_2.png)
###
You can also call it with plot(f, xmin, xmax).
```julia
plot([sin,cos],0,4π)
```
![](../img/gadfly/gadfly_example_3.png)
###
Or make a parametric plot (i.e. plot: (fx(u), fy(u))) with plot(fx, fy, umin, umax).
```julia
plot(sin,(x->begin # /home/tom/.julia/v0.4/Plots/docs/example_generation.jl, line 33:
sin(2x)
end),0,2π,legend=false)
```
![](../img/gadfly/gadfly_example_4.png)
### Global
Change the guides/background without a separate call.
```julia
plot(rand(10); title="TITLE",xlabel="XLABEL",ylabel="YLABEL",background_color=RGB(0.5,0.5,0.5))
```
![](../img/gadfly/gadfly_example_5.png)
### Two-axis
Use the `axis` or `axiss` arguments.
Note: Currently only supported with Qwt and PyPlot
```julia
plot(Vector[randn(100),randn(100) * 100]; axiss=[:left,:right],ylabel="LEFT",yrightlabel="RIGHT")
```
![](../img/gadfly/gadfly_example_6.png)
### Vectors w/ pluralized args
Plot multiple series with different numbers of points. Mix arguments that apply to all series (singular... see `marker`) with arguments unique to each series (pluralized... see `colors`).
```julia
plot(Vector[rand(10),rand(20)]; marker=:ellipse,markersize=8,colors=[:red,:blue])
```
![](../img/gadfly/gadfly_example_7.png)
### Build plot in pieces
Start with a base plot...
```julia
plot(rand(100) / 3; reg=true,fillto=0)
```
![](../img/gadfly/gadfly_example_8.png)
###
and add to it later.
```julia
scatter!(rand(100); markersize=6,color=:blue)
```
![](../img/gadfly/gadfly_example_9.png)
### Heatmaps
```julia
heatmap(randn(10000),randn(10000); nbins=100)
```
![](../img/gadfly/gadfly_example_10.png)
### Line types
```julia
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))
```
![](../img/gadfly/gadfly_example_11.png)
### Line styles
```julia
styles = setdiff(supportedStyles(),[:auto])
plot(rand(20,length(styles)); linestyle=:auto,labels=map(string,styles))
```
![](../img/gadfly/gadfly_example_12.png)
### Marker types
```julia
markers = setdiff(supportedMarkers(),[:none,:auto])
scatter(0.5:9.5,[fill(i - 0.5,10) for i = length(markers):-1:1]; marker=:auto,labels=map(string,markers),markersize=10)
```
![](../img/gadfly/gadfly_example_13.png)
### Bar
x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)
```julia
bar(randn(1000))
```
![](../img/gadfly/gadfly_example_14.png)
### Histogram
note: fillto isn't supported on all backends
```julia
histogram(randn(1000); nbins=50,fillto=20)
```
![](../img/gadfly/gadfly_example_15.png)
### Subplots
subplot and subplot! are distinct commands which create many plots and add series to them in a circular fashion.
You can define the layout with keyword params... either set the number of plots `n` (and optionally number of rows `nr` or
number of columns `nc`), or you can set the layout directly with `layout`.
Note: Gadfly is not very friendly here, and although you can create a plot and save a PNG, I haven't been able to actually display it.
```julia
subplot(randn(100,5); layout=[1,1,3],linetypes=[:line,:hist,:scatter,:step,:bar],nbins=10,legend=false)
```
![](../img/gadfly/gadfly_example_16.png)
### Adding to subplots
Note here the automatic grid layout, as well as the order in which new series are added to the plots.
```julia
subplot(randn(100,5); n=4)
```
![](../img/gadfly/gadfly_example_17.png)
###
```julia
subplot!(randn(100,3))
```
![](../img/gadfly/gadfly_example_18.png)
### Open/High/Low/Close
Create an OHLC chart. Pass in a vector of 4-tuples as your `y` argument. Adjust the tick width with arg `markersize`.
```julia
n = 20
hgt = rand(n) + 1
bot = randn(n)
openpct = rand(n)
closepct = rand(n)
y = [(openpct[i] * hgt[i] + bot[i],bot[i] + hgt[i],bot[i],closepct[i] * hgt[i] + bot[i]) for i = 1:n]
ohlc(y; markersize=8)
```
![](../img/gadfly/gadfly_example_19.png)
-227
View File
@@ -1,227 +0,0 @@
# Examples for backend: immerse
- Supported arguments: `args`, `axis`, `color`, `kwargs`, `label`, `legend`, `linestyle`, `linetype`, `marker`, `markercolor`, `markersize`, `nbins`, `reg`, `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`, `:hline`, `:vline`, `:ohlc`
- Supported values for linestyle: `:auto`, `:solid`
- Supported values for marker: `:none`, `:auto`, `:rect`, `:ellipse`, `:diamond`, `:utriangle`, `:dtriangle`, `:cross`, `:xcross`, `:star1`, `:star2`, `:hexagon`
- Is `subplot`/`subplot!` supported? Yes
### Initialize
```julia
using Plots
immerse!()
```
### Lines
A simple line plot of the 3 columns.
```julia
plot(rand(100,3))
```
![](../img/immerse/immerse_example_1.png)
### Functions
Plot multiple functions. You can also put the function first.
```julia
plot(0:0.01:4π,[sin,cos])
```
![](../img/immerse/immerse_example_2.png)
###
You can also call it with plot(f, xmin, xmax).
```julia
plot([sin,cos],0,4π)
```
![](../img/immerse/immerse_example_3.png)
###
Or make a parametric plot (i.e. plot: (fx(u), fy(u))) with plot(fx, fy, umin, umax).
```julia
plot(sin,(x->begin # /home/tom/.julia/v0.4/Plots/docs/example_generation.jl, line 33:
sin(2x)
end),0,2π,legend=false)
```
![](../img/immerse/immerse_example_4.png)
### Global
Change the guides/background without a separate call.
```julia
plot(rand(10); title="TITLE",xlabel="XLABEL",ylabel="YLABEL",background_color=RGB(0.5,0.5,0.5))
```
![](../img/immerse/immerse_example_5.png)
### Two-axis
Use the `axis` or `axiss` arguments.
Note: Currently only supported with Qwt and PyPlot
```julia
plot(Vector[randn(100),randn(100) * 100]; axiss=[:left,:right],ylabel="LEFT",yrightlabel="RIGHT")
```
![](../img/immerse/immerse_example_6.png)
### Vectors w/ pluralized args
Plot multiple series with different numbers of points. Mix arguments that apply to all series (singular... see `marker`) with arguments unique to each series (pluralized... see `colors`).
```julia
plot(Vector[rand(10),rand(20)]; marker=:ellipse,markersize=8,colors=[:red,:blue])
```
![](../img/immerse/immerse_example_7.png)
### Build plot in pieces
Start with a base plot...
```julia
plot(rand(100) / 3; reg=true,fillto=0)
```
![](../img/immerse/immerse_example_8.png)
###
and add to it later.
```julia
scatter!(rand(100); markersize=6,color=:blue)
```
![](../img/immerse/immerse_example_9.png)
### Heatmaps
```julia
heatmap(randn(10000),randn(10000); nbins=100)
```
![](../img/immerse/immerse_example_10.png)
### Line types
```julia
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))
```
![](../img/immerse/immerse_example_11.png)
### Line styles
```julia
styles = setdiff(supportedStyles(),[:auto])
plot(rand(20,length(styles)); linestyle=:auto,labels=map(string,styles))
```
![](../img/immerse/immerse_example_12.png)
### Marker types
```julia
markers = setdiff(supportedMarkers(),[:none,:auto])
scatter(0.5:9.5,[fill(i - 0.5,10) for i = length(markers):-1:1]; marker=:auto,labels=map(string,markers),markersize=10)
```
![](../img/immerse/immerse_example_13.png)
### Bar
x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)
```julia
bar(randn(1000))
```
![](../img/immerse/immerse_example_14.png)
### Histogram
note: fillto isn't supported on all backends
```julia
histogram(randn(1000); nbins=50,fillto=20)
```
![](../img/immerse/immerse_example_15.png)
### Subplots
subplot and subplot! are distinct commands which create many plots and add series to them in a circular fashion.
You can define the layout with keyword params... either set the number of plots `n` (and optionally number of rows `nr` or
number of columns `nc`), or you can set the layout directly with `layout`.
Note: Gadfly is not very friendly here, and although you can create a plot and save a PNG, I haven't been able to actually display it.
```julia
subplot(randn(100,5); layout=[1,1,3],linetypes=[:line,:hist,:scatter,:step,:bar],nbins=10,legend=false)
```
![](../img/immerse/immerse_example_16.png)
### Adding to subplots
Note here the automatic grid layout, as well as the order in which new series are added to the plots.
```julia
subplot(randn(100,5); n=4)
```
![](../img/immerse/immerse_example_17.png)
###
```julia
subplot!(randn(100,3))
```
![](../img/immerse/immerse_example_18.png)
### Open/High/Low/Close
Create an OHLC chart. Pass in a vector of 4-tuples as your `y` argument. Adjust the tick width with arg `markersize`.
```julia
n = 20
hgt = rand(n) + 1
bot = randn(n)
openpct = rand(n)
closepct = rand(n)
y = [(openpct[i] * hgt[i] + bot[i],bot[i] + hgt[i],bot[i],closepct[i] * hgt[i] + bot[i]) for i = 1:n]
ohlc(y; markersize=8)
```
![](../img/immerse/immerse_example_19.png)
-176
View File
@@ -1,176 +0,0 @@
# Examples for backend: pyplot
- 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`, `:right`
- Supported values for linetype: `:none`, `:line`, `:step`, `:stepinverted`, `:sticks`, `:scatter`, `:heatmap`, `:hexbin`, `:hist`, `:bar`
- Supported values for linestyle: `:auto`, `:solid`, `:dash`, `:dot`, `:dashdot`
- Supported values for marker: `:none`, `:auto`, `:rect`, `:ellipse`, `:diamond`, `:utriangle`, `:dtriangle`, `:cross`, `:xcross`, `:star1`, `:hexagon`
- Is `subplot`/`subplot!` supported? No
### Initialize
```julia
using Plots
pyplot!()
```
### Lines
A simple line plot of the 3 columns.
```julia
plot(rand(100,3))
```
![](../img/pyplot/pyplot_example_1.png)
### Functions
Plot multiple functions. You can also put the function first.
```julia
plot(0:0.01:4π,[sin,cos])
```
![](../img/pyplot/pyplot_example_2.png)
###
You can also call it with plot(f, xmin, xmax).
```julia
plot([sin,cos],0,4π)
```
![](../img/pyplot/pyplot_example_3.png)
###
Or make a parametric plot (i.e. plot: (fx(u), fy(u))) with plot(fx, fy, umin, umax).
```julia
plot(sin,(x->begin # /home/tom/.julia/v0.4/Plots/docs/example_generation.jl, line 33:
sin(2x)
end),0,2π,legend=false)
```
![](../img/pyplot/pyplot_example_4.png)
### Global
Change the guides/background without a separate call.
```julia
plot(rand(10); title="TITLE",xlabel="XLABEL",ylabel="YLABEL",background_color=RGB(0.5,0.5,0.5))
```
![](../img/pyplot/pyplot_example_5.png)
### Two-axis
Use the `axis` or `axiss` arguments.
Note: Currently only supported with Qwt and PyPlot
```julia
plot(Vector[randn(100),randn(100) * 100]; axiss=[:left,:right],ylabel="LEFT",yrightlabel="RIGHT")
```
![](../img/pyplot/pyplot_example_6.png)
### Vectors w/ pluralized args
Plot multiple series with different numbers of points. Mix arguments that apply to all series (singular... see `marker`) with arguments unique to each series (pluralized... see `colors`).
```julia
plot(Vector[rand(10),rand(20)]; marker=:ellipse,markersize=8,colors=[:red,:blue])
```
![](../img/pyplot/pyplot_example_7.png)
### Build plot in pieces
Start with a base plot...
```julia
plot(rand(100) / 3; reg=true,fillto=0)
```
![](../img/pyplot/pyplot_example_8.png)
###
and add to it later.
```julia
scatter!(rand(100); markersize=6,color=:blue)
```
![](../img/pyplot/pyplot_example_9.png)
### Heatmaps
```julia
heatmap(randn(10000),randn(10000); nbins=100)
```
![](../img/pyplot/pyplot_example_10.png)
### Line types
```julia
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))
```
![](../img/pyplot/pyplot_example_11.png)
### Line styles
```julia
styles = setdiff(supportedStyles(),[:auto])
plot(rand(20,length(styles)); linestyle=:auto,labels=map(string,styles))
```
![](../img/pyplot/pyplot_example_12.png)
### Marker types
```julia
markers = setdiff(supportedMarkers(),[:none,:auto])
scatter(0.5:9.5,[fill(i - 0.5,10) for i = length(markers):-1:1]; marker=:auto,labels=map(string,markers),markersize=10)
```
![](../img/pyplot/pyplot_example_13.png)
### Bar
x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)
```julia
bar(randn(1000))
```
![](../img/pyplot/pyplot_example_14.png)
### Histogram
note: fillto isn't supported on all backends
```julia
histogram(randn(1000); nbins=50,fillto=20)
```
![](../img/pyplot/pyplot_example_15.png)
-211
View File
@@ -1,211 +0,0 @@
# Examples for backend: qwt
- Supported arguments: `args`, `axis`, `color`, `fillto`, `heatmap_c`, `kwargs`, `label`, `legend`, `linestyle`, `linetype`, `marker`, `markercolor`, `markersize`, `nbins`, `reg`, `size`, `title`, `width`, `windowtitle`, `xlabel`, `ylabel`, `yrightlabel`
- Supported values for axis: `:auto`, `:left`, `:right`
- Supported values for linetype: `:none`, `:line`, `:step`, `:stepinverted`, `:sticks`, `:scatter`, `:heatmap`, `:hexbin`, `:hist`, `:bar`
- Supported values for linestyle: `:auto`, `:solid`, `:dash`, `:dot`, `:dashdot`, `:dashdotdot`
- Supported values for marker: `:none`, `:auto`, `:ellipse`, `:rect`, `:diamond`, `:utriangle`, `:dtriangle`, `:cross`, `:xcross`, `:star1`, `:star2`, `:hexagon`
- Is `subplot`/`subplot!` supported? Yes
### Initialize
```julia
using Plots
qwt!()
```
### Lines
A simple line plot of the 3 columns.
```julia
plot(rand(100,3))
```
![](../img/qwt/qwt_example_1.png)
### Functions
Plot multiple functions. You can also put the function first.
```julia
plot(0:0.01:4π,[sin,cos])
```
![](../img/qwt/qwt_example_2.png)
###
You can also call it with plot(f, xmin, xmax).
```julia
plot([sin,cos],0,4π)
```
![](../img/qwt/qwt_example_3.png)
###
Or make a parametric plot (i.e. plot: (fx(u), fy(u))) with plot(fx, fy, umin, umax).
```julia
plot(sin,(x->begin # /home/tom/.julia/v0.4/Plots/docs/example_generation.jl, line 33:
sin(2x)
end),0,2π,legend=false)
```
![](../img/qwt/qwt_example_4.png)
### Global
Change the guides/background without a separate call.
```julia
plot(rand(10); title="TITLE",xlabel="XLABEL",ylabel="YLABEL",background_color=RGB(0.5,0.5,0.5))
```
![](../img/qwt/qwt_example_5.png)
### Two-axis
Use the `axis` or `axiss` arguments.
Note: Currently only supported with Qwt and PyPlot
```julia
plot(Vector[randn(100),randn(100) * 100]; axiss=[:left,:right],ylabel="LEFT",yrightlabel="RIGHT")
```
![](../img/qwt/qwt_example_6.png)
### Vectors w/ pluralized args
Plot multiple series with different numbers of points. Mix arguments that apply to all series (singular... see `marker`) with arguments unique to each series (pluralized... see `colors`).
```julia
plot(Vector[rand(10),rand(20)]; marker=:ellipse,markersize=8,colors=[:red,:blue])
```
![](../img/qwt/qwt_example_7.png)
### Build plot in pieces
Start with a base plot...
```julia
plot(rand(100) / 3; reg=true,fillto=0)
```
![](../img/qwt/qwt_example_8.png)
###
and add to it later.
```julia
scatter!(rand(100); markersize=6,color=:blue)
```
![](../img/qwt/qwt_example_9.png)
### Heatmaps
```julia
heatmap(randn(10000),randn(10000); nbins=100)
```
![](../img/qwt/qwt_example_10.png)
### Line types
```julia
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))
```
![](../img/qwt/qwt_example_11.png)
### Line styles
```julia
styles = setdiff(supportedStyles(),[:auto])
plot(rand(20,length(styles)); linestyle=:auto,labels=map(string,styles))
```
![](../img/qwt/qwt_example_12.png)
### Marker types
```julia
markers = setdiff(supportedMarkers(),[:none,:auto])
scatter(0.5:9.5,[fill(i - 0.5,10) for i = length(markers):-1:1]; marker=:auto,labels=map(string,markers),markersize=10)
```
![](../img/qwt/qwt_example_13.png)
### Bar
x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)
```julia
bar(randn(1000))
```
![](../img/qwt/qwt_example_14.png)
### Histogram
note: fillto isn't supported on all backends
```julia
histogram(randn(1000); nbins=50,fillto=20)
```
![](../img/qwt/qwt_example_15.png)
### Subplots
subplot and subplot! are distinct commands which create many plots and add series to them in a circular fashion.
You can define the layout with keyword params... either set the number of plots `n` (and optionally number of rows `nr` or
number of columns `nc`), or you can set the layout directly with `layout`.
Note: Gadfly is not very friendly here, and although you can create a plot and save a PNG, I haven't been able to actually display it.
```julia
subplot(randn(100,5); layout=[1,1,3],linetypes=[:line,:hist,:scatter,:step,:bar],nbins=10,legend=false)
```
![](../img/qwt/qwt_example_16.png)
### Adding to subplots
Note here the automatic grid layout, as well as the order in which new series are added to the plots.
```julia
subplot(randn(100,5); n=4)
```
![](../img/qwt/qwt_example_17.png)
###
```julia
subplot!(randn(100,3))
```
![](../img/qwt/qwt_example_18.png)
-211
View File
@@ -1,211 +0,0 @@
# 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
A simple line plot of the 3 columns.
```julia
plot(rand(100,3))
```
![](../img/unicodeplots/unicodeplots_example_1.png)
### Functions
Plot multiple functions. You can also put the function first.
```julia
plot(0:0.01:4π,[sin,cos])
```
![](../img/unicodeplots/unicodeplots_example_2.png)
###
You can also call it with plot(f, xmin, xmax).
```julia
plot([sin,cos],0,4π)
```
![](../img/unicodeplots/unicodeplots_example_3.png)
###
Or make a parametric plot (i.e. plot: (fx(u), fy(u))) with plot(fx, fy, umin, umax).
```julia
plot(sin,(x->begin # /home/tom/.julia/v0.4/Plots/docs/example_generation.jl, line 33:
sin(2x)
end),0,2π)
```
![](../img/unicodeplots/unicodeplots_example_4.png)
### Global
Change the guides/background without a separate call.
```julia
plot(rand(10); title="TITLE",xlabel="XLABEL",ylabel="YLABEL",background_color=RGB(0.5,0.5,0.5))
```
![](../img/unicodeplots/unicodeplots_example_5.png)
### Two-axis
Use the `axis` or `axiss` arguments.
Note: Currently only supported with Qwt and PyPlot
```julia
plot(Vector[randn(100),randn(100) * 100]; axiss=[:left,:right],ylabel="LEFT",yrightlabel="RIGHT")
```
![](../img/unicodeplots/unicodeplots_example_6.png)
### Vectors w/ pluralized args
Plot multiple series with different numbers of points. Mix arguments that apply to all series (singular... see `marker`) with arguments unique to each series (pluralized... see `colors`).
```julia
plot(Vector[rand(10),rand(20)]; marker=:ellipse,markersize=8,colors=[:red,:blue])
```
![](../img/unicodeplots/unicodeplots_example_7.png)
### Build plot in pieces
Start with a base plot...
```julia
plot(rand(100) / 3; reg=true,fillto=0)
```
![](../img/unicodeplots/unicodeplots_example_8.png)
###
and add to it later.
```julia
scatter!(rand(100); markersize=6,color=:blue)
```
![](../img/unicodeplots/unicodeplots_example_9.png)
### Heatmaps
```julia
heatmap(randn(10000),randn(10000); nbins=100)
```
![](../img/unicodeplots/unicodeplots_example_10.png)
### Suported line types
All options: (:line, :orderedline, :step, :stepinverted, :sticks, :scatter, :none, :heatmap, :hexbin, :hist, :bar)
```julia
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))
```
![](../img/unicodeplots/unicodeplots_example_11.png)
### Supported line styles
All options: (:solid, :dash, :dot, :dashdot, :dashdotdot)
```julia
styles = setdiff(supportedStyles(),[:auto])
plot(rand(20,length(styles)); linestyle=:auto,labels=map(string,styles))
```
![](../img/unicodeplots/unicodeplots_example_12.png)
### Supported marker types
All options: (:none, :auto, :ellipse, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star1, :star2, :hexagon)
```julia
markers = setdiff(supportedMarkers(),[:none,:auto])
plot([fill(i,10) for i = 1:length(markers)]; marker=:auto,labels=map(string,markers),markersize=10)
```
![](../img/unicodeplots/unicodeplots_example_13.png)
### Bar
x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)
```julia
bar(randn(1000))
```
![](../img/unicodeplots/unicodeplots_example_14.png)
### Histogram
note: fillto isn't supported on all backends
```julia
histogram(randn(1000); nbins=50,fillto=20)
```
![](../img/unicodeplots/unicodeplots_example_15.png)
### Subplots
subplot and subplot! are distinct commands which create many plots and add series to them in a circular fashion.
You can define the layout with keyword params... either set the number of plots `n` (and optionally number of rows `nr` or
number of columns `nc`), or you can set the layout directly with `layout`.
Note: Gadfly is not very friendly here, and although you can create a plot and save a PNG, I haven't been able to actually display it.
```julia
subplot(randn(100,5); layout=[1,1,3],linetypes=[:line,:hist,:scatter,:step,:bar],nbins=10,legend=false)
```
![](../img/unicodeplots/unicodeplots_example_16.png)
### Adding to subplots
Note here the automatic grid layout, as well as the order in which new series are added to the plots.
```julia
subplot(randn(100,5); n=4)
```
![](../img/unicodeplots/unicodeplots_example_17.png)
###
```julia
subplot!(randn(100,3))
```
![](../img/unicodeplots/unicodeplots_example_18.png)
-166
View File
@@ -1,166 +0,0 @@
# Examples for backend: winston
- Supported arguments: `args`, `axis`, `color`, `kwargs`, `label`, `legend`, `linestyle`, `linetype`, `marker`, `markersize`, `nbins`, `reg`, `size`, `title`, `width`, `windowtitle`, `xlabel`, `ylabel`, `yrightlabel`
- Supported values for axis: `:auto`, `:left`
- Supported values for linetype: `:none`, `:line`, `:sticks`, `:scatter`, `:hist`, `:bar`
- Supported values for linestyle: `:solid`, `:dash`, `:dot`, `:dashdot`
- Supported values for marker: `:none`, `:ellipse`, `:rect`, `:diamond`, `:utriangle`, `:dtriangle`, `:cross`, `:xcross`, `:star1`
- Is `subplot`/`subplot!` supported? No
### Initialize
```julia
using Plots
winston!()
```
### Lines
A simple line plot of the 3 columns.
```julia
plot(rand(100,3))
```
![](../img/winston/winston_example_1.png)
### Functions
Plot multiple functions. You can also put the function first.
```julia
plot(0:0.01:4π,[sin,cos])
```
![](../img/winston/winston_example_2.png)
###
You can also call it with plot(f, xmin, xmax).
```julia
plot([sin,cos],0,4π)
```
![](../img/winston/winston_example_3.png)
###
Or make a parametric plot (i.e. plot: (fx(u), fy(u))) with plot(fx, fy, umin, umax).
```julia
plot(sin,(x->begin # /home/tom/.julia/v0.4/Plots/docs/example_generation.jl, line 33:
sin(2x)
end),0,2π,legend=false)
```
![](../img/winston/winston_example_4.png)
### Global
Change the guides/background without a separate call.
```julia
plot(rand(10); title="TITLE",xlabel="XLABEL",ylabel="YLABEL",background_color=RGB(0.5,0.5,0.5))
```
![](../img/winston/winston_example_5.png)
### Two-axis
Use the `axis` or `axiss` arguments.
Note: Currently only supported with Qwt and PyPlot
```julia
plot(Vector[randn(100),randn(100) * 100]; axiss=[:left,:right],ylabel="LEFT",yrightlabel="RIGHT")
```
![](../img/winston/winston_example_6.png)
### Vectors w/ pluralized args
Plot multiple series with different numbers of points. Mix arguments that apply to all series (singular... see `marker`) with arguments unique to each series (pluralized... see `colors`).
```julia
plot(Vector[rand(10),rand(20)]; marker=:ellipse,markersize=8,colors=[:red,:blue])
```
![](../img/winston/winston_example_7.png)
### Build plot in pieces
Start with a base plot...
```julia
plot(rand(100) / 3; reg=true,fillto=0)
```
![](../img/winston/winston_example_8.png)
###
and add to it later.
```julia
scatter!(rand(100); markersize=6,color=:blue)
```
![](../img/winston/winston_example_9.png)
### Line types
```julia
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))
```
![](../img/winston/winston_example_11.png)
### Line styles
```julia
styles = setdiff(supportedStyles(),[:auto])
plot(rand(20,length(styles)); linestyle=:auto,labels=map(string,styles))
```
![](../img/winston/winston_example_12.png)
### Marker types
```julia
markers = setdiff(supportedMarkers(),[:none,:auto])
scatter(0.5:9.5,[fill(i - 0.5,10) for i = length(markers):-1:1]; marker=:auto,labels=map(string,markers),markersize=10)
```
![](../img/winston/winston_example_13.png)
### Bar
x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)
```julia
bar(randn(1000))
```
![](../img/winston/winston_example_14.png)
### Histogram
note: fillto isn't supported on all backends
```julia
histogram(randn(1000); nbins=50,fillto=20)
```
![](../img/winston/winston_example_15.png)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Some files were not shown because too many files have changed in this diff Show More