Compare commits
596 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3c09921cbd | |||
| 00f3d450f9 | |||
| e676387c16 | |||
| 2e2e8a2230 | |||
| 8c8ede361e | |||
| 672bf05856 | |||
| 67ec31c75a | |||
| 59d13a7810 | |||
| 010a25f4cb | |||
| a0ac7b4a1e | |||
| ab7eb89466 | |||
| 649d362b85 | |||
| cb80860d6f | |||
| a8ef9e66fc | |||
| d27212e0b7 | |||
| 65650a7ae5 | |||
| 6ab5b8eb68 | |||
| c618e0577a | |||
| 0e84c91451 | |||
| 005ce11313 | |||
| db118d4f5a | |||
| c92b30a741 | |||
| d67aec6fec | |||
| ce58f25488 | |||
| e8d77a3c61 | |||
| d6d7fc1edd | |||
| 7ce7f8bfce | |||
| f0f46e5272 | |||
| f9473cc8bc | |||
| 5c7d31157b | |||
| 982a512ebd | |||
| 5dfd3d2f5d | |||
| 8d6974f67d | |||
| 8b569e3cd8 | |||
| b9d20142a2 | |||
| 6c9e818abd | |||
| d2a287d43c | |||
| d6ce2e364f | |||
| 36ca485a74 | |||
| b3230c5671 | |||
| ebf490838c | |||
| 7921cf18b6 | |||
| 0e0450ced5 | |||
| 096064ac09 | |||
| 77c2d7d846 | |||
| 40a121198d | |||
| 44079a7bf7 | |||
| 50fa013801 | |||
| d4ccf0ec62 | |||
| 04842974e7 | |||
| 6161b08f82 | |||
| b9818a4480 | |||
| e2ae22421b | |||
| b64677e14a | |||
| c910445634 | |||
| c4683a754e | |||
| 1da8fdb588 | |||
| 4bf8e342dc | |||
| 18fc50fcbf | |||
| 2fb10b7076 | |||
| 967291c2ef | |||
| 392ae871d5 | |||
| 27b3070480 | |||
| 325f59e03d | |||
| 217ffb36e6 | |||
| 4afad93ff6 | |||
| e8858cb1b7 | |||
| 52de31c9a6 | |||
| 60660a1f1a | |||
| a2ea9db90e | |||
| 236a7dadc6 | |||
| 82d2cc943d | |||
| d70f462899 | |||
| 0a636b5899 | |||
| e0b2749188 | |||
| 2fc973245d | |||
| 9bfcb64542 | |||
| 61e34b7ef8 | |||
| 3c3078875a | |||
| 5293e2c13d | |||
| fdf3b3f581 | |||
| f3f29fb54f | |||
| e8ed79a6bb | |||
| cca730d927 | |||
| 0693cb7840 | |||
| 3f1958cce1 | |||
| fb708bed90 | |||
| 1636587a82 | |||
| 1f1ccd81bb | |||
| 5efb0eb582 | |||
| be5f71c123 | |||
| a0df6bfc12 | |||
| 2ab0dc20d7 | |||
| 175ce3613a | |||
| eecb5c3754 | |||
| b34360901f | |||
| 21bbd21ae9 | |||
| 0b403a4c5d | |||
| 1d1e1beca5 | |||
| 3d4d844e72 | |||
| 1f9aa72bdb | |||
| c29f68e35d | |||
| c7c10e769d | |||
| 7264c01b85 | |||
| 97faa7413f | |||
| 7531c48e38 | |||
| 16799d8b75 | |||
| 901115ed10 | |||
| 596ca08446 | |||
| 4d864d8cad | |||
| c458a35670 | |||
| c203bfe5ad | |||
| 8b2a838388 | |||
| b08212e2f9 | |||
| b5f08838b3 | |||
| 5501605a1f | |||
| 7a5197df63 | |||
| 09d45aa64b | |||
| 552810359e | |||
| a68a6885d0 | |||
| b32589f7e7 | |||
| 2e6b8a067d | |||
| 581fdfdfe0 | |||
| 8e4ff39738 | |||
| f568803af2 | |||
| 6db06857ba | |||
| fd4dd13270 | |||
| ded9f332f6 | |||
| d09ca46141 | |||
| b28cd7f8bd | |||
| a4054aa500 | |||
| 3332bfcee1 | |||
| cc798a0c0a | |||
| fe2030b7e3 | |||
| ed1cce86ef | |||
| 9a544b0ff3 | |||
| 82f7b29836 | |||
| 076acfb242 | |||
| ed336bc0ff | |||
| 5699446d69 | |||
| a43d32949e | |||
| 02a1e648bc | |||
| 9d3e0651e2 | |||
| cdff5a9039 | |||
| ba0b5500ca | |||
| 1439a7e289 | |||
| 9761ede5c4 | |||
| e342805752 | |||
| d08672aa71 | |||
| a3d4e05b0e | |||
| 51eeed3d50 | |||
| 51c45456c3 | |||
| 074ba63bf5 | |||
| f3d552d8a0 | |||
| c5fb4a9228 | |||
| 55d7e910e4 | |||
| ea29af8d3d | |||
| 88b9d71bd7 | |||
| 165c84c246 | |||
| 347820867d | |||
| 26d0dfbf3d | |||
| 6aa4849266 | |||
| 335b3802b8 | |||
| 73bd3fa60c | |||
| 6b61c5900c | |||
| 9da4083096 | |||
| 86fe244d95 | |||
| 732f2846de | |||
| 4f238caf5c | |||
| c9388e9f56 | |||
| 2a9fa9539f | |||
| b8d136588c | |||
| 92c9e82dee | |||
| 0fdb48bda3 | |||
| e8d4fd7aac | |||
| 6a4a78a26a | |||
| 6c6769ca98 | |||
| 3e49af9093 | |||
| 5f8ecfa3fa | |||
| aca03d2609 | |||
| 5db9493d2b | |||
| ac3c041d6d | |||
| a319c0c94a | |||
| f74d619748 | |||
| eef1981f20 | |||
| ade9d86696 | |||
| 935c1cfeab | |||
| 5706770a11 | |||
| 2643417c0b | |||
| d388036601 | |||
| 96df75cc05 | |||
| c62d8d6753 | |||
| 1562c96d4c | |||
| 94c87d436f | |||
| b9c8ffb5cf | |||
| a37a23bcfc | |||
| 863ad22b48 | |||
| bce865ff9f | |||
| 1963fe208e | |||
| 5c4526725b | |||
| 3f42e9c5bd | |||
| b1c9d0a0af | |||
| adcbfb4b9e | |||
| b3ebccab36 | |||
| d5797054fb | |||
| aab0ec22b9 | |||
| f7babcc1d2 | |||
| d077307721 | |||
| 72e8e10bd6 | |||
| 5ea9e8a0d7 | |||
| 87b050fad2 | |||
| 0c8cd74e28 | |||
| 445d970784 | |||
| 125a1eb9fc | |||
| a2a578d04d | |||
| 11e5c0aa9d | |||
| 14b856b0cf | |||
| 2e8dd73822 | |||
| da9fdb356c | |||
| 054a99ca38 | |||
| baf33609af | |||
| b4eb0b6b41 | |||
| 3e9a47a683 | |||
| d71c3ecd86 | |||
| e5a864a760 | |||
| 81b59f9bc9 | |||
| 2c2a36ce34 | |||
| cb0020c629 | |||
| 003d39c8cd | |||
| ca866183f1 | |||
| b6e627369b | |||
| da96cfc158 | |||
| 0abbd53e07 | |||
| 6fc0f858c7 | |||
| b3613b68cd | |||
| 2b6619b3c4 | |||
| a33161aa9c | |||
| 5c3c5b999f | |||
| 7acca18313 | |||
| 7b71d9a448 | |||
| 64ffa3e70f | |||
| fd88972380 | |||
| dd7b09552a | |||
| 0b23aa9e7e | |||
| 0caa31bd6b | |||
| cafac135a0 | |||
| 6ac312bd49 | |||
| 489877d6bf | |||
| b0b2e695e1 | |||
| c3808c0c5b | |||
| c09545de64 | |||
| 7566b0159c | |||
| ed7cc9b89e | |||
| 55501e68fb | |||
| eabe670ae8 | |||
| 9fffef6f53 | |||
| 368429b757 | |||
| 49f774eb0d | |||
| 0487d7a058 | |||
| 5943e77563 | |||
| b10f0fb945 | |||
| c299891fb0 | |||
| fe0f22dfc0 | |||
| 002603c388 | |||
| 30ef8456c3 | |||
| bee1ce401a | |||
| e18c4a370a | |||
| 2a60a929f1 | |||
| 939295ab04 | |||
| f6a0ef6a61 | |||
| b3bce314e9 | |||
| e28b85d8b6 | |||
| a0af2fc997 | |||
| 7f7f5c6f12 | |||
| d21fbfc9be | |||
| 366dc1cca9 | |||
| e9e3913bb7 | |||
| 5491f6eff7 | |||
| 32e36ba324 | |||
| 9d4c456461 | |||
| cdc7920dff | |||
| cdb4901d91 | |||
| c7f3520ea8 | |||
| f0e728c316 | |||
| 4b1f127eaf | |||
| 1db2d8d8d8 | |||
| 87bb45d01b | |||
| 6beadcece8 | |||
| fc6f0f3a86 | |||
| ef7370f56d | |||
| 52ba7cdbff | |||
| b0c9dd44e9 | |||
| 92ec093ed9 | |||
| 6d2a1aafd2 | |||
| f3a7734584 | |||
| 9cf92f37f5 | |||
| 34831d42a4 | |||
| 607d5d7841 | |||
| 75adfd2e9d | |||
| e92b5b2d35 | |||
| a8c40a5493 | |||
| be5c3fb55c | |||
| e6e4a63022 | |||
| 1cdc8928ba | |||
| ad111a0163 | |||
| 7091a4899c | |||
| 3bd9e70fa9 | |||
| 54bd2c620e | |||
| 121640b1b3 | |||
| 55e388513c | |||
| b153dcbd63 | |||
| 242cbe5ecb | |||
| f1cca13796 | |||
| 918ba72107 | |||
| e596f27666 | |||
| a40d0000c5 | |||
| fb82da74a1 | |||
| b0991a0624 | |||
| 6236acea02 | |||
| 391c7e8570 | |||
| 58041cc64e | |||
| 8c7d3a6e92 | |||
| ae1982369c | |||
| 5f85ac01f7 | |||
| cca263fb2b | |||
| 809ed02b85 | |||
| 9eab1083ab | |||
| 60523bef80 | |||
| 46b959ff3c | |||
| 42c3827ded | |||
| 26e4b4efda | |||
| 2169ab3bb8 | |||
| 85dad8db88 | |||
| 8120c34064 | |||
| 1f1d1f70a1 | |||
| 373d868a17 | |||
| 834ba9bc61 | |||
| 3ffec5aed9 | |||
| ef20c1d684 | |||
| 697a59568c | |||
| e58fb935b0 | |||
| 044d23f8a5 | |||
| 1604d867c3 | |||
| 011db481c3 | |||
| c404cdc38a | |||
| 20689af7dd | |||
| 9ea0585d71 | |||
| 614c5f694b | |||
| fa36aae068 | |||
| 3e85232310 | |||
| 894928d7ca | |||
| afb1486f86 | |||
| 2799bd18e1 | |||
| 43c2a885b9 | |||
| be7feb0eaa | |||
| e3d653a8d9 | |||
| b9f9d8160d | |||
| 141b5c604d | |||
| 8a0fc00435 | |||
| a3a8cb9368 | |||
| 96c66b33a2 | |||
| 62fad3724f | |||
| ca2b6c87ef | |||
| 20348645a3 | |||
| a9b39fad64 | |||
| 1c556ade57 | |||
| e08957f5ec | |||
| e76ded69e6 | |||
| 7e740861d8 | |||
| f28e65a26c | |||
| a29f0c820b | |||
| b2bc30cfed | |||
| 6ce235bb68 | |||
| 479ab989df | |||
| 8d490b9e52 | |||
| 949f11a8c9 | |||
| d4896e1978 | |||
| c4020080b3 | |||
| 5a68003d16 | |||
| 9fcc3cdc24 | |||
| ee80ce5ae6 | |||
| 456c4019c4 | |||
| f65627a505 | |||
| 38d1fc15fe | |||
| 5eead5b0fa | |||
| 4223bd57f1 | |||
| 5bfa653858 | |||
| 5342764caf | |||
| 04a44a82c9 | |||
| c28820f39c | |||
| 546955a78b | |||
| d1e9cc5800 | |||
| 4ef2fb9933 | |||
| d7bc8adf21 | |||
| b5f44efc69 | |||
| 5e8abea222 | |||
| f291454ccb | |||
| bac6637b46 | |||
| 866ac9fb72 | |||
| 8208f6947f | |||
| dcd50a7c62 | |||
| 781aa86568 | |||
| 3facc116c8 | |||
| 9178c3b087 | |||
| 5c6c85a22f | |||
| b8adb4d229 | |||
| 093118da8b | |||
| 0aa760119f | |||
| 60b3a1583d | |||
| 593c47b938 | |||
| 0f6bb7ce6f | |||
| 048c2541e6 | |||
| f3e7d1a43b | |||
| 5df24d6683 | |||
| 73779898b7 | |||
| 7200b6adc6 | |||
| d48f15ab4d | |||
| 2747671935 | |||
| d86f24dd35 | |||
| 60edccade5 | |||
| 540460cae9 | |||
| df44d86f46 | |||
| c287b446c9 | |||
| 1db36c05a8 | |||
| 2c884ab5ab | |||
| cd0dfc956d | |||
| 03392a5f03 | |||
| a7da999bd7 | |||
| 47f21b1652 | |||
| 7c91d10c79 | |||
| fac2f5494b | |||
| bfcdb7e840 | |||
| 21d55db3b4 | |||
| 18e49888fe | |||
| 7ba2f61361 | |||
| 407df158ef | |||
| eab46ba9c4 | |||
| 39318e5e61 | |||
| ac1ce03fe5 | |||
| 4fa697ec75 | |||
| 027961bffa | |||
| 7dfcbabe0c | |||
| dfc7658426 | |||
| 04c6726b76 | |||
| 8fdbbe4c16 | |||
| 09fceab75b | |||
| 8df4c27285 | |||
| e38820b74a | |||
| c052e731f8 | |||
| 3636860262 | |||
| ce7421bef4 | |||
| 23b51c4c3e | |||
| 48d802fc40 | |||
| 51e8f3ff6e | |||
| 7917397bf3 | |||
| e0c0052b63 | |||
| 15a4b50ce4 | |||
| a51a8abf27 | |||
| 45747e3635 | |||
| 64b8e15918 | |||
| f4b716b255 | |||
| 1115ff83bb | |||
| c24550c756 | |||
| b5cdfe30ea | |||
| a10e594da1 | |||
| 63aee387f0 | |||
| ab9de1e199 | |||
| e60c463328 | |||
| 537d74196b | |||
| a8bbbe8582 | |||
| 29471a7aac | |||
| 894a4a5567 | |||
| f7cd5276f0 | |||
| 95b8c71083 | |||
| 52c82e6fe2 | |||
| cef1abd6aa | |||
| 91da261128 | |||
| 1c70346a61 | |||
| 2de017086d | |||
| d6253c72d4 | |||
| e5007b6c87 | |||
| bbc18549b3 | |||
| b6855b6fba | |||
| 70db97d576 | |||
| f632f2f39e | |||
| b23f968d57 | |||
| ea88877a11 | |||
| 1de3decede | |||
| 78045fd2ab | |||
| 7c8898158b | |||
| 3fc5f87388 | |||
| 623ca1effc | |||
| da05e7fe5e | |||
| f3734d4c64 | |||
| 9ab458e109 | |||
| d4c72e6f78 | |||
| 1f58ef5140 | |||
| 69d574c587 | |||
| a027fdded7 | |||
| 443df0501d | |||
| d68fe5f80d | |||
| ebf868bae3 | |||
| 8a9b3286e9 | |||
| a0455561b6 | |||
| 518ccf5a74 | |||
| 54f09c58cb | |||
| 029ad1045a | |||
| 2f55fb4d84 | |||
| add724eee9 | |||
| 07324ae892 | |||
| ffc05e971f | |||
| 30f42fd1d4 | |||
| f284857438 | |||
| 06ab514472 | |||
| 85b65acbe0 | |||
| 4d1d9de22f | |||
| a68ec9b191 | |||
| e386636d66 | |||
| cc3311b8eb | |||
| d3d1181769 | |||
| 001abf684c | |||
| 92a65296b5 | |||
| 3a7887d003 | |||
| 3334c4a87a | |||
| 228ce768e0 | |||
| eafc1a784c | |||
| fd3a4d0a0e | |||
| 77d679b63b | |||
| 730d764c6e | |||
| 6f1ef82e89 | |||
| d4da910f19 | |||
| a0a0773bd2 | |||
| 9ce8d138d5 | |||
| 0041b034e0 | |||
| d781c437de | |||
| 2fe21b8547 | |||
| dbc90c9417 | |||
| 431d60a58a | |||
| fcfcc9a94a | |||
| 870fb4e2df | |||
| e3612b973f | |||
| 75f4ca928f | |||
| 22fd25b30f | |||
| 610ddb09ff | |||
| 33602aca11 | |||
| a207856e99 | |||
| 80e8b5b5e4 | |||
| 273996aa91 | |||
| 646b88c5be | |||
| 88cfd82a25 | |||
| 2f8436be87 | |||
| a6237cdda3 | |||
| eb93a767fc | |||
| 41852412ca | |||
| 224b2b7323 | |||
| ec939f9f9a | |||
| eced15b712 | |||
| f8fb473981 | |||
| f2bcb77cfb | |||
| dc5da28176 | |||
| be43e64743 | |||
| 454630dace | |||
| c9df244333 | |||
| 2649d97d69 | |||
| bcb9ac5501 | |||
| 76d1e26f7d | |||
| ba13ab9926 | |||
| c43b34b67f | |||
| 3739c2881b | |||
| bc13b81351 | |||
| 86a56e487a | |||
| 031058cd0c | |||
| 85040d6104 | |||
| efbf74b44c | |||
| 774fc42e8e | |||
| 692cfe4f52 | |||
| 8b34d4417b | |||
| c20a7b3c69 | |||
| ff6e83c55e | |||
| 6aa56fd30f | |||
| f5a6f129dd | |||
| 5405c1d240 | |||
| 455f85e230 | |||
| fa899a67a7 | |||
| 56cf25eebf | |||
| 1a490551e6 | |||
| 4514802e35 | |||
| a9062b0611 | |||
| eb6b30aab1 | |||
| 922abd7ad3 | |||
| c4596dda75 | |||
| 168b77326b | |||
| f674bba861 | |||
| 6b2e65e738 | |||
| 51021c799d | |||
| 01cb036976 |
@@ -1,4 +1,6 @@
|
||||
*.jl.cov
|
||||
*.jl.*.cov
|
||||
*.jl.mem
|
||||
.DS_Store
|
||||
.DS_Store
|
||||
examples/.ipynb_checkpoints/*
|
||||
examples/meetup/.ipynb_checkpoints/*
|
||||
|
||||
@@ -5,9 +5,54 @@ os:
|
||||
- osx
|
||||
julia:
|
||||
- 0.4
|
||||
#- nightly
|
||||
|
||||
|
||||
# # before install:
|
||||
# # - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
|
||||
# # - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install wkhtmltopdf; fi
|
||||
|
||||
# ref: http://askubuntu.com/a/556672 for the wkhtmltopdf apt repository info
|
||||
|
||||
sudo: required
|
||||
before_install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pwd ; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./test/install_wkhtmltoimage.sh ; fi
|
||||
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository -y ppa:pov/wkhtmltopdf ; fi
|
||||
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update ; fi
|
||||
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y wkhtmltopdf ; fi
|
||||
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wkhtmltopdf -V ; fi
|
||||
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wkhtmltoimage -V ; fi
|
||||
# echo 'exec xvfb-run -a -s "-screen 0 640x480x16" wkhtmltopdf "$@"' | sudo tee /usr/local/bin/wkhtmltopdf.sh >/dev/null
|
||||
# sudo chmod a+x /usr/local/bin/wkhtmltopdf.sh
|
||||
|
||||
# # borrowed from Blink.jl's travis file
|
||||
# matrix:
|
||||
# include:
|
||||
# - os: linux
|
||||
# julia: 0.4
|
||||
# env: TESTCMD="xvfb-run julia"
|
||||
# - os: osx
|
||||
# julia: 0.4
|
||||
# env: TESTCMD="julia"
|
||||
|
||||
|
||||
|
||||
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 test/travis_commands.jl
|
||||
# - julia -e 'Pkg.clone("ImageMagick"); Pkg.build("ImageMagick")'
|
||||
# - julia -e 'Pkg.clone("GR"); Pkg.build("GR")'
|
||||
# # - julia -e 'Pkg.clone("https://github.com/tbreloff/ImageMagick.jl.git"); Pkg.checkout("ImageMagick","tb_write"); Pkg.build("ImageMagick")'
|
||||
# - julia -e 'Pkg.clone("https://github.com/tbreloff/ExamplePlots.jl.git");'
|
||||
# # - julia -e 'Pkg.clone("https://github.com/JunoLab/Blink.jl.git"); Pkg.build("Blink"); import Blink; Blink.AtomShell.install()'
|
||||
# # - julia -e 'Pkg.clone("https://github.com/spencerlyon2/PlotlyJS.jl.git")'
|
||||
# - julia -e 'ENV["PYTHON"] = ""; Pkg.add("PyPlot"); Pkg.build("PyPlot")'
|
||||
#
|
||||
# # - $TESTCMD -e 'Pkg.test("Plots"; coverage=false)'
|
||||
# - 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())'
|
||||
|
||||
@@ -1,281 +1,35 @@
|
||||
# Plots
|
||||
|
||||
[](https://travis-ci.org/tbreloff/Plots.jl)
|
||||
[](https://gitter.im/tbreloff/Plots.jl?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
<!-- [](http://pkg.julialang.org/?pkg=Plots&ver=0.3) -->
|
||||
<!-- [](http://pkg.julialang.org/?pkg=Plots&ver=0.4) -->
|
||||
<!-- [](https://coveralls.io/r/tbreloff/Plots.jl?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.
|
||||
- **Powerful**. Do more with less. Complex visualizations become easy.
|
||||
- **Intuitive**. Start generating 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](http://plots.readthedocs.io/en/latest/backends/).
|
||||
- **Lightweight**. Very few dependencies, since backends are loaded and initialized dynamically.
|
||||
|
||||
## 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.
|
||||
Use the [preprocessing pipeline](http://plots.readthedocs.io/en/latest/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.
|
||||
|
||||
```julia
|
||||
using Plots
|
||||
pyplot(reuse=true)
|
||||
|
||||
@gif for i in linspace(0,2π,100)
|
||||
X = Y = linspace(-5,5,40)
|
||||
surface(X, Y, (x,y) -> sin(x+10sin(i))+cos(y))
|
||||
end
|
||||
```
|
||||
|
||||
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:
|
||||
|
||||

|
||||
|
||||
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
|
||||
|
||||

|
||||
|
||||
View the [full documentation](http://plots.readthedocs.io).
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
julia 0.4-
|
||||
julia 0.4
|
||||
|
||||
Colors
|
||||
Reexport
|
||||
Compat
|
||||
Requires
|
||||
FixedSizeArrays
|
||||
|
||||
@@ -1,195 +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π))]),
|
||||
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("Suported line types",
|
||||
"All options: (:line, :orderedline, :step, :stepinverted, :sticks, :scatter, :none, :heatmap, :hexbin, :hist, :bar)",
|
||||
[:(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("Supported line styles",
|
||||
"All options: (:solid, :dash, :dot, :dashdot, :dashdotdot)",
|
||||
[:(styles = setdiff(supportedStyles(), [:auto])), :(plot(rand(20,length(styles)); linestyle=:auto, labels=map(string,styles)))]),
|
||||
PlotExample("Supported marker types",
|
||||
"All options: (:none, :auto, :ellipse, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star1, :star2, :hexagon)",
|
||||
[:(markers = setdiff(supportedMarkers(), [:none,:auto])), :(plot([fill(i,10) for i=1:length(markers)]; 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)))]),
|
||||
|
||||
|
||||
]
|
||||
|
||||
|
||||
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, "\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
|
||||
|
||||
@@ -1,211 +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: `:line`, `:step`, `:sticks`, `:scatter`, `:heatmap`, `:hexbin`, `:hist`, `:bar`
|
||||
- Supported values for linestyle: `:auto`, `:solid`
|
||||
- Supported values for marker: `:none`, `:auto`, `:rect`, `:ellipse`, `:diamond`, `:cross`
|
||||
- Is `subplot`/`subplot!` supported? Yes
|
||||
|
||||
### Initialize
|
||||
|
||||
```julia
|
||||
using Plots
|
||||
gadfly!()
|
||||
```
|
||||
|
||||
### Lines
|
||||
|
||||
A simple line plot of the 3 columns.
|
||||
|
||||
```julia
|
||||
plot(rand(100,3))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Functions
|
||||
|
||||
Plot multiple functions. You can also put the function first.
|
||||
|
||||
```julia
|
||||
plot(0:0.01:4π,[sin,cos])
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
You can also call it with plot(f, xmin, xmax).
|
||||
|
||||
```julia
|
||||
plot([sin,cos],0,4π)
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
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π)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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")
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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])
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Build plot in pieces
|
||||
|
||||
Start with a base plot...
|
||||
|
||||
```julia
|
||||
plot(rand(100) / 3; reg=true,fillto=0)
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
and add to it later.
|
||||
|
||||
```julia
|
||||
scatter!(rand(100); markersize=6,color=:blue)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Heatmaps
|
||||
|
||||
|
||||
|
||||
```julia
|
||||
heatmap(randn(10000),randn(10000); nbins=100)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Bar
|
||||
|
||||
x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)
|
||||
|
||||
```julia
|
||||
bar(randn(1000))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Histogram
|
||||
|
||||
note: fillto isn't supported on all backends
|
||||
|
||||
```julia
|
||||
histogram(randn(1000); nbins=50,fillto=20)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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)
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
|
||||
|
||||
```julia
|
||||
subplot!(randn(100,3))
|
||||
```
|
||||
|
||||

|
||||
|
||||
@@ -1,211 +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: `:line`, `:step`, `:sticks`, `:scatter`, `:heatmap`, `:hexbin`, `:hist`, `:bar`
|
||||
- Supported values for linestyle: `:auto`, `:solid`
|
||||
- Supported values for marker: `:none`, `:auto`, `:rect`, `:ellipse`, `:diamond`, `:cross`
|
||||
- Is `subplot`/`subplot!` supported? Yes
|
||||
|
||||
### Initialize
|
||||
|
||||
```julia
|
||||
using Plots
|
||||
immerse!()
|
||||
```
|
||||
|
||||
### Lines
|
||||
|
||||
A simple line plot of the 3 columns.
|
||||
|
||||
```julia
|
||||
plot(rand(100,3))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Functions
|
||||
|
||||
Plot multiple functions. You can also put the function first.
|
||||
|
||||
```julia
|
||||
plot(0:0.01:4π,[sin,cos])
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
You can also call it with plot(f, xmin, xmax).
|
||||
|
||||
```julia
|
||||
plot([sin,cos],0,4π)
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
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π)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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")
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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])
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Build plot in pieces
|
||||
|
||||
Start with a base plot...
|
||||
|
||||
```julia
|
||||
plot(rand(100) / 3; reg=true,fillto=0)
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
and add to it later.
|
||||
|
||||
```julia
|
||||
scatter!(rand(100); markersize=6,color=:blue)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Heatmaps
|
||||
|
||||
|
||||
|
||||
```julia
|
||||
heatmap(randn(10000),randn(10000); nbins=100)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Bar
|
||||
|
||||
x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)
|
||||
|
||||
```julia
|
||||
bar(randn(1000))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Histogram
|
||||
|
||||
note: fillto isn't supported on all backends
|
||||
|
||||
```julia
|
||||
histogram(randn(1000); nbins=50,fillto=20)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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)
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
|
||||
|
||||
```julia
|
||||
subplot!(randn(100,3))
|
||||
```
|
||||
|
||||

|
||||
|
||||
@@ -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`, `:ellipse`, `:rect`, `: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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Functions
|
||||
|
||||
Plot multiple functions. You can also put the function first.
|
||||
|
||||
```julia
|
||||
plot(0:0.01:4π,[sin,cos])
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
You can also call it with plot(f, xmin, xmax).
|
||||
|
||||
```julia
|
||||
plot([sin,cos],0,4π)
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
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π)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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")
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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])
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Build plot in pieces
|
||||
|
||||
Start with a base plot...
|
||||
|
||||
```julia
|
||||
plot(rand(100) / 3; reg=true,fillto=0)
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
and add to it later.
|
||||
|
||||
```julia
|
||||
scatter!(rand(100); markersize=6,color=:blue)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Heatmaps
|
||||
|
||||
|
||||
|
||||
```julia
|
||||
heatmap(randn(10000),randn(10000); nbins=100)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Bar
|
||||
|
||||
x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)
|
||||
|
||||
```julia
|
||||
bar(randn(1000))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Histogram
|
||||
|
||||
note: fillto isn't supported on all backends
|
||||
|
||||
```julia
|
||||
histogram(randn(1000); nbins=50,fillto=20)
|
||||
```
|
||||
|
||||

|
||||
|
||||
@@ -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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Functions
|
||||
|
||||
Plot multiple functions. You can also put the function first.
|
||||
|
||||
```julia
|
||||
plot(0:0.01:4π,[sin,cos])
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
You can also call it with plot(f, xmin, xmax).
|
||||
|
||||
```julia
|
||||
plot([sin,cos],0,4π)
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
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π)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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")
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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])
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Build plot in pieces
|
||||
|
||||
Start with a base plot...
|
||||
|
||||
```julia
|
||||
plot(rand(100) / 3; reg=true,fillto=0)
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
and add to it later.
|
||||
|
||||
```julia
|
||||
scatter!(rand(100); markersize=6,color=:blue)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Heatmaps
|
||||
|
||||
|
||||
|
||||
```julia
|
||||
heatmap(randn(10000),randn(10000); nbins=100)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Bar
|
||||
|
||||
x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)
|
||||
|
||||
```julia
|
||||
bar(randn(1000))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Histogram
|
||||
|
||||
note: fillto isn't supported on all backends
|
||||
|
||||
```julia
|
||||
histogram(randn(1000); nbins=50,fillto=20)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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)
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
|
||||
|
||||
```julia
|
||||
subplot!(randn(100,3))
|
||||
```
|
||||
|
||||

|
||||
|
||||
@@ -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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Functions
|
||||
|
||||
Plot multiple functions. You can also put the function first.
|
||||
|
||||
```julia
|
||||
plot(0:0.01:4π,[sin,cos])
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
You can also call it with plot(f, xmin, xmax).
|
||||
|
||||
```julia
|
||||
plot([sin,cos],0,4π)
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
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π)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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")
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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])
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Build plot in pieces
|
||||
|
||||
Start with a base plot...
|
||||
|
||||
```julia
|
||||
plot(rand(100) / 3; reg=true,fillto=0)
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
and add to it later.
|
||||
|
||||
```julia
|
||||
scatter!(rand(100); markersize=6,color=:blue)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Heatmaps
|
||||
|
||||
|
||||
|
||||
```julia
|
||||
heatmap(randn(10000),randn(10000); nbins=100)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Bar
|
||||
|
||||
x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)
|
||||
|
||||
```julia
|
||||
bar(randn(1000))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Histogram
|
||||
|
||||
note: fillto isn't supported on all backends
|
||||
|
||||
```julia
|
||||
histogram(randn(1000); nbins=50,fillto=20)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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)
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
|
||||
|
||||
```julia
|
||||
subplot!(randn(100,3))
|
||||
```
|
||||
|
||||

|
||||
|
||||
@@ -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: `:auto`, `:solid`, `:dashdotdot`, `:dot`, `:dash`, `:dashdot`
|
||||
- Supported values for marker: `:auto`, `:hexagon`, `:none`, `:dtriangle`, `:ellipse`, `:xcross`, `:rect`, `:star1`, `:star2`, `:cross`, `:utriangle`, `:diamond`
|
||||
- Is `subplot`/`subplot!` supported? No
|
||||
|
||||
### Initialize
|
||||
|
||||
```julia
|
||||
using Plots
|
||||
winston!()
|
||||
```
|
||||
|
||||
### Lines
|
||||
|
||||
A simple line plot of the 3 columns.
|
||||
|
||||
```julia
|
||||
plot(rand(100,3))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Functions
|
||||
|
||||
Plot multiple functions. You can also put the function first.
|
||||
|
||||
```julia
|
||||
plot(0:0.01:4π,[sin,cos])
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
You can also call it with plot(f, xmin, xmax).
|
||||
|
||||
```julia
|
||||
plot([sin,cos],0,4π)
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
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π)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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")
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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])
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Build plot in pieces
|
||||
|
||||
Start with a base plot...
|
||||
|
||||
```julia
|
||||
plot(rand(100) / 3; reg=true,fillto=0)
|
||||
```
|
||||
|
||||

|
||||
|
||||
###
|
||||
|
||||
and add to it later.
|
||||
|
||||
```julia
|
||||
scatter!(rand(100); markersize=6,color=:blue)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Bar
|
||||
|
||||
x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)
|
||||
|
||||
```julia
|
||||
bar(randn(1000))
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Histogram
|
||||
|
||||
note: fillto isn't supported on all backends
|
||||
|
||||
```julia
|
||||
histogram(randn(1000); nbins=50,fillto=20)
|
||||
```
|
||||
|
||||

|
||||
|
||||
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 199 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 62 KiB |