diff --git a/.circleci/config.yml b/.circleci/config.yml index 1064c87..877f07d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -41,7 +41,7 @@ jobs: git config user.name plotlydocbot git config user.email accounts@plot.ly git add * - git commit -m "build of https://github.com/plotlyplotlyjs.jl-docs/commit/${CIRCLE_SHA1}" + git commit -m "build of https://github.com/plotly/plotlyjs.jl-docs/commit/${CIRCLE_SHA1}" git push --force git@github.com:plotly/plotlyjs.jl-docs.git master:built rm -rf .git cd ../.. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d544fc..88a62d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: julia-version: - - "1.6" + - "1.7" julia-arch: [x64] os: [ubuntu-latest] diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..bc83715 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,43 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at accounts@plot.ly. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.4, available at [http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4/), and may also be found online at . diff --git a/Manifest.toml b/Manifest.toml index 6226cf2..3cafd55 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -56,6 +56,12 @@ git-tree-sha1 = "1289b57e8cf019aede076edab0587eb9644175bd" uuid = "9e28174c-4ba2-5203-b857-d8d62c4213ee" version = "1.0.2" +[[BinaryProvider]] +deps = ["Libdl", "Logging", "SHA"] +git-tree-sha1 = "ecdec412a9abc8db54c0efc5548c64dfce072058" +uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232" +version = "0.5.10" + [[Blink]] deps = ["Base64", "BinDeps", "Distributed", "JSExpr", "JSON", "Lazy", "Logging", "MacroTools", "Mustache", "Mux", "Reexport", "Sockets", "WebIO", "WebSockets"] git-tree-sha1 = "08d0b679fd7caa49e2bca9214b131289e19808c0" @@ -82,9 +88,9 @@ version = "0.10.0" [[ChainRulesCore]] deps = ["Compat", "LinearAlgebra", "SparseArrays"] -git-tree-sha1 = "bdc0937269321858ab2a4f288486cb258b9a0af7" +git-tree-sha1 = "30ee06de5ff870b45c78f529a6b093b3323256a3" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.3.0" +version = "1.3.1" [[CodecZlib]] deps = ["TranscodingStreams", "Zlib_jll"] @@ -118,9 +124,9 @@ version = "0.12.8" [[Compat]] deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] -git-tree-sha1 = "727e463cfebd0c7b999bbf3e9e7e16f254b94193" +git-tree-sha1 = "6071cb87be6a444ac75fdbf51b8e7273808ce62f" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "3.34.0" +version = "3.35.0" [[CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] @@ -137,6 +143,12 @@ git-tree-sha1 = "52cb3ec90e8a8bea0e62e275ba577ad0f74821f7" uuid = "ed09eef8-17a6-5b46-8889-db040fac31e3" version = "0.3.2" +[[CorpusLoaders]] +deps = ["CSV", "DataDeps", "Glob", "InternedStrings", "LightXML", "MultiResolutionIterators", "StringEncodings", "WordTokenizers"] +git-tree-sha1 = "66b3a067f466eb4c0c9670fb5f5bbaad8e206cef" +uuid = "214a0ac2-f95b-54f7-a80b-442ed9c2c9e8" +version = "0.3.2" + [[Crayons]] git-tree-sha1 = "3f71217b538d7aaee0b69ab47d9b7724ca8afa0d" uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" @@ -147,10 +159,46 @@ git-tree-sha1 = "1a3f97f907e6dd8983b744d2642651bb162a3f7a" uuid = "dc8bdbbb-1ca9-579f-8c36-e416f6a65cce" version = "1.0.2" +[[Dash]] +deps = ["CodecZlib", "DashBase", "DashCoreComponents", "DashHtmlComponents", "DashTable", "DataStructures", "HTTP", "JSON", "JSON2", "MD5", "PlotlyBase", "Sockets", "Test", "UUIDs"] +git-tree-sha1 = "d5afc7e1816c535b9023d3ae0154c6af3def6d7b" +uuid = "1b08a953-4be3-4667-9a23-3db579824955" +version = "0.1.6" + +[[DashBase]] +deps = ["JSON2", "Test"] +git-tree-sha1 = "fc7632ba6b4f1c085620870142114f428f51eff0" +uuid = "03207cf0-e2b3-4b91-9ca8-690cf0fb507e" +version = "0.1.0" + +[[DashCoreComponents]] +deps = ["DashBase"] +git-tree-sha1 = "8af600ca3179b193698472376a133c1caf3f2adc" +uuid = "1b08a953-4be3-4667-9a23-9da06441d987" +version = "1.17.1" + +[[DashHtmlComponents]] +deps = ["DashBase"] +git-tree-sha1 = "14ad028d5a5fa708589e38cf05ff853ab0bac7f5" +uuid = "1b08a953-4be3-4667-9a23-24100242a84a" +version = "1.1.4" + +[[DashTable]] +deps = ["DashBase"] +git-tree-sha1 = "e2be29d5b901ff46c5661f407d83a541625cd1a0" +uuid = "1b08a953-4be3-4667-9a23-f0e2ba4deb9a" +version = "4.12.0" + [[DataAPI]] -git-tree-sha1 = "ee400abb2298bd13bfc3df1c412ed228061a2385" +git-tree-sha1 = "bec2532f8adb82005476c141ec23e921fc20971b" uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.7.0" +version = "1.8.0" + +[[DataDeps]] +deps = ["BinaryProvider", "HTTP", "Libdl", "Reexport", "SHA", "p7zip_jll"] +git-tree-sha1 = "4f0e41ff461d42cfc62ff0de4f1cd44c6e6b3771" +uuid = "124859b0-ceae-595e-8997-d05f6a7a8dfe" +version = "0.7.13" [[DataFrames]] deps = ["Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] @@ -185,19 +233,19 @@ uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" [[Distances]] deps = ["LinearAlgebra", "Statistics", "StatsAPI"] -git-tree-sha1 = "abe4ad222b26af3337262b8afb28fab8d215e9f8" +git-tree-sha1 = "9f46deb4d4ee4494ffb5a40a27a2aced67bdd838" uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" -version = "0.10.3" +version = "0.10.4" [[Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[Distributions]] -deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns"] -git-tree-sha1 = "7a58635041e0b5485d56c49d24f10c314841f93c" +deps = ["ChainRulesCore", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns"] +git-tree-sha1 = "f4efaa4b5157e0cdb8283ae0b5428bc9208436ed" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.12" +version = "0.25.16" [[DocStringExtensions]] deps = ["LibGit2"] @@ -261,9 +309,9 @@ uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" [[FillArrays]] deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"] -git-tree-sha1 = "7c365bdef6380b29cfc5caaf99688cd7489f9b87" +git-tree-sha1 = "a3b7b041753094f3b17ffa9d2e2e07d8cace09cd" uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "0.12.2" +version = "0.12.3" [[FixedPointNumbers]] deps = ["Statistics"] @@ -293,6 +341,11 @@ git-tree-sha1 = "ff291c1827030ffaacaf53e3c83ed92d4d5e6fb6" uuid = "14197337-ba66-59df-a3e3-ca00e7dcff7a" version = "0.2.5" +[[Glob]] +git-tree-sha1 = "4df9f7e06108728ebf00a0a11edee4b29a482bb2" +uuid = "c27321d9-0574-5035-807b-f59d2c89b15c" +version = "1.3.0" + [[GraphPlot]] deps = ["ArnoldiMethod", "ColorTypes", "Colors", "Compose", "DelimitedFiles", "LightGraphs", "LinearAlgebra", "Random", "SparseArrays"] git-tree-sha1 = "dd8f15128a91b0079dfe3f4a4a1e190e54ac7164" @@ -305,11 +358,17 @@ git-tree-sha1 = "2c1cf4df419938ece72de17f368a021ee162762e" uuid = "a2bd30eb-e257-5431-a919-1863eab51364" version = "1.1.0" +[[HTML_Entities]] +deps = ["StrTables"] +git-tree-sha1 = "c4144ed3bc5f67f595622ad03c0e39fa6c70ccc7" +uuid = "7693890a-d069-55fe-a829-b4a6d304f0ee" +version = "1.0.1" + [[HTTP]] deps = ["Base64", "Dates", "IniFile", "Logging", "MbedTLS", "NetworkOptions", "Sockets", "URIs"] -git-tree-sha1 = "44e3b40da000eab4ccb1aecdc4801c040026aeb5" +git-tree-sha1 = "60ed5f1643927479f845b0135bb369b031b541fa" uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "0.9.13" +version = "0.9.14" [[Hiccup]] deps = ["MacroTools", "Test"] @@ -319,15 +378,15 @@ version = "0.2.2" [[ImageCore]] deps = ["AbstractFFTs", "ColorVectorSpace", "Colors", "FixedPointNumbers", "Graphics", "MappedArrays", "MosaicViews", "OffsetArrays", "PaddedViews", "Reexport"] -git-tree-sha1 = "75f7fea2b3601b58f24ee83617b528e57160cbfd" +git-tree-sha1 = "595155739d361589b3d074386f77c107a8ada6f7" uuid = "a09fc81d-aa75-5fe9-8630-4744c3626534" -version = "0.9.1" +version = "0.9.2" [[ImageFiltering]] -deps = ["CatIndices", "ComputationalResources", "DataStructures", "FFTViews", "FFTW", "ImageCore", "LinearAlgebra", "OffsetArrays", "Requires", "SparseArrays", "StaticArrays", "Statistics", "TiledIteration"] -git-tree-sha1 = "79dac52336910325a5675813053b1eee3eb5dcc6" +deps = ["CatIndices", "ComputationalResources", "DataStructures", "FFTViews", "FFTW", "ImageCore", "LinearAlgebra", "OffsetArrays", "Reexport", "SparseArrays", "StaticArrays", "Statistics", "TiledIteration"] +git-tree-sha1 = "442e9f9d4beb2fe5ca45ee34356a4e26a5a9c1a2" uuid = "6a3955dd-da59-5b1f-98d4-e7296123deb5" -version = "0.6.22" +version = "0.7.0" [[Inflate]] git-tree-sha1 = "f5fc07d4e706b84f72d54eedcc1c13d92fb0871c" @@ -350,6 +409,12 @@ version = "2018.0.3+2" deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +[[InternedStrings]] +deps = ["Random", "Test"] +git-tree-sha1 = "eb05b5625bc5d821b8075a77e4c421933e20c76b" +uuid = "7d512f48-7fb1-5a58-b986-67e6dc259f01" +version = "0.7.0" + [[Intervals]] deps = ["Dates", "Printf", "RecipesBase", "Serialization", "TimeZones"] git-tree-sha1 = "323a38ed1952d30586d0fe03412cde9399d3618b" @@ -357,10 +422,9 @@ uuid = "d8418881-c3e1-53bb-8760-2df7ec849ed5" version = "1.5.0" [[InvertedIndices]] -deps = ["Test"] -git-tree-sha1 = "15732c475062348b0165684ffe28e85ea8396afc" +git-tree-sha1 = "bee5f1ef5bf65df56bdd2e40447590b272a5471f" uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" -version = "1.0.0" +version = "1.1.0" [[IrrationalConstants]] git-tree-sha1 = "f76424439413893a832026ca355fe273e93bce94" @@ -413,6 +477,12 @@ git-tree-sha1 = "8076680b162ada2a031f707ac7b4953e30667a37" uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" version = "0.21.2" +[[JSON2]] +deps = ["Dates", "Parsers", "Test"] +git-tree-sha1 = "66397cc6c08922f98a28ab05a8d3002f9853b129" +uuid = "2535ab7d-5cd8-5a07-80ac-9b1792aadce3" +version = "0.3.2" + [[Kaleido_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "2ef87eeaa28713cb010f9fb0be288b6c1a4ecd53" @@ -476,15 +546,21 @@ git-tree-sha1 = "432428df5f360964040ed60418dd5601ecd240b6" uuid = "093fc24a-ae57-5d10-9952-331d41423f4d" version = "1.3.5" +[[LightXML]] +deps = ["BinaryProvider", "Libdl"] +git-tree-sha1 = "be855e3c975b89746b09952407c156b5e4a33a1d" +uuid = "9c8b4983-aa76-5018-a973-4c85ecc9e179" +version = "0.8.1" + [[LinearAlgebra]] deps = ["Libdl"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "3d682c07e6dd250ed082f883dc88aee7996bf2cc" +deps = ["ChainRulesCore", "DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "86197a8ecb06e222d66797b0c2d2f0cc7b69e42b" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.0" +version = "0.3.2" [[Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -495,6 +571,12 @@ git-tree-sha1 = "0f057f6ea90a84e73a8ef6eebb4dc7b5c330020f" uuid = "30fc2ffe-d236-52d8-8643-a9d8f7c094a7" version = "0.7.2" +[[MD5]] +deps = ["Random", "SHA"] +git-tree-sha1 = "eeffe42284464c35a08026d23aa948421acf8923" +uuid = "6ac74813-4b46-53a4-afec-0b5dc9d7885c" +version = "0.2.1" + [[MKL_jll]] deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] git-tree-sha1 = "c253236b0ed414624b083e6b72bfe891fbd2c7af" @@ -509,9 +591,9 @@ version = "0.16.7" [[MLJBase]] deps = ["CategoricalArrays", "ComputationalResources", "Dates", "DelimitedFiles", "Distributed", "Distributions", "InteractiveUtils", "InvertedIndices", "LinearAlgebra", "LossFunctions", "MLJModelInterface", "Missings", "OrderedCollections", "Parameters", "PrettyTables", "ProgressMeter", "Random", "ScientificTypes", "StatisticalTraits", "Statistics", "StatsBase", "Tables"] -git-tree-sha1 = "c0e721c7ab80d37e9eb87ef69361e212a12e3f37" +git-tree-sha1 = "7fb47f132e3df112eb65c11ec1ac7625197fa3b1" uuid = "a7f614a8-145f-11e9-1d2a-a57a1082229d" -version = "0.18.19" +version = "0.18.21" [[MLJEnsembles]] deps = ["CategoricalArrays", "ComputationalResources", "Distributed", "Distributions", "MLJBase", "MLJModelInterface", "ProgressMeter", "Random", "ScientificTypes", "StatsBase"] @@ -527,9 +609,9 @@ version = "0.3.1" [[MLJModelInterface]] deps = ["Random", "ScientificTypesBase", "StatisticalTraits"] -git-tree-sha1 = "0c2bcd5c5b99988bb88552a4408beb3da1f1fd4d" +git-tree-sha1 = "1b780b191a65dbefc42d2a225850d20b243dde88" uuid = "e80e1ace-859a-464e-9ed9-23947d8ae3ea" -version = "1.2.0" +version = "1.3.0" [[MLJModels]] deps = ["CategoricalArrays", "Dates", "Distances", "Distributions", "InteractiveUtils", "LinearAlgebra", "MLJBase", "MLJModelInterface", "OrderedCollections", "Parameters", "Pkg", "REPL", "Random", "Requires", "ScientificTypes", "Statistics", "StatsBase", "Tables"] @@ -599,9 +681,9 @@ version = "1.2.0" [[Missings]] deps = ["DataAPI"] -git-tree-sha1 = "f8c673ccc215eb50fcadb285f522420e29e69e1c" +git-tree-sha1 = "2ca267b08821e86c5ef4376cffed98a46c2cb205" uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -version = "0.4.5" +version = "1.0.1" [[Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" @@ -621,6 +703,12 @@ version = "0.3.3" [[MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +[[MultiResolutionIterators]] +deps = ["IterTools", "Random", "Test"] +git-tree-sha1 = "27fa99913e031afaf06ea8a6d4362fd8c94bb9fb" +uuid = "396aa475-d5af-5b65-8c11-5c82e21b2380" +version = "0.5.0" + [[MultivariateStats]] deps = ["Arpack", "LinearAlgebra", "SparseArrays", "Statistics", "StatsBase"] git-tree-sha1 = "8d958ff1854b166003238fe191ec34b9d592860a" @@ -677,9 +765,9 @@ version = "0.3.3" [[OffsetArrays]] deps = ["Adapt"] -git-tree-sha1 = "c0f4a4836e5f3e0763243b8324200af6d0e0f90c" +git-tree-sha1 = "c870a0d713b51e4b49be6432eff0e26a4325afee" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" -version = "1.10.5" +version = "1.10.6" [[OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] @@ -738,15 +826,15 @@ uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" [[PlotlyBase]] deps = ["ColorSchemes", "Dates", "DelimitedFiles", "DocStringExtensions", "JSON", "LaTeXStrings", "Logging", "Parameters", "Pkg", "REPL", "Requires", "Statistics", "UUIDs"] -git-tree-sha1 = "e9b96dd840b3c9d01669f1df28982b530b711165" +git-tree-sha1 = "7eb4ec38e1c4e00fea999256e9eb11ee7ede0c69" uuid = "a03496cd-edff-5a9b-9e67-9cda94a718b5" -version = "0.8.15" +version = "0.8.16" [[PlotlyJS]] deps = ["Base64", "Blink", "DelimitedFiles", "JSExpr", "JSON", "Kaleido_jll", "Markdown", "Pkg", "PlotlyBase", "REPL", "Reexport", "Requires", "WebIO"] -git-tree-sha1 = "fc760eacadc70dcb2a9fec7c57f0dd5a5f12a814" +git-tree-sha1 = "ec6bc7270269be2d565b272116ca74ca2f8bd9ab" uuid = "f0f68f2c-4968-5e81-91da-67840de0976a" -version = "0.18.6" +version = "0.18.7" [[Polynomials]] deps = ["Intervals", "LinearAlgebra", "MutableArithmetics", "RecipesBase"] @@ -756,9 +844,9 @@ version = "2.0.14" [[PooledArrays]] deps = ["DataAPI", "Future"] -git-tree-sha1 = "cde4ce9d6f33219465b55162811d8de8139c0414" +git-tree-sha1 = "a193d6ad9c45ada72c14b731a318bedd3c2f00cf" uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" -version = "1.2.1" +version = "1.3.0" [[Preferences]] deps = ["TOML"] @@ -834,15 +922,15 @@ version = "0.3.0+0" uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" [[ScientificTypes]] -deps = ["CategoricalArrays", "ColorTypes", "Dates", "Distributions", "PersistenceDiagramsBase", "PrettyTables", "ScientificTypesBase", "StatisticalTraits", "Tables"] -git-tree-sha1 = "7bd9acc9096ce93bcd671baaa05df1d1c38a89a9" +deps = ["CategoricalArrays", "ColorTypes", "CorpusLoaders", "Dates", "Distributions", "PersistenceDiagramsBase", "PrettyTables", "Reexport", "ScientificTypesBase", "StatisticalTraits", "Tables"] +git-tree-sha1 = "cf596b0378c45642b76b7a60ab608a25c7236506" uuid = "321657f4-b219-11e9-178b-2701a2544e81" -version = "2.1.3" +version = "2.2.2" [[ScientificTypesBase]] -git-tree-sha1 = "8a476e63390bfc987aa3cca02d90ea1dbf8b457e" +git-tree-sha1 = "9c1a0dea3b442024c54ca6a318e8acf842eab06f" uuid = "30f210dd-8aff-4c5f-94ba-8e64358c1161" -version = "2.1.0" +version = "2.2.0" [[SentinelArrays]] deps = ["Dates", "Random"] @@ -917,15 +1005,21 @@ version = "1.0.0" [[StatsBase]] deps = ["DataAPI", "DataStructures", "LinearAlgebra", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "fed1ec1e65749c4d96fc20dd13bea72b55457e62" +git-tree-sha1 = "8cbbc098554648c84f79a463c9ff0fd277144b6c" uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.33.9" +version = "0.33.10" [[StatsFuns]] -deps = ["IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] -git-tree-sha1 = "20d1bb720b9b27636280f751746ba4abb465f19d" +deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] +git-tree-sha1 = "46d7ccc7104860c38b11966dd1f72ff042f382e4" uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" -version = "0.9.9" +version = "0.9.10" + +[[StrTables]] +deps = ["Dates"] +git-tree-sha1 = "5998faae8c6308acc25c25896562a1e66a3bb038" +uuid = "9700d1a9-a7c8-5760-9816-a99fda30bb8f" +version = "1.0.1" [[StringEncodings]] deps = ["Libiconv_jll"] @@ -935,9 +1029,9 @@ version = "0.3.5" [[StructTypes]] deps = ["Dates", "UUIDs"] -git-tree-sha1 = "e36adc471280e8b346ea24c5c87ba0571204be7a" +git-tree-sha1 = "8445bf99a36d703a09c601f9a57e2f83000ef2ae" uuid = "856f2bd8-1eba-4b0a-8007-ebc267875bd4" -version = "1.7.2" +version = "1.7.3" [[SuiteSparse]] deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] @@ -967,15 +1061,15 @@ version = "1.0.1" [[TableTraitsUtils]] deps = ["DataValues", "IteratorInterfaceExtensions", "Missings", "TableTraits"] -git-tree-sha1 = "8fc12ae66deac83e44454e61b02c37b326493233" +git-tree-sha1 = "78fecfe140d7abb480b53a44f3f85b6aa373c293" uuid = "382cd787-c1b6-5bf2-a167-d5b971a19bda" -version = "1.0.1" +version = "1.0.2" [[Tables]] deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "TableTraits", "Test"] -git-tree-sha1 = "d0c690d37c73aeb5ca063056283fde5585a41710" +git-tree-sha1 = "368d04a820fe069f9080ff1b432147a6203c3c89" uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.5.0" +version = "1.5.1" [[Tar]] deps = ["ArgTools", "SHA"] @@ -1068,6 +1162,12 @@ git-tree-sha1 = "eae2fbbc34a79ffd57fb4c972b08ce50b8f6a00d" uuid = "cc8bc4a8-27d6-5769-a93b-9d913e69aa62" version = "0.6.3" +[[WordTokenizers]] +deps = ["DataDeps", "HTML_Entities", "StrTables", "Unicode"] +git-tree-sha1 = "01dd4068c638da2431269f49a5964bf42ff6c9d2" +uuid = "796a5d58-b03d-544a-977e-18100b691f6e" +version = "0.5.6" + [[YAML]] deps = ["Base64", "Dates", "Printf", "StringEncodings"] git-tree-sha1 = "3c6e8b9f5cdaaa21340f841653942e1a6b6561e5" diff --git a/Project.toml b/Project.toml index 5debe6e..6eef6d6 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,9 @@ [deps] CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" +Dash = "1b08a953-4be3-4667-9a23-3db579824955" +DashCoreComponents = "1b08a953-4be3-4667-9a23-9da06441d987" +DashHtmlComponents = "1b08a953-4be3-4667-9a23-24100242a84a" DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" diff --git a/README.md b/README.md index 87e64e8..44aca83 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,12 @@ Documentation for the Plotly Julia graphing library. +
+ + Maintained by the Plotly Community + +
+ ## Developer Setup diff --git a/dash/3d-charts.jl b/dash/3d-charts.jl new file mode 100644 index 0000000..9dc49b6 --- /dev/null +++ b/dash/3d-charts.jl @@ -0,0 +1,41 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS, CSV, DataFrames + +df = dataset(DataFrame, "iris") + +app = dash(external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + dcc_graph(id="scatter-plot"), + html_p("Petal Width:"), + dcc_rangeslider( + id="range-slider", + min=0, max=2.5, step=0.1, + marks=Dict("0"=> "0", "2.5"=> "2.5"), + value=[0.5, 2] + ) +end + +callback!(app, Output("scatter-plot", "figure"), Input("range-slider", "value")) do val + low = val[1] + high= val[2] + mask = df[df.petal_width .> low, :] + mask = mask[mask.petal_width .< high, :] + + fig = plot( + mask, + kind="scatter3d", + mode="markers", + x=:sepal_length, + y=:sepal_width, + z=:petal_width, + color=:species, + hover_data=[:petal_width] + ) + + return fig +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/3d-mesh.jl b/dash/3d-mesh.jl new file mode 100644 index 0000000..c4c3f8d --- /dev/null +++ b/dash/3d-mesh.jl @@ -0,0 +1,40 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS, CSV, HTTP, DataFrames + +base_url = "https://raw.githubusercontent.com/plotly/datasets/master/ply/" +mesh_names = ["sandal", "scissors", "shark", "walkman"] +dataframes = Dict( + name => (CSV.File(HTTP.get(string(base_url, name, "-ply.csv")).body) |> DataFrame) + for name in mesh_names +) + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + html_p("Choose an object"), + dcc_dropdown( + id="dropdown", + options=[(label = x, value = x) for x in mesh_names], + value=mesh_names[1], + clearable=false + ), + dcc_graph(id="graph") + +end + +callback!(app, Output("graph", "figure"), Input("dropdown", "value")) do val + df = dataframes[val] + fig = plot( + df, + kind="mesh3d", + x=:x, y=:y, z=:z, + i=:i, j=:j, k=:k, + facecolor=:facecolor + ) + + return fig +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/3d-scatter-plots.jl b/dash/3d-scatter-plots.jl new file mode 100644 index 0000000..47b0c4f --- /dev/null +++ b/dash/3d-scatter-plots.jl @@ -0,0 +1,41 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS, CSV, DataFrames + +df = dataset(DataFrame, "iris") + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + dcc_graph(id="scatter-plot"), + html_p("Petal Width:"), + dcc_rangeslider( + id="range-slider", + min=0, max=2.5, step=0.1, + marks=Dict("0" => "0", "2.5" => "2.5"), + value=[0.5, 2] + ) +end + +callback!(app, Output("scatter-plot", "figure"), Input("range-slider", "value")) do val + low = val[1] + high = val[2] + mask = df[df.petal_width .> low, :] + mask = mask[mask.petal_width .< high, :] + + fig = plot( + mask, + kind="scatter3d", + mode="markers", + x=:sepal_length, + y=:sepal_width, + z=:petal_width, + color=:species, + hover_data=[:petal_width] + ) + + return fig +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/Manifest.toml b/dash/Manifest.toml new file mode 100644 index 0000000..6e609dd --- /dev/null +++ b/dash/Manifest.toml @@ -0,0 +1,523 @@ +# This file is machine-generated - editing it directly is not advised + +[[ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" + +[[Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[AssetRegistry]] +deps = ["Distributed", "JSON", "Pidfile", "SHA", "Test"] +git-tree-sha1 = "b25e88db7944f98789130d7b503276bc34bc098e" +uuid = "bf4720bc-e11a-5d0c-854e-bdca1663c893" +version = "0.1.0" + +[[Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[BinDeps]] +deps = ["Libdl", "Pkg", "SHA", "URIParser", "Unicode"] +git-tree-sha1 = "1289b57e8cf019aede076edab0587eb9644175bd" +uuid = "9e28174c-4ba2-5203-b857-d8d62c4213ee" +version = "1.0.2" + +[[Blink]] +deps = ["Base64", "BinDeps", "Distributed", "JSExpr", "JSON", "Lazy", "Logging", "MacroTools", "Mustache", "Mux", "Reexport", "Sockets", "WebIO", "WebSockets"] +git-tree-sha1 = "08d0b679fd7caa49e2bca9214b131289e19808c0" +uuid = "ad839575-38b3-5650-b840-f874b8c74a25" +version = "0.12.5" + +[[CSV]] +deps = ["Dates", "Mmap", "Parsers", "PooledArrays", "SentinelArrays", "Tables", "Unicode"] +git-tree-sha1 = "b83aa3f513be680454437a0eee21001607e5d983" +uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" +version = "0.8.5" + +[[CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.0" + +[[ColorSchemes]] +deps = ["ColorTypes", "Colors", "FixedPointNumbers", "Random"] +git-tree-sha1 = "9995eb3977fbf67b86d0a0a0508e83017ded03f2" +uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" +version = "3.14.0" + +[[ColorTypes]] +deps = ["FixedPointNumbers", "Random"] +git-tree-sha1 = "024fe24d83e4a5bf5fc80501a314ce0d1aa35597" +uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" +version = "0.11.0" + +[[Colors]] +deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] +git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40" +uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" +version = "0.12.8" + +[[Compat]] +deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] +git-tree-sha1 = "727e463cfebd0c7b999bbf3e9e7e16f254b94193" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "3.34.0" + +[[Crayons]] +git-tree-sha1 = "3f71217b538d7aaee0b69ab47d9b7724ca8afa0d" +uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" +version = "4.0.4" + +[[Dash]] +deps = ["CodecZlib", "DashBase", "DashCoreComponents", "DashHtmlComponents", "DashTable", "DataStructures", "HTTP", "JSON", "JSON2", "MD5", "PlotlyBase", "Sockets", "Test", "UUIDs"] +git-tree-sha1 = "d5afc7e1816c535b9023d3ae0154c6af3def6d7b" +uuid = "1b08a953-4be3-4667-9a23-3db579824955" +version = "0.1.6" + +[[DashBase]] +deps = ["JSON2", "Test"] +git-tree-sha1 = "fc7632ba6b4f1c085620870142114f428f51eff0" +uuid = "03207cf0-e2b3-4b91-9ca8-690cf0fb507e" +version = "0.1.0" + +[[DashCoreComponents]] +deps = ["DashBase"] +git-tree-sha1 = "8af600ca3179b193698472376a133c1caf3f2adc" +uuid = "1b08a953-4be3-4667-9a23-9da06441d987" +version = "1.17.1" + +[[DashHtmlComponents]] +deps = ["DashBase"] +git-tree-sha1 = "14ad028d5a5fa708589e38cf05ff853ab0bac7f5" +uuid = "1b08a953-4be3-4667-9a23-24100242a84a" +version = "1.1.4" + +[[DashTable]] +deps = ["DashBase"] +git-tree-sha1 = "e2be29d5b901ff46c5661f407d83a541625cd1a0" +uuid = "1b08a953-4be3-4667-9a23-f0e2ba4deb9a" +version = "4.12.0" + +[[DataAPI]] +git-tree-sha1 = "ee400abb2298bd13bfc3df1c412ed228061a2385" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.7.0" + +[[DataFrames]] +deps = ["Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] +git-tree-sha1 = "d785f42445b63fc86caa08bb9a9351008be9b765" +uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +version = "1.2.2" + +[[DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "7d9d316f04214f7efdbb6398d545446e246eff02" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.10" + +[[DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[DelimitedFiles]] +deps = ["Mmap"] +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" + +[[Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "a32185f5428d3986f47c2ab78b1f216d5e6cc96f" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.8.5" + +[[Downloads]] +deps = ["ArgTools", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" + +[[FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" + +[[FixedPointNumbers]] +deps = ["Statistics"] +git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" +uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" +version = "0.8.4" + +[[Formatting]] +deps = ["Printf"] +git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" +uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" +version = "0.4.2" + +[[FunctionalCollections]] +deps = ["Test"] +git-tree-sha1 = "04cb9cfaa6ba5311973994fe3496ddec19b6292a" +uuid = "de31a74c-ac4f-5751-b3fd-e18cd04993ca" +version = "0.5.0" + +[[Future]] +deps = ["Random"] +uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" + +[[HTTP]] +deps = ["Base64", "Dates", "IniFile", "Logging", "MbedTLS", "NetworkOptions", "Sockets", "URIs"] +git-tree-sha1 = "60ed5f1643927479f845b0135bb369b031b541fa" +uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" +version = "0.9.14" + +[[Hiccup]] +deps = ["MacroTools", "Test"] +git-tree-sha1 = "6187bb2d5fcbb2007c39e7ac53308b0d371124bd" +uuid = "9fb69e20-1954-56bb-a84f-559cc56a8ff7" +version = "0.2.2" + +[[IniFile]] +deps = ["Test"] +git-tree-sha1 = "098e4d2c533924c921f9f9847274f2ad89e018b8" +uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f" +version = "0.5.0" + +[[InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[InvertedIndices]] +deps = ["Test"] +git-tree-sha1 = "15732c475062348b0165684ffe28e85ea8396afc" +uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" +version = "1.0.0" + +[[IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[JLLWrappers]] +deps = ["Preferences"] +git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.3.0" + +[[JSExpr]] +deps = ["JSON", "MacroTools", "Observables", "WebIO"] +git-tree-sha1 = "bd6c034156b1e7295450a219c4340e32e50b08b1" +uuid = "97c1335a-c9c5-57fe-bc5d-ec35cebe8660" +version = "0.5.3" + +[[JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "8076680b162ada2a031f707ac7b4953e30667a37" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.2" + +[[JSON2]] +deps = ["Dates", "Parsers", "Test"] +git-tree-sha1 = "66397cc6c08922f98a28ab05a8d3002f9853b129" +uuid = "2535ab7d-5cd8-5a07-80ac-9b1792aadce3" +version = "0.3.2" + +[[Kaleido_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "2ef87eeaa28713cb010f9fb0be288b6c1a4ecd53" +uuid = "f7e6163d-2fa5-5f23-b69c-1db539e41963" +version = "0.1.0+0" + +[[LaTeXStrings]] +git-tree-sha1 = "c7f1c695e06c01b95a67f0cd1d34994f3e7db104" +uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +version = "1.2.1" + +[[Lazy]] +deps = ["MacroTools"] +git-tree-sha1 = "1370f8202dac30758f3c345f9909b97f53d87d3f" +uuid = "50d2b5c4-7a5e-59d5-8109-a42b560f39c0" +version = "0.15.1" + +[[LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" + +[[LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" + +[[LibGit2]] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" + +[[Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[LinearAlgebra]] +deps = ["Libdl"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[MD5]] +deps = ["Random", "SHA"] +git-tree-sha1 = "eeffe42284464c35a08026d23aa948421acf8923" +uuid = "6ac74813-4b46-53a4-afec-0b5dc9d7885c" +version = "0.2.1" + +[[MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "0fb723cd8c45858c22169b2e42269e53271a6df7" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.7" + +[[Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[MbedTLS]] +deps = ["Dates", "MbedTLS_jll", "Random", "Sockets"] +git-tree-sha1 = "1c38e51c3d08ef2278062ebceade0e46cefc96fe" +uuid = "739be429-bea8-5141-9913-cc70e7f3736d" +version = "1.0.3" + +[[MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" + +[[Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "2ca267b08821e86c5ef4376cffed98a46c2cb205" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.0.1" + +[[Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" + +[[Mustache]] +deps = ["Printf", "Tables"] +git-tree-sha1 = "36995ef0d532fe08119d70b2365b7b03d4e00f48" +uuid = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70" +version = "1.0.10" + +[[Mux]] +deps = ["AssetRegistry", "Base64", "HTTP", "Hiccup", "Pkg", "Sockets", "WebSockets"] +git-tree-sha1 = "82dfb2cead9895e10ee1b0ca37a01088456c4364" +uuid = "a975b10e-0019-58db-a62f-e48ff68538c9" +version = "0.7.6" + +[[NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" + +[[Observables]] +git-tree-sha1 = "3469ef96607a6b9a1e89e54e6f23401073ed3126" +uuid = "510215fc-4207-5dde-b226-833fc4488ee2" +version = "0.3.3" + +[[OrderedCollections]] +git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.4.1" + +[[Parameters]] +deps = ["OrderedCollections", "UnPack"] +git-tree-sha1 = "2276ac65f1e236e0a6ea70baff3f62ad4c625345" +uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a" +version = "0.12.2" + +[[Parsers]] +deps = ["Dates"] +git-tree-sha1 = "bfd7d8c7fd87f04543810d9cbd3995972236ba1b" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "1.1.2" + +[[Pidfile]] +deps = ["FileWatching", "Test"] +git-tree-sha1 = "1be8660b2064893cd2dae4bd004b589278e4440d" +uuid = "fa939f87-e72e-5be4-a000-7fc836dbe307" +version = "1.2.0" + +[[Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" + +[[PlotlyBase]] +deps = ["ColorSchemes", "Dates", "DelimitedFiles", "DocStringExtensions", "JSON", "LaTeXStrings", "Logging", "Parameters", "Pkg", "REPL", "Requires", "Statistics", "UUIDs"] +git-tree-sha1 = "e9b96dd840b3c9d01669f1df28982b530b711165" +uuid = "a03496cd-edff-5a9b-9e67-9cda94a718b5" +version = "0.8.15" + +[[PlotlyJS]] +deps = ["Base64", "Blink", "DelimitedFiles", "JSExpr", "JSON", "Kaleido_jll", "Markdown", "Pkg", "PlotlyBase", "REPL", "Reexport", "Requires", "WebIO"] +git-tree-sha1 = "fc760eacadc70dcb2a9fec7c57f0dd5a5f12a814" +uuid = "f0f68f2c-4968-5e81-91da-67840de0976a" +version = "0.18.6" + +[[PooledArrays]] +deps = ["DataAPI", "Future"] +git-tree-sha1 = "a193d6ad9c45ada72c14b731a318bedd3c2f00cf" +uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" +version = "1.3.0" + +[[Preferences]] +deps = ["TOML"] +git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.2.2" + +[[PrettyTables]] +deps = ["Crayons", "Formatting", "Markdown", "Reexport", "Tables"] +git-tree-sha1 = "0d1245a357cc61c8cd61934c07447aa569ff22e6" +uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" +version = "1.1.0" + +[[Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[Random]] +deps = ["Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "4036a3bd08ac7e968e27c203d45f5fff15020621" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.1.3" + +[[SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" + +[[SentinelArrays]] +deps = ["Dates", "Random"] +git-tree-sha1 = "54f37736d8934a12a200edea2f9206b03bdf3159" +uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" +version = "1.3.7" + +[[Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.0.1" + +[[SparseArrays]] +deps = ["LinearAlgebra", "Random"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" + +[[TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "TableTraits", "Test"] +git-tree-sha1 = "d0c690d37c73aeb5ca063056283fde5585a41710" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.5.0" + +[[Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" + +[[Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[TranscodingStreams]] +deps = ["Random", "Test"] +git-tree-sha1 = "216b95ea110b5972db65aa90f88d8d89dcb8851c" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.9.6" + +[[URIParser]] +deps = ["Unicode"] +git-tree-sha1 = "53a9f49546b8d2dd2e688d216421d050c9a31d0d" +uuid = "30578b45-9adc-5946-b283-645ec420af67" +version = "0.4.1" + +[[URIs]] +git-tree-sha1 = "97bbe755a53fe859669cd907f2d96aee8d2c1355" +uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" +version = "1.3.0" + +[[UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[UnPack]] +git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" +uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" +version = "1.0.2" + +[[Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[WebIO]] +deps = ["AssetRegistry", "Base64", "Distributed", "FunctionalCollections", "JSON", "Logging", "Observables", "Pkg", "Random", "Requires", "Sockets", "UUIDs", "WebSockets", "Widgets"] +git-tree-sha1 = "adc25e225bc334c7df6eec3b39496edfc451cc38" +uuid = "0f1e0344-ec1d-5b48-a673-e5cf874b6c29" +version = "0.8.15" + +[[WebSockets]] +deps = ["Base64", "Dates", "HTTP", "Logging", "Sockets"] +git-tree-sha1 = "f91a602e25fe6b89afc93cf02a4ae18ee9384ce3" +uuid = "104b5d7c-a370-577a-8038-80a2059c5097" +version = "1.5.9" + +[[Widgets]] +deps = ["Colors", "Dates", "Observables", "OrderedCollections"] +git-tree-sha1 = "eae2fbbc34a79ffd57fb4c972b08ce50b8f6a00d" +uuid = "cc8bc4a8-27d6-5769-a93b-9d913e69aa62" +version = "0.6.3" + +[[Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" + +[[nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" + +[[p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0" diff --git a/dash/Project.toml b/dash/Project.toml new file mode 100644 index 0000000..96410de --- /dev/null +++ b/dash/Project.toml @@ -0,0 +1,8 @@ +[deps] +CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" +Dash = "1b08a953-4be3-4667-9a23-3db579824955" +DashCoreComponents = "1b08a953-4be3-4667-9a23-9da06441d987" +DashHtmlComponents = "1b08a953-4be3-4667-9a23-24100242a84a" +DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +PlotlyBase = "a03496cd-edff-5a9b-9e67-9cda94a718b5" +PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a" diff --git a/dash/axes.jl b/dash/axes.jl new file mode 100644 index 0000000..b759bf1 --- /dev/null +++ b/dash/axes.jl @@ -0,0 +1,22 @@ +using Dash +using DashHtmlComponents +using DashCoreComponents +using PlotlyJS, CSV, DataFrames + +app = dash(external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +df = dataset(DataFrame, "tips") + +app.layout = html_div() do + dcc_graph(id = "graph"), + html_button("Rotate", id="button", n_clicks=0) +end + +callback!(app, Output("graph", "figure"), Input("button", "n_clicks")) do val + fig = plot(df, x=:sex, height=500, kind="histogram") + update_xaxes!(fig, tickangle=val*45) + return fig +end + + +run_server(app, "0.0.0.0", 8080) \ No newline at end of file diff --git a/dash/bar-charts.jl b/dash/bar-charts.jl new file mode 100644 index 0000000..63323c0 --- /dev/null +++ b/dash/bar-charts.jl @@ -0,0 +1,24 @@ +using Dash +using DashHtmlComponents +using DashCoreComponents +using PlotlyJS, CSV, DataFrames + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +df = dataset(DataFrame, "tips") +days = unique(df.day) + +app.layout = html_div() do + dcc_dropdown(id="dropdown", options=[(label = x, value = x) for x in days], value=days[1]), + dcc_graph( + id="barchart" + ) +end + +callback!(app, Output("barchart", "figure"), Input("dropdown", "value")) do val + mask = df[df.day .== val, :] + plot(mask, kind="bar", x=:sex, y=:total_bill, color=:smoker, barmode="group") +end + + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/box-plots.jl b/dash/box-plots.jl new file mode 100644 index 0000000..cbc2b77 --- /dev/null +++ b/dash/box-plots.jl @@ -0,0 +1,47 @@ +using Dash +using DashHtmlComponents +using DashCoreComponents +using PlotlyJS, CSV, DataFrames + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +df = dataset(DataFrame, "tips") + +app.layout = html_div() do + html_p("x-axis:"), + dcc_checklist( + id="x-axis", + options=[ + (value = x, label = x) + for x in ["smoker", "day", "time", "sex"] + ], + value=["time"], + labelStyle=(display = "inline-block",) + ), + html_p("y-axis:"), + dcc_radioitems( + id="y-axis", + options=[ + (value = x, label = x) + for x in ["total_bill", "tip", "size"] + ], + value="total_bill", + labelStyle=(display = "inline-block",) + ), + dcc_graph(id="box-plot") +end + +callback!( + app, + Output("box-plot", "figure"), + [Input("x-axis", "value"), Input("y-axis", "value")] +) do x, y + fig = plot( + [ + box(x=df[!, x_col], y=df[!, y]) + for x_col = x + ] + ) + return fig +end +run_server(app, "0.0.0.0", 8080) diff --git a/dash/builtin-colorscales.jl b/dash/builtin-colorscales.jl new file mode 100644 index 0000000..4fb5ea0 --- /dev/null +++ b/dash/builtin-colorscales.jl @@ -0,0 +1,39 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS, CSV, DataFrames + +df = dataset(DataFrame, "iris") + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + html_p("Color scale"), + dcc_dropdown( + id="colorscale", + options=[ + (label = x, value = x) + for x in sort(collect(keys(colors.all))) + ], + value=Symbol("tableau_hue_circle") + ), + dcc_graph(id="graph") + +end + +callback!(app, Output("graph", "figure"), Input("colorscale", "value")) do val + fig = plot( + df, + mode="markers", + x=:sepal_width, + y=:sepal_length, + marker=attr( + color=df.sepal_length, + coloraxis="coloraxis", + showscale=true + ), + Layout(coloraxis_colorscale=colors.all[Symbol(val)]) + ) +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/candlestick-charts.jl b/dash/candlestick-charts.jl new file mode 100644 index 0000000..2e4ea49 --- /dev/null +++ b/dash/candlestick-charts.jl @@ -0,0 +1,40 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS, HTTP, DataFrames, CSV + +df = CSV.File( + HTTP.get("https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv").body +) |> DataFrame + +app = dash(external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + dcc_checklist( + id="toggle-rangeslider", + options=[ + (label="Include Rangeslider", value="slider") + ], + value=["slider"], + ), + dcc_graph(id="graph") +end + + +callback!(app, Output("graph", "figure"), Input("toggle-rangeslider", "value")) do val + fig = plot( + df, + kind="candlestick", + x=:Date, + open=df[!, "AAPL.Open"], + high=df[!, "AAPL.High"], + close=df[!, "AAPL.Close"], + low=df[!, "AAPL.Low"] + ) + + relayout!(fig, xaxis_rangeslider_visible=("slider" in val)) + + return fig +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/colorscales.jl b/dash/colorscales.jl new file mode 100644 index 0000000..a543d1d --- /dev/null +++ b/dash/colorscales.jl @@ -0,0 +1,36 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS, CSV, DataFrames + +df = dataset(DataFrame, "iris") + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + html_p("Color scale"), + dcc_dropdown( + id="colorscale", + options=[(label = x, value = x) for x in sort(collect(keys(colors.all)))], + value=Symbol("tableau_hue_circle") + ), + dcc_graph(id="graph") + +end + +callback!(app, Output("graph", "figure"), Input("colorscale", "value")) do val + fig = plot( + df, + mode="markers", + x=:sepal_width, + y=:sepal_length, + marker=attr( + color=df.sepal_length, + coloraxis="coloraxis", + showscale=true + ), + Layout(coloraxis_colorscale=colors.all[Symbol(val)]) + ) +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/creating-and-updating-figures.jl b/dash/creating-and-updating-figures.jl new file mode 100644 index 0000000..e0e82b8 --- /dev/null +++ b/dash/creating-and-updating-figures.jl @@ -0,0 +1,34 @@ +using Dash +using DashHtmlComponents +using DashCoreComponents +using PlotlyJS, CSV, DataFrames +using JSON + +app = dash(external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +df = dataset(DataFrame, "tips") + +fig = plot( + scatter(mode="lines", x=["a","b","c"], y=[1,3,2]), + Layout(title="sample figure", height=325, template=Template()) +) + +app.layout = html_div() do + dcc_graph(id = "graph", figure=fig), + html_pre( + id="structure", + style=Dict( + "border"=>"thin lightgrey solid", + "overflowY"=>"scroll", + "height"=>"275px" + ) + ) +end + +# TODO: Can't pretty print json +callback!(app, Output("structure", "children"), Input("graph", "figure")) do val + return json(val, 2) +end + + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/discrete-color.jl b/dash/discrete-color.jl new file mode 100644 index 0000000..7ba19d4 --- /dev/null +++ b/dash/discrete-color.jl @@ -0,0 +1,51 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS, CSV, DataFrames + +df = dataset(DataFrame, "tips") + +app = dash(external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + html_p("Color mode: "), + dcc_radioitems( + id="colormode", + value="discrete", + options=[ + (label=x, value=x) + for x in ["discrete", "continuous"] + ] + ), + dcc_graph(id="graph") + +end + +callback!(app, Output("graph", "figure"), Input("colormode", "value")) do val + if val == "discrete" + fig = plot( + df, + mode="markers", + x=:total_bill, + y=:tip, + color=:size + ) + return fig + else + fig = plot( + df, + mode="markers", + x=:total_bill, + y=:tip, + marker=attr( + color=Float64.(df.size), + coloraxis="coloraxis", + showscale=true + ), + Layout(coloraxis_colorscale=colors.plasma) + ) + return fig + end +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/figure-labels.jl b/dash/figure-labels.jl new file mode 100644 index 0000000..08d1283 --- /dev/null +++ b/dash/figure-labels.jl @@ -0,0 +1,56 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using DashDaq +using PlotlyJS, CSV, DataFrames +df = dataset(DataFrame, "iris") + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +init_fig = plot( + df, + mode="markers", + x=:sepal_length, + y=:sepal_width, + color=:species, + Layout( + height=250, + title_text="Playing with Fonts", + font_family="Courier New", + title_font_family="Times New Roman" + ) +) + +picker_style = (float = "left", margin = "auto") + +app.layout = html_div() do + dcc_graph(id="graph", figure=init_fig), + daq_colorpicker( + id="font", + label="Font Color", + size=150, + style=picker_style, + value=(hex = "#119dff",) + ), + + daq_colorpicker( + id="title", + label="Title Color", + size=150, + style=picker_style, + value=(hex = "#2A0203",) + ) +end + +callback!( + app, + Output("graph", "figure"), + [Input("font", "value"), Input("title", "value")] +) do font, title + fig = init_fig + relayout!(fig, font_color=font.hex, title_font_color=title.hex) + + return fig +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/figure-structure.jl b/dash/figure-structure.jl new file mode 100644 index 0000000..701f2a8 --- /dev/null +++ b/dash/figure-structure.jl @@ -0,0 +1,33 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS +using JSON + +app = dash(external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +fig = plot( + scatter( + x=["a","b","c"], + y=[1,2,3], + ), + Layout(title="Sample figure", height=325) +) + +app.layout = html_div() do + dcc_graph(id="graph", figure=fig), + html_pre( + id="structure", + style=( + border="thin lightgrey solid", + overflowY="scroll", + height="275px" + ) + ) +end + +callback!(app, Output("structure", "children"), Input("graph", "figure")) do val + return json(val, 2) +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/getting-started.jl b/dash/getting-started.jl new file mode 100644 index 0000000..7ca1611 --- /dev/null +++ b/dash/getting-started.jl @@ -0,0 +1,30 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + html_p("Color:"), + dcc_dropdown( + id="dropdown", + options=[(label = x, value = x) for x in ["Gold", "MediumTurquoise", "LightGreen"]], + value="Gold", + clearable=false + ), + dcc_graph(id="graph") +end + +callback!(app, Output("graph", "figure"), Input("dropdown", "value")) do val + fig = plot( + bar( + x=[0,1,2], + y=[2,3,1], + marker_color=val + ) + ) + return fig +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/heatmaps.jl b/dash/heatmaps.jl new file mode 100644 index 0000000..ea128f0 --- /dev/null +++ b/dash/heatmaps.jl @@ -0,0 +1,43 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS, CSV, DataFrames + +df = dataset(DataFrame, "medals") +long_df = DataFrames.stack(df, Not([:nation]), variable_name="medal", value_name="count") + +app = dash(external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + html_p("Medals Included:"), + dcc_checklist( + id="medals", + options=[ + (label=x, value=x) + for x in ["gold", "silver", "bronze"] + ], + value=["gold","silver","bronze"] + ), + dcc_graph(id="graph") + +end + +callback!( + app, + Output("graph", "figure"), + Input("medals", "value") +) do val + data = long_df[[x in val for x in long_df.medal], :] + fig = plot( + data, + kind="heatmap", + x=:medal, + y=:nation, + z=:count, + colorscale=colors.plasma + ) + + return fig +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/histograms.jl b/dash/histograms.jl new file mode 100644 index 0000000..ce4eb91 --- /dev/null +++ b/dash/histograms.jl @@ -0,0 +1,37 @@ +using Dash +using DashHtmlComponents +using DashCoreComponents +using PlotlyJS +using Distributions +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + dcc_graph(id="graph"), + html_p("Mean:"), + dcc_slider( + id="mean", + min=-3, max=3, value=0, + marks=Dict("-3" => "-3", "3" => "3") + ), + html_p("Standard Deviation:"), + dcc_slider( + id="std", + min=1, max=3, value=1, + marks=Dict("1" => "1", "3" => "3") + ) +end + +callback!( + app, + Output("graph", "figure"), + [Input("mean", "value"), Input("std", "value")] +) do mean, std + data = rand(Normal(mean, std), 500) + fig = plot(histogram( + x=data, nbins=30, range_x=[-10,10] + )) + return fig +end + + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/horizontal-vertical-shapes.jl b/dash/horizontal-vertical-shapes.jl new file mode 100644 index 0000000..2a84507 --- /dev/null +++ b/dash/horizontal-vertical-shapes.jl @@ -0,0 +1,30 @@ +using Dash +using DashHtmlComponents +using DashCoreComponents +using PlotlyJS, CSV, DataFrames + +df = dataset(DataFrame, "iris") + + + +app = dash(external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + dcc_graph(id="graph"), + html_p("Position of vline"), + dcc_slider( + id="slider-position", + min=1, max=7, value=2.5, step=0.1, + marks=Dict("1"=>"1", "7" => "7") + ) + end + +callback!(app, Output("graph", "figure"), Input("slider-position", "value")) do val + p = plot(df, kind="scatter", mode="markers", x=:petal_length, y=:petal_width) + + add_vline!(p, val, line_width=3, line_dash="dash", line_color="green") + add_hrect!(p, 0.9, 2.6, line_width=0, fillcolor="red", opacity=0.2) + return p +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/hover-text-and-formatting.jl b/dash/hover-text-and-formatting.jl new file mode 100644 index 0000000..2093a13 --- /dev/null +++ b/dash/hover-text-and-formatting.jl @@ -0,0 +1,48 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS, CSV, DataFrames + +df = dataset(DataFrame, "gapminder") +oceania = df[df.continent .== "Oceania", :] + +default_fig = plot( + oceania, + mode="markers+lines", + hovertemplate=nothing, + x=:year, + y=:lifeExp, + color=:country, + title="Hover over points to see the change", + Layout(hovermode="closest") +) + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + html_p("Hovermode"), + dcc_radioitems( + id="hovermode", + labelStyle=(display = "inline-block",), + options=[ + (label = x, value = x) + for x in ["x", "x unified", "closest"] + ], + value="closest" + ), + dcc_graph(id="graph", figure=default_fig) + +end + +callback!( + app, + Output("graph", "figure"), + Input("hovermode", "value"), + State("graph", "figure") +) do hovermode, fig + plt = Plot(fig) + relayout!(plt, hovermode=hovermode) + plt +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/legend.jl b/dash/legend.jl new file mode 100644 index 0000000..4227710 --- /dev/null +++ b/dash/legend.jl @@ -0,0 +1,42 @@ +using Dash +using DashHtmlComponents +using DashCoreComponents +using PlotlyJS, CSV, DataFrames + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +df = filter(x -> x.year == 2007, dataset(DataFrame, "gapminder")) + +app.layout = html_div() do + dcc_graph(id="graph"), + html_p("Legend position"), + dcc_radioitems( + id="xanchor", + options=[(label = "left", value = 0), (label = "right", value = 1)], + value=0, + labelStyle=(display = "inline-block",) + ), + dcc_radioitems( + id="yanchor", + options=[(label = "top", value = 1), (label = "bottom", value = 0)], + value=1, + labelStyle=(display = "inline-block",) + ) +end + +callback!(app, Output("graph", "figure"), [Input("xanchor", "value"), Input("yanchor", "value")]) do pos_x, pos_y + fig = plot( + mode="markers", + df, x=:gdpPercap, y=:lifeExp, + color=:continent, marker_size=:pop, + marker_sizeref=2 * maximum(df.pop) / (40^2), + marker_sizemode="area", + size_max=45, log_x=true + ) + relayout!(fig, legend_x=pos_x, legend_y=pos_y) + + return fig +end + + +run_server(app, "0.0.0.0", 8080, debug=true) diff --git a/dash/line-and-scatter.jl b/dash/line-and-scatter.jl new file mode 100644 index 0000000..a57b34b --- /dev/null +++ b/dash/line-and-scatter.jl @@ -0,0 +1,44 @@ +using Dash +using DashHtmlComponents +using DashCoreComponents +using PlotlyJS, CSV, DataFrames + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +df = dataset(DataFrame, "iris") + +app.layout = html_div() do + dcc_graph(id="scatter-plot"), + html_p("Petal Width:"), + dcc_rangeslider( + id="rangeslider", + min=0, + max=2.5, + step=0.1, + marks=Dict("0" => "0", "2.5" => "2.5"), + value=[0.5, 2] + ) +end + +callback!(app, Output("scatter-plot", "figure"), Input("rangeslider", "value")) do val + low = val[1] + high = val[2] + mask = df[df.petal_width .> low, :] + mask = mask[mask.petal_width .< high, :] + fig = plot(mask, + kind="scatter", + mode="markers", + x=:sepal_width, + y=:sepal_length, + color=:species, + marker=attr( + size=:petal_length, + sizeref=2 * maximum(df.petal_length) / (40^2), + sizemode="area", + ), + ) + return fig +end + + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/line-charts.jl b/dash/line-charts.jl new file mode 100644 index 0000000..e75929a --- /dev/null +++ b/dash/line-charts.jl @@ -0,0 +1,31 @@ +using Dash +using DashHtmlComponents +using DashCoreComponents +using PlotlyJS, CSV, DataFrames + +app = dash(external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +df = dataset(DataFrame, "gapminder") +continents = unique(df.continent) + +app.layout = html_div() do + dcc_checklist( + id="checklist", + options=[(label=x, value=x) for x in continents], + labelStyle=(display="inline-block",), + value=["Europe", "Oceania"] + ), + dcc_graph(id = "linechart") +end + +callback!(app, Output("linechart", "figure"), Input("checklist", "value")) do val + mask = df[ [x in val for x in df.continent], :] + fig = plot( + mask, kind="line", mode="lines", + x=:year, y=:lifeExp, color=:country, + ) + return fig +end + + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/marker-style.jl b/dash/marker-style.jl new file mode 100644 index 0000000..dca7176 --- /dev/null +++ b/dash/marker-style.jl @@ -0,0 +1,44 @@ +using Dash +using DashCoreComponents +using DashDaq +using DashHtmlComponents +using PlotlyJS, CSV, DataFrames + +df = dataset(DataFrame, "iris") + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +default_fig() = plot( + df, + mode="markers", + x=:sepal_width, + y=:sepal_length, + color=:species, + marker_size=12, + Layout( + height=350 + ) +) +app.layout = html_div() do + dcc_graph(id="graph", figure=default_fig()), + daq_colorpicker( + id="color", + label="Border Color", + value=(hex = "#2f4f4f",), + size=164 + ) + + +end + +callback!(app, Output("graph", "figure"), Input("color", "value")) do val + fig = default_fig() + restyle!( + fig, + marker_size=12, + marker_line=attr(width=2, color=val.hex), + ) + return fig +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/multiple-axes.jl b/dash/multiple-axes.jl new file mode 100644 index 0000000..c0ccfb7 --- /dev/null +++ b/dash/multiple-axes.jl @@ -0,0 +1,58 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS + +app = dash(external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + dcc_graph(id="graph"), + html_p("Red line's axes"), + dcc_radioitems( + id="radio", + value="Secondary", + options=[ + (label=x, value=x) + for x in ["Primary", "Secondary"] + ] + ) + +end + +callback!(app, Output("graph", "figure"), Input("radio", "value")) do val + + if val == "Primary" + fig = plot( + [ + scatter(x=[1,2,3], y=[40, 50, 60], name="yaxis data"), + scatter(x=[2,3,4], y=[4,5,6], name="yaxis2 data") + ] + ) + else + fig = plot( + [ + scatter(x=[1,2,3], y=[40, 50, 60], name="yaxis data"), + scatter( + x=[2,3,4], + y=[4,5,6], + name="yaxis2 data", + yaxis="y2" + ) + ], + Layout( + yaxis2=attr( + yaxis2_title="Secondary y axis", + overlaying="y", + side="right" + ) + ) + ) + end + + relayout!(fig, title_text="Double y axis example", xaxis_title="xaxis title") + + return fig + +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/pie-charts.jl b/dash/pie-charts.jl new file mode 100644 index 0000000..71a36cb --- /dev/null +++ b/dash/pie-charts.jl @@ -0,0 +1,41 @@ +using Dash +using DashHtmlComponents +using DashCoreComponents +using PlotlyJS, CSV, DataFrames + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +df = dataset(DataFrame, "tips") + +app.layout = html_div() do + html_p("Names:"), + dcc_dropdown( + id="names", + value="day", + options=[ + (value = x, label = x) + for x in ["smoker", "day", "time", "sex"] + ], + clearable=false + ), + html_p("Values:"), + dcc_dropdown( + id="values", + value="total_bill", + options=[ + (value = x, label = x) + for x in ["total_bill", "tip", "size"] + ], + clearable=false + ), + dcc_graph(id="pie-chart") +end + +callback!( + app, + Output("pie-chart", "figure"), + [Input("values", "value"), Input("names", "value")] +) do v, n + plot(pie(values=df[!,v], labels=df[!, n])) +end +run_server(app, "0.0.0.0", 8080) diff --git a/dash/plot-data-from-csv.jl b/dash/plot-data-from-csv.jl new file mode 100644 index 0000000..4fe1ea5 --- /dev/null +++ b/dash/plot-data-from-csv.jl @@ -0,0 +1,32 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS, CSV, DataFrames, HTTP + +df = CSV.File( + HTTP.get("https://raw.githubusercontent.com/plotly/datasets/master/2014_apple_stock.csv").body +) |> DataFrame + + +app = dash(external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + dcc_graph(id="graph"), + html_button("Switch Axis", id="btn", n_clicks=0) +end + +callback!(app, Output("graph", "figure"), Input("btn", "n_clicks")) do val + + if val % 2 == 0 + x = "AAPL_x" + y = "AAPL_y" + else + x = "AAPL_y" + y = "AAPL_x" + end + + fig = plot(scatter(mode="lines", x=df[!,x], y=df[!, y])) + return fig +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/sankey-diagram.jl b/dash/sankey-diagram.jl new file mode 100644 index 0000000..5314fa9 --- /dev/null +++ b/dash/sankey-diagram.jl @@ -0,0 +1,58 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS, HTTP, JSON + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +response = HTTP.get("https://raw.githubusercontent.com/plotly/plotly.js/master/test/image/mocks/sankey_energy.json") +data = JSON.parse(String(response.body)) + +app.layout = html_div() do + dcc_graph(id="graph"), + html_p("Opacity"), + dcc_slider(id="opacity", min=0, max=1, value=0.5, step=0.1) +end + +callback!(app, Output("graph", "figure"), Input("opacity", "value")) do val + node = data["data"][1]["node"] + link = data["data"][1]["link"] + + node["color"] = [ + c == "magenta" ? + string("rbga(255,0,255,", val, ")") : + replace(c, "0.8" => val) + for c in node["color"] + ] + + link["color"] = [ + node["color"][src + 1] # account for 1 based index + for src in link["source"] + ] + + fig = plot( + sankey( + valueformat=".0f", + valuesuffix="TWh", + # Define nodes + node=attr( + pad=15, + thickness=15, + line=attr(color="black", width=0.5), + label=data["data"][1]["node"]["label"], + color=data["data"][1]["node"]["color"] + ), + # Add links + link=attr( + source=data["data"][1]["link"]["source"], + target=data["data"][1]["link"]["target"], + value=data["data"][1]["link"]["value"], + label=data["data"][1]["link"]["label"], + color=data["data"][1]["link"]["color"] + ) + ) + ) + return fig +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/shapes.jl b/dash/shapes.jl new file mode 100644 index 0000000..7cd9c63 --- /dev/null +++ b/dash/shapes.jl @@ -0,0 +1,28 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS + +app = dash(external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + dcc_graph(id="graph"), + html_button("Move Up", id="btn-up", n_clicks=0), + html_button("Move Down", id="btn-down", n_clicks=0) +end + +callback!( + app, + Output("graph","figure"), + [ + Input("btn-up", "n_clicks"), + Input("btn-down", "n_clicks") + ] +) do n_up, n_down + n = n_up - n_down + fig = plot(scatter(x=[1,0,2,1], y=[2,0,n,2], fill="toself")) + + return fig +end + +run_server(app, "0.0.0.0", 8080) \ No newline at end of file diff --git a/dash/statistical-charts.jl b/dash/statistical-charts.jl new file mode 100644 index 0000000..eccdee7 --- /dev/null +++ b/dash/statistical-charts.jl @@ -0,0 +1,35 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using Distributions +app = dash(external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + dcc_graph(id="graph"), + html_p("Mean:"), + dcc_slider( + id="mean", + min=-3, max=3, value=0, + marks=Dict("-3"=>"-3", "3"=> "3") + ), + html_p("Standard Deviation:"), + dcc_slider(id="std", + min=1, max=3, value=1, + marks=Dict("1"=> "1", "3"=> "3") + ) +end + +callback!( + app, + Output("graph", "figure"), + [ + Input("mean", "value"), + Input("std", "value") + ] +) do mean, std + data = rand(Normal(mean, std), 500) + fig = plot(histogram(x=data, nbins=30, range_x=[-10,10])) + return fig +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/subplots.jl b/dash/subplots.jl new file mode 100644 index 0000000..2dd2e1a --- /dev/null +++ b/dash/subplots.jl @@ -0,0 +1,29 @@ +using Dash +using DashHtmlComponents +using DashCoreComponents +using PlotlyJS, CSV, DataFrames + +app = dash(external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +df = dataset(DataFrame, "tips") + +app.layout = html_div() do + dcc_graph(id = "graph"), + html_p("Subplots Width:"), + dcc_slider(id="slider-width", min=0, max=1, value=0.5, step=0.01) +end + +callback!(app, Output("graph", "figure"), Input("slider-width", "value")) do val + fig = make_subplots( + rows=1, + cols=2, + specs=[Spec(kind="scatter") Spec(kind="scatter")], + column_widths=[val, 1-val] + ) + add_trace!(fig, scatter(x=[1,2,3],y=[1,2,3]), row=1, col=1) + add_trace!(fig, scatter(x=[1,2,3], y=[1,2,3]), row=1, col=2) + return fig +end + + +run_server(app, "0.0.0.0", 8080) \ No newline at end of file diff --git a/dash/tables.jl b/dash/tables.jl new file mode 100644 index 0000000..15bcae2 --- /dev/null +++ b/dash/tables.jl @@ -0,0 +1,28 @@ +using Dash +using DashHtmlComponents +using DashCoreComponents +using DashTable +using HTTP +using Tables +using PlotlyJS, CSV, DataFrames + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +data_url = "https://raw.githubusercontent.com/plotly/datasets/master/2014_usa_states.csv" + +df = CSV.File( + HTTP.get(data_url).body +) |> DataFrame + +app.layout = html_div() do + dash_datatable( + id="table", + columns=[(;name, id=name) for name in names(df)], + data=rowtable(df), + style_cell=(textAlign = "left",), + style_header=(backgroundColor = "paleturquoise",), + style_data=(backgroundColor = "lavender",) + ) +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/text-and-annotations.jl b/dash/text-and-annotations.jl new file mode 100644 index 0000000..53bf8c8 --- /dev/null +++ b/dash/text-and-annotations.jl @@ -0,0 +1,48 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS, CSV, DataFrames + +df = dataset(DataFrame, "gapminder") +df_07 = df[df.year .== 2007, :] + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + dcc_graph(id="graph"), + html_p("Text Position"), + dcc_radioitems( + id="pos-x", + options=[(label = x, value = x) for x in ["left", "center", "right"]], + value="center", + labelStyle=(display = "inline-block",) + ), + dcc_radioitems( + id="pos-y", + options=[(label = x, value = x) for x in ["top", "bottom"]], + value="top", + labelStyle=(display = "inline-block",) + ) +end + +callback!( + app, + Output("graph", "figure"), + [Input("pos-x", "value"), Input("pos-y", "value")] +) do pos_x, pos_y + print(string(pos_y, " ", pos_x)) + fig = plot( + df_07, + mode="markers+text", + x=:gdpPercap, y=:lifeExp, + text=:country, + size_max=60, + textposition=string(pos_y, " ", pos_x), + Layout( + xaxis_log=true, + title="GDP and Life Expectancy, 2007" + ) + ) +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/tick-formatting.jl b/dash/tick-formatting.jl new file mode 100644 index 0000000..fc5deaf --- /dev/null +++ b/dash/tick-formatting.jl @@ -0,0 +1,42 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + dcc_graph(id="graph"), + dcc_checklist( + id="tick", + options=[ + (label = "Enable Linear Ticks", value = "linear") + ], + value=["linear"] + ) + +end + +callback!(app, Output("graph", "figure"), Input("tick", "value")) do val + + fig = plot( + scatter( + x=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], + y=[ + 28.8, 28.5, 37, 56.8, 69.7, 79.7, 78.5, + 77.8, 74.1, 62.6, 45.3, 39.9 + ] + ) + ) + if "linear" in val + relayout!(fig, xaxis=( + tickmode = "linear", + tick0 = 0.5, + dtick = 0.75 + )) + end + + return fig +end + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/time-series.jl b/dash/time-series.jl new file mode 100644 index 0000000..2e1cc4e --- /dev/null +++ b/dash/time-series.jl @@ -0,0 +1,26 @@ +using Dash +using DashHtmlComponents +using DashCoreComponents +using PlotlyJS, CSV, DataFrames +using Distributions +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +df = dataset(DataFrame, "stocks") + +app.layout = html_div() do + dcc_dropdown( + id="ticker", + options=[(label = x, value = x) for x in names(df)[2:end]], + value=names(df)[2], + clearable=false + ), + dcc_graph(id="graph") +end + +callback!(app, Output("graph", "figure"), Input("ticker", "value")) do ticker + fig = plot(df, x=:date, y=df[!, ticker], mode="lines") + return fig +end + + +run_server(app, "0.0.0.0", 8080) diff --git a/dash/troubleshooting.jl b/dash/troubleshooting.jl new file mode 100644 index 0000000..3e4e9b2 --- /dev/null +++ b/dash/troubleshooting.jl @@ -0,0 +1,18 @@ +using Dash +using DashCoreComponents +using DashHtmlComponents +using PlotlyJS + +app = dash(external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"]) + +app.layout = html_div() do + dcc_graph(id="graph", figure=plot( + bar( + x=[0,1,2], + y=[2,1,3] + ), + Layout(title_text="Native PlotlyJS.jl rendering in Dash") + )) +end + +run_server(app, "0.0.0.0", 8080, debug=true) diff --git a/julia/2D-Histogram.md b/julia/2D-Histogram.md index c2b735b..cab708d 100644 --- a/julia/2D-Histogram.md +++ b/julia/2D-Histogram.md @@ -51,7 +51,7 @@ plot( ) ``` -Density heatmaps can also be [faceted](/julia/facet-plots/): +Density heatmaps can also be faceted: ```julia using PlotlyJS, CSV, DataFrames diff --git a/julia/3d-axes.md b/julia/3d-axes.md index eadfebd..d330008 100644 --- a/julia/3d-axes.md +++ b/julia/3d-axes.md @@ -29,7 +29,7 @@ jupyter: attributes such as `xaxis`, `yaxis` and `zaxis` parameters, in order to set the range, title, ticks, color etc. of the axes. -For creating 3D charts, see [this page](https://plotly.com/julia/3d-charts/). + ```julia using PlotlyJS diff --git a/julia/3d-iso-surface-plots.md b/julia/3d-iso-surface-plots.md index 29bbd7e..adc67bc 100644 --- a/julia/3d-iso-surface-plots.md +++ b/julia/3d-iso-surface-plots.md @@ -19,11 +19,13 @@ jupyter: name: 3D Isosurface Plots order: 10 page_type: example_index - permalink: juila/3d-isosurface-plots/ + permalink: julia/3d-isosurface-plots/ redirect_from: julia/isosurfaces-with-marching-cubes/ thumbnail: thumbnail/isosurface.jpg --- +# NOTE: this permalink does not work + With `go.Isosurface`, you can plot [isosurface contours](https://en.wikipedia.org/wiki/Isosurface) of a scalar field `value`, which is defined on `x`, `y` and `z` coordinates. #### Basic Isosurface diff --git a/julia/3d-surface-plots.md b/julia/3d-surface-plots.md index d60dcf5..4b1444d 100644 --- a/julia/3d-surface-plots.md +++ b/julia/3d-surface-plots.md @@ -71,7 +71,7 @@ plot(surface(z=z_data, x=x, y=y), layout) #### Surface Plot With Contours -Display and customize contour data for each axis using the `contours` attribute ([reference](plotly.com/julia/reference/surface/#surface-contours)). +Display and customize contour data for each axis using the `contours` attribute. ```julia using PlotlyJS, CSV, HTTP, DataFrames diff --git a/julia/3d-volume.md b/julia/3d-volume.md index ae12c55..a8b3eb9 100644 --- a/julia/3d-volume.md +++ b/julia/3d-volume.md @@ -23,7 +23,7 @@ jupyter: thumbnail: thumbnail/3d-volume-plots.jpg --- -A volume plot with `volume` shows several partially transparent isosurfaces for volume rendering. The API of `volume` is close to the one of `isosurface`. However, whereas [isosurface plots](/julia/3d-isosurface-plots/) show all surfaces with the same opacity, tweaking the `opacityscale` parameter of `volume` results in a depth effect and better volume rendering. +A volume plot with `volume` shows several partially transparent isosurfaces for volume rendering. The API of `volume` is close to the one of `isosurface`. However, whereas isosurface plots show all surfaces with the same opacity, tweaking the `opacityscale` parameter of `volume` results in a depth effect and better volume rendering. ## Basic volume plot @@ -253,6 +253,4 @@ plot(volume( See https://plotly.com/julia/reference/volume/ for more information and chart attribute options! -#### See also -[3D isosurface documentation](/julia/3d-isosurface-plots/) diff --git a/julia/axes.md b/julia/axes.md index 94b1559..024ffef 100644 --- a/julia/axes.md +++ b/julia/axes.md @@ -25,30 +25,27 @@ jupyter: thumbnail: thumbnail/axes.png --- -This tutorial explain how to set the properties of [2-dimensional Cartesian axes](/julia/figure-structure/#2d-cartesian-trace-types-and-subplots), namely [`layout.xaxis`](/julia/reference/layout/xaxis/) and [`layout.yaxis`](julia/reference/layout/xaxis/). +This tutorial explain how to set the properties of [2-dimensional Cartesian axes], namely [`layout.xaxis`](/julia/reference/layout/xaxis/) and [`layout.yaxis`](/julia/reference/layout/yaxis/). Other kinds of subplots and axes are described in other tutorials: - [3D axes](/julia/3d-axes) The axis object is [`layout.Scene`](/julia/reference/layout/scene/) - [Polar axes](/julia/polar-chart/). The axis object is [`layout.Polar`](/julia/reference/layout/polar/) -- [Ternary axes](/julia/ternary-plots). The axis object is [`layout.Ternary`](/julia/reference/layout/ternary/) -- [Geo axes](/julia/map-configuration/). The axis object is [`layout.Geo`](/julia/reference/layout/geo/) -- [Mapbox axes](/julia/mapbox-layers/). The axis object is [`layout.Mapbox`](/julia/reference/layout/mapbox/) -- [Color axes](/julia/colorscales/). The axis object is [`layout.Coloraxis`](/julia/reference/layout/coloraxis/). -**See also** the tutorials on [facet plots](/julia/facet-plots/), [subplots](/julia/subplots) and [multiple axes](/julia/multiple-axes/). + +**See also** the tutorials on [subplots](/julia/subplots) and [multiple axes](/julia/multiple-axes/). ### 2-D Cartesian Axis Types and Auto-Detection The different types of Cartesian axes are configured via the `xaxis.type` or `yaxis.type` attribute, which can take on the following values: - `'linear'` as described in this page -- `'log'` (see the [log plot tutorial](/julia/log-plots/)) +- `'log'` - `'date'` (see the [tutorial on timeseries](/julia/time-series/)) -- `'category'` (see the [categorical axes tutorial](/julia/categorical-axes/)) -- `'multicategory'` (see the [categorical axes tutorial](/julia/categorical-axes/)) +- `'category'` +- `'multicategory'` -The axis type is auto-detected by looking at data from the first [trace](/julia/figure-structure/) linked to this axis: +The axis type is auto-detected by looking at data from the first [trace] linked to this axis: - First check for `multicategory`, then `date`, then `category`, else default to `linear` (`log` is never automatically selected) - `multicategory` is just a shape test: is the array nested? @@ -78,7 +75,7 @@ The different groups of Cartesian axes properties are - range of the axis - domain of the axis -The examples on this page apply to axes of any type, but extra attributes are available for [axes of type `category`](/juliae/categorical-axes/) and [axes of type `date`](/julia/time-series/). +The examples on this page apply to axes of any type, but extra attributes are available for [axes of type `category`](/julia/axes/) and [axes of type `date`](/julia/time-series/). #### Set and Style Axes Title Labels diff --git a/julia/cone-plot.md b/julia/cone-plot.md index 6c8a6f7..36f5677 100644 --- a/julia/cone-plot.md +++ b/julia/cone-plot.md @@ -24,7 +24,7 @@ jupyter: thumbnail: thumbnail/3dcone.png --- -A cone plot is the 3D equivalent of a 2D [quiver plot](/julia/quiver-plots/), i.e., it represents a 3D vector field using cones to represent the direction and norm of the vectors. 3-D coordinates are given by `x`, `y` and `z`, and the coordinates of the vector field by `u`, `v` and `w`. +A cone plot is the 3D equivalent of a 2D [quiver plot], i.e., it represents a 3D vector field using cones to represent the direction and norm of the vectors. 3-D coordinates are given by `x`, `y` and `z`, and the coordinates of the vector field by `u`, `v` and `w`. ### Basic 3D Cone diff --git a/julia/dot-plots.md b/julia/dot-plots.md index 1af9339..edc003f 100644 --- a/julia/dot-plots.md +++ b/julia/dot-plots.md @@ -25,7 +25,7 @@ jupyter: #### Basic Dot Plot -Dot plots (also known as [Cleveland dot plots]()) are [scatter plots](https://plotly.com/julia/line-and-scatter/) with one categorical axis and one continuous axis. They can be used to show changes between two (or more) points in time or between two (or more) conditions. Compared to a [bar chart](/julia/bar-charts/), dot plots can be less cluttered and allow for an easier comparison between conditions. +Dot plots (also known as [Cleveland dot plots](https://en.wikipedia.org/wiki/Dot_plot_(statistics))) are [scatter plots](https://plotly.com/julia/line-and-scatter/) with one categorical axis and one continuous axis. They can be used to show changes between two (or more) points in time or between two (or more) conditions. Compared to a [bar chart](/julia/bar-charts/), dot plots can be less cluttered and allow for an easier comparison between conditions. For the same data, we show below how to create a dot plot using `scatter`. diff --git a/julia/getting-started-with-chart-studio.md b/julia/getting-started-with-chart-studio.md new file mode 100644 index 0000000..e5bb4a6 --- /dev/null +++ b/julia/getting-started-with-chart-studio.md @@ -0,0 +1,132 @@ +--- +jupyter: + jupytext: + notebook_metadata_filter: all + text_representation: + extension: .md + format_name: markdown + format_version: "1.2" + jupytext_version: 1.4.2 + kernelspec: + display_name: Julia 1.6.0 + language: julia + name: julia-1.6 + plotly: + description: Installation and Initialization Steps for Using Chart Studio in Julia + display_as: chart_studio + language: julia + layout: base + name: Getting Started with Plotly + order: 0.1 + page_type: example_index + permalink: julia/getting-started-with-chart-studio/ + thumbnail: thumbnail/bubble.jpg +--- + +### Installation + +To install Chart Studio's Julia package, use the built-in Julia package manager to install the `Plotly` package. + +``` +using Pkg +Pkg.add("Plotly") +``` + +Plotly's main Julia package is called PlotlyJS.jl. PlotlyJS.jl drives all the plot creation. Plotly.jl is an interface between PlotlyJS.jl and the chart-studio web service. + +### Initialization for Online Plotting + +Chart Studio provides a web-service for hosting graphs! Create a [free account](https://plotly.com/api_signup) to get started. Graphs are saved inside your online Chart Studio account and you control the privacy. Public hosting is free, for private hosting, check out our [paid plans](https://plotly.com/products/cloud/). + +After installing the Plotly.jl package, you're ready to fire up julia: + +`$ julia` + +and set your credentials: + +``` +using Plotly +Plotly.signin("DemoAccount", "lr1c37zw81") +``` + + + +You'll need to replace **"DemoAccount"** and **"lr1c37zw81"** with _your_ Plotly username and [API key](https://plotly.com/settings/api). +Find your API key [here](https://plotly.com/settings/api). + +The initialization step places a special **.plotly/.credentials** file in your home directory. Your **~/.plotly/.credentials** file should look something like this: + +```json +{ + "username": "DemoAccount", + "api_key": "lr1c37zw81" +} +``` + + + +### Online Plot Privacy + +Plot can be set to three different type of privacies: public, private or secret. + +- **public**: Anyone can view this graph. It will appear in your profile and can appear in search engines. You do not need to be logged in to Chart Studio to view this chart. +- **private**: Only you can view this plot. It will not appear in the Plotly feed, your profile, or search engines. You must be logged in to Plotly to view this graph. You can privately share this graph with other Chart Studio users in your online Chart Studio account and they will need to be logged in to view this plot. +- **secret**: Anyone with this secret link can view this chart. It will not appear in the Chart Studio feed, your profile, or search engines. If it is embedded inside a webpage or an IPython notebook, anybody who is viewing that page will be able to view the graph. You do not need to be logged in to view this plot. + +By default all plots are set to **public**. Users with free account have the permission to keep one private plot. If you need to save private plots, [upgrade to a pro account](https://plotly.com/plans). If you're a [Personal or Professional user](https://plotly.com/settings/subscription/?modal=true&utm_source=api-docs&utm_medium=support-oss) and would like the default setting for your plots to be private, you can edit your Chart Studio configuration: + +``` +using Plotly +Plotly.set_config_file( + world_readable=false, + sharing="private" +) + +``` + +### Special Instructions for [Chart Studio Enterprise](https://plotly.com/product/enterprise/) Users + +Your API key for account on the public cloud will be different than the API key in Chart Studio Enterprise. Visit https://plotly.your-company.com/settings/api/ to find your Chart Studio Enterprise API key. Remember to replace "your-company.com" with the URL of your Chart Studio Enterprise server. +If your company has a Chart Studio Enterprise server, change the API endpoint so that it points to your company's Plotly server instead of Plotly's cloud. + +In Julia, enter: + +``` +using Plotly +Plotly.set_config_file( + plotly_domain="https://plotly.your-company.com", + plotly_streaming_domain="https://stream-plotly.your-company.com" +) +``` + +Make sure to replace **"your-company.com"** with the URL of _your_ Chart Studio Enterprise server. + +Additionally, you can set your configuration so that you generate **private plots by default**. + +In pJulia, enter: + +``` +using Plotly +Plotly.set_config_file( + plotly_domain="https://plotly.your-company.com", + plotly_streaming_domain="https://stream-plotly.your-company.com", + world_readable=false, + sharing="private" +) + +``` + +### Start Plotting Online + +When plotting online, the plot and data will be saved to your cloud account. The main workflow for plotting on line is to first create a plot using any of the plotting commands from PlotlyJS.jl. Then, with the plot in hand, call the `Plotly.post` function. This will "post" the plot to your Chart Studio account. + +Copy and paste the following example to create your first hosted Plotly graph using the Plotly Julia library: + +``` +using Plotly + +trace0 = scatter(x=1:4, y=[10, 15, 13, 17]) +trace1 = scatter(1:4, y=[16, 5, 11, 9]) +p = plot([trace0, trace1]) +Plotly.post(p, filename="basic-line") +``` diff --git a/julia/graphing-multiple-chart-types.md b/julia/graphing-multiple-chart-types.md index 6116a86..2777c50 100644 --- a/julia/graphing-multiple-chart-types.md +++ b/julia/graphing-multiple-chart-types.md @@ -25,7 +25,7 @@ jupyter: ### Chart Types versus Trace Types -Plotly figures support defining [subplots](/julia/subplots/) of various types (e.g. cartesian, [polar](/julia/polar-chart/), [3-dimensional](/julia/3d-charts/), [maps](/julia/maps/) etc) with attached traces of various compatible types (e.g. scatter, bar, choropleth, surface etc). This means that **Plotly figures are not constrained to representing a fixed set of "chart types"** such as scatter plots only or bar charts only or line charts only: any subplot can contain multiple traces of different types. +Plotly figures support defining [subplots](/julia/subplots/) of various types (e.g. cartesian, [polar](/julia/polar-chart/), [3-dimensional], [maps] etc) with attached traces of various compatible types (e.g. scatter, bar, choropleth, surface etc). This means that **Plotly figures are not constrained to representing a fixed set of "chart types"** such as scatter plots only or bar charts only or line charts only: any subplot can contain multiple traces of different types. ### Multiple Trace Types diff --git a/julia/images.md b/julia/images.md index 1705310..49db25c 100644 --- a/julia/images.md +++ b/julia/images.md @@ -25,7 +25,7 @@ jupyter: #### Add a Background Image -In this page we explain how to add static, non-interactive images as background, logo or annotation images to a figure. For exploring image data in interactive charts, see the [tutorial on displaying image data](/julia/imshow). +In this page we explain how to add static, non-interactive images as background, logo or annotation images to a figure. For exploring image data in interactive charts, see the [tutorial on displaying image data]. A background image can be added to the layout of a figure with the `images` parameter of `gLayout`. The `source` attribute of a `layout.Image` should be the URL of the image. diff --git a/julia/interactve-html-export.md b/julia/interactve-html-export.md index 0d478ae..4133a5e 100644 --- a/julia/interactve-html-export.md +++ b/julia/interactve-html-export.md @@ -27,7 +27,7 @@ jupyter: ### Interactive vs Static Export -Plotly figures are interactive when viewed in a web browser: you can hover over data points, pan and zoom axes, and show and hide traces by clicking or double-clicking on the legend. You can export figures either to [static image file formats like PNG, JPEG, SVG or PDF](/julia/static-image-export/) or you can export them to HTML files which can be opened in a browser. This page explains how to do the latter. +Plotly figures are interactive when viewed in a web browser: you can hover over data points, pan and zoom axes, and show and hide traces by clicking or double-clicking on the legend. You can export figures either to [static image file formats like PNG, JPEG, SVG or PDF] or you can export them to HTML files which can be opened in a browser. This page explains how to do the latter. ### Saving to an HTML file diff --git a/julia/legend.md b/julia/legend.md index ceacffb..cfc4ee9 100644 --- a/julia/legend.md +++ b/julia/legend.md @@ -26,11 +26,11 @@ jupyter: ### Trace Types, Legends and Color Bars -[Traces](/julia/figure-structure) of most types can be optionally associated with a single legend item in the [legend](/julia/legend/). Whether or not a given trace appears in the legend is controlled via the `showlegend` attribute. Traces which are their own subplots (see above) do not support this, with the exception of traces of type `pie` and `funnelarea` for which every distinct color represented in the trace gets a separate legend item. Users may show or hide traces by clicking or double-clicking on their associated legend item. Traces that support legend items also support the `legendgroup` attribute, and all traces with the same legend group are treated the same way during click/double-click interactions. +[Traces] of most types can be optionally associated with a single legend item in the [legend](/julia/legend/). Whether or not a given trace appears in the legend is controlled via the `showlegend` attribute. Traces which are their own subplots (see above) do not support this, with the exception of traces of type `pie` and `funnelarea` for which every distinct color represented in the trace gets a separate legend item. Users may show or hide traces by clicking or double-clicking on their associated legend item. Traces that support legend items also support the `legendgroup` attribute, and all traces with the same legend group are treated the same way during click/double-click interactions. -The fact that legend items are linked to traces means that when using [discrete color](/julia/discrete-color/), a figure must have one trace per color in order to get a meaningful legend. +The fact that legend items are linked to traces means that when using [discrete color], a figure must have one trace per color in order to get a meaningful legend. -Traces which support [continuous color](/julia/colorscales/) can also be associated with color axes in the layout via the `coloraxis` attribute. Multiple traces can be linked to the same color axis. Color axes have a legend-like component called color bars. Alternatively, color axes can be configured within the trace itself. +Traces which support [continuous color] can also be associated with color axes in the layout via the `coloraxis` attribute. Multiple traces can be linked to the same color axis. Color axes have a legend-like component called color bars. Alternatively, color axes can be configured within the trace itself. ### Legends with DataFrame @@ -55,7 +55,7 @@ plot( ### Legend Order -By default, Plotly lays out legend items in the order in which values appear in the underlying data. Every function also includes a `category_orders` keyword argument which can be used to control [the order in which categorical axes are drawn](/julia/categorical-axes/), but beyond that can also control the order in which legend items appear, and [the order in which facets are laid out](/julia/facet-plots/). +By default, Plotly lays out legend items in the order in which values appear in the underlying data. Every function also includes a `category_orders` keyword argument which can be used to control [the order in which categorical axes are drawn], but beyond that can also control the order in which legend items appear, and [the order in which facets are laid out]. ```julia using PlotlyJS, CSV, DataFrames @@ -153,7 +153,7 @@ plot( ### Legend Positioning -Legends have an anchor point, which can be set to a point within the legend using `layout.legend.xanchor` and `layout.legend.yanchor`. The coordinate of the anchor can be positioned with `layout.legend.x` and `layout.legend.y` in [paper coordinates](/julia/figure-structure/). Note that the plot margins will grow so as to accommodate the legend. The legend may also be placed within the plotting area. +Legends have an anchor point, which can be set to a point within the legend using `layout.legend.xanchor` and `layout.legend.yanchor`. The coordinate of the anchor can be positioned with `layout.legend.x` and `layout.legend.y` in [paper coordinates]. Note that the plot margins will grow so as to accommodate the legend. The legend may also be placed within the plotting area. ```julia using PlotlyJS, DataFrames, CSV diff --git a/julia/line-charts.md b/julia/line-charts.md index 36db12c..70eaee3 100644 --- a/julia/line-charts.md +++ b/julia/line-charts.md @@ -169,7 +169,7 @@ plot([trace1 ,trace2, trace3, trace4, trace5, trace6], layout) #### Connect Data Gaps -[connectgaps](https://plotly.com/julia/reference/scatter/#scatter-connectgaps) determines if missing values in the provided data are shown as a gap in the graph or not. In [this tutorial](https://plotly.com/julia/filled-area-on-mapbox/#multiple-filled-areas-with-a-scattermapbox-trace), we showed how to take benefit of this feature and illustrate multiple areas in mapbox. +[connectgaps](https://plotly.com/julia/reference/scatter/#scatter-connectgaps) determines if missing values in the provided data are shown as a gap in the graph or not. ```julia using PlotlyJS diff --git a/julia/ml-pca.md b/julia/ml-pca.md index d955476..c00d70b 100644 --- a/julia/ml-pca.md +++ b/julia/ml-pca.md @@ -11,7 +11,7 @@ jupyter: description: Visualize Principle Component Analysis (PCA) of your high-dimensional data in Julia with PlotlyJS.jl. display_as: ai_ml - language: python + language: julia layout: base name: PCA Visualization order: 4 @@ -179,7 +179,8 @@ plot(components, x=:x1, y=:x2, color=:species, mode="markers") ## Visualize PCA with `scatter3d` -With the `scatter_3d` trace type, you can visualize an additional dimension, which let you capture even more variance. +With the `scatter_3d` trace type, you can visualize an additional dimension, +which let you capture even more variance. ```julia using PlotlyJS, CSV, DataFrames, MLJ @@ -208,17 +209,25 @@ plot( ## Plotting explained variance -Often, you might be interested in seeing how much variance PCA is able to explain as you increase the number of components, in order to decide how many dimensions to ultimately keep or analyze. This example shows you how to quickly plot the cumulative sum of explained variance for a high-dimensional dataset like [spectrometer](https://www.openml.org/d/313). +Often, you might be interested in seeing how much variance PCA is able to +explain as you increase the number of components, in order to decide how many +dimensions to ultimately keep or analyze. This example shows you how to quickly +plot the cumulative sum of explained variance for a high-dimensional dataset +like [spectrometer](https://www.openml.org/d/313). -With a higher explained variance, you are able to capture more variability in your dataset, which could potentially lead to better performance when training your model. For a more mathematical explanation, see this [Q&A thread](https://stats.stackexchange.com/questions/22569/pca-and-proportion-of-variance-explained). +With a higher explained variance, you are able to capture more variability in +your dataset, which could potentially lead to better performance when training +your model. For a more mathematical explanation, see this [Q&A +thread](https://stats.stackexchange.com/questions/22569/pca-and-proportion-of-variance-explained). ```julia using PlotlyJS, DataFrames, MLJ -spectrometer = OpenML.load(313, parser=:auto) +spectrometer = OpenML.load(313, verbosity=0) skip = [Symbol("LRS-name"), Symbol("LRS-class"), Symbol("ID-type")] -_, X = unpack(spectrometer, x -> x in skip, colname->true) -df = Float64.(DataFrame(X)) +df_all = DataFrame(spectrometer) +features = [x for x in Symbol.(names(df_all)) if !(x in skip)] +df = Float64.(df_all[!, features]) PCA = @load PCA pkg="MultivariateStats" mach = machine(PCA(pratio=0.995), df) @@ -240,13 +249,17 @@ plot( ## Visualize Loadings -It is also possible to visualize loadings using `shapes`, and use `annotations` to indicate which feature a certain loading original belong to. Here, we define loadings as: +It is also possible to visualize loadings using `shapes`, and use `annotations` +to indicate which feature a certain loading original belong to. Here, we define +loadings as: $$ loadings = eigenvectors \cdot \sqrt{eigenvalues} $$ -For more details about the linear algebra behind eigenvectors and loadings, see this [Q&A thread](https://stats.stackexchange.com/questions/143905/loadings-vs-eigenvectors-in-pca-when-to-use-one-or-another). +For more details about the linear algebra behind eigenvectors and loadings, see +this [Q&A +thread](https://stats.stackexchange.com/questions/143905/loadings-vs-eigenvectors-in-pca-when-to-use-one-or-another). ```julia using PlotlyJS, CSV, DataFrames, MLJ diff --git a/julia/sankey-diagram.md b/julia/sankey-diagram.md index dd733db..05b11b6 100644 --- a/julia/sankey-diagram.md +++ b/julia/sankey-diagram.md @@ -129,7 +129,7 @@ plot( ### Hovertemplate and customdata of Sankey diagrams -Links and nodes have their own hovertemplate, in which link- or node-specific attributes can be displayed. To add more data to links and nodes, it is possible to use the `customdata` attribute of `link` and `nodes`, as in the following example. For more information about hovertemplate and customdata, please see the [tutorial on hover text](/julia/hover-text-and-formatting/). +Links and nodes have their own hovertemplate, in which link- or node-specific attributes can be displayed. To add more data to links and nodes, it is possible to use the `customdata` attribute of `link` and `nodes`, as in the following example. For more information about hovertemplate and customdata, please see the [tutorial on hover text]. ```julia using PlotlyJS @@ -182,4 +182,4 @@ plot(sankey( ### Reference -See [https://plotly.com/julia/reference/sankey](https://plotly.com/jluia/reference/sankey/) for more information and options! +See [https://plotly.com/julia/reference/sankey](https://plotly.com/julia/reference/sankey/) for more information and options! diff --git a/julia/shapes.md b/julia/shapes.md index 5f03fdf..e70ab30 100644 --- a/julia/shapes.md +++ b/julia/shapes.md @@ -253,7 +253,7 @@ p = plot( #### Highlighting Time Series Regions with Rectangle Shapes -_Note:_ there are [special methods `add_hline`, `add_vline`, `add_hrect` and `add_vrect` for the common cases of wanting to draw horizontal or vertical lines or rectangles](/julia/horizontal-vertical-shapes/) that are fixed to data coordinates in one axis and absolutely positioned in another. +_Note:_ there are [special methods `add_hline`, `add_vline`, `add_hrect` and `add_vrect` for the common cases of wanting to draw horizontal or vertical lines or rectangles] that are fixed to data coordinates in one axis and absolutely positioned in another. ```julia using PlotlyJS @@ -542,7 +542,7 @@ fig You can create layout shapes programmatically, but you can also draw shapes manually by setting the `dragmode` to one of the shape-drawing modes: `'drawline'`,`'drawopenpath'`, `'drawclosedpath'`, `'drawcircle'`, or `'drawrect'`. If you need to switch between different shape-drawing or other dragmodes (panning, selecting, etc.), [modebar buttons can be added](/julia/configuration-options#add-optional-shapedrawing-buttons-to-modebar) in the `config` to select the dragmode. If you switch to a different dragmode such as pan or zoom, you will need to select the drawing tool in the modebar to go back to shape drawing. -This shape-drawing feature is particularly interesting for annotating graphs, in particular [image traces](/julia/imshow) or [layout images](/julia/images). +This shape-drawing feature is particularly interesting for annotating graphs, in particular [image traces] or [layout images](/julia/images). Once you have drawn shapes, you can select and modify an existing shape by clicking on its boundary (note the arrow pointer). Its fillcolor turns to pink to highlight the activated shape and then you can diff --git a/julia/table.md b/julia/table.md index 61a5b1c..791daf6 100644 --- a/julia/table.md +++ b/julia/table.md @@ -19,7 +19,7 @@ jupyter: name: Tables order: 11 page_type: example_index - permalink: julia-/table/ + permalink: julia/table/ thumbnail: thumbnail/table.gif --- diff --git a/julia/text-and-annotations.md b/julia/text-and-annotations.md index 0af5c04..c01b791 100644 --- a/julia/text-and-annotations.md +++ b/julia/text-and-annotations.md @@ -106,7 +106,7 @@ plot([trace1, trace2, trace3]) ### Controlling text fontsize with uniformtext -For the [pie](/julia/pie-charts), [bar](/julia/bar-charts), [sunburst](/julia/sunburst-charts) and [treemap](/julia/treemap-charts) traces, it is possible to force all the text labels to have the same size thanks to the `uniformtext` layout parameter. The `minsize` attribute sets the font size, and the `mode` attribute sets what happens for labels which cannot fit with the desired fontsize: either `hide` them or `show` them with overflow. +For the pie, [bar](/julia/bar-charts), sunburst, and treemap traces, it is possible to force all the text labels to have the same size thanks to the `uniformtext` layout parameter. The `minsize` attribute sets the font size, and the `mode` attribute sets what happens for labels which cannot fit with the desired fontsize: either `hide` them or `show` them with overflow. ```julia using PlotlyJS, CSV, DataFrames @@ -148,7 +148,7 @@ plot(trace, layout) ### Controlling text fontsize with textfont -The `textfont_size` parameter of the the [pie](/julia/pie-charts), [bar](/julia/bar-charts), [sunburst](/julia/sunburst-charts) and [treemap](/julia/treemap-charts) traces can be used to set the **maximum font size** used in the chart. Note that the `textfont` parameter sets the `insidetextfont` and `outsidetextfont` parameter, which can also be set independently. +The `textfont_size` parameter of the pie, [bar](/julia/bar-charts), sunburst, and treemap traces can be used to set the **maximum font size** used in the chart. Note that the `textfont` parameter sets the `insidetextfont` and `outsidetextfont` parameter, which can also be set independently. ```julia using PlotlyJS, CSV, DataFrames @@ -396,7 +396,7 @@ plot(trace, layout) ### Positioning Text Annotations Absolutely -By default, text annotations have `xref` and `yref` set to `"x"` and `"y"`, respectively, meaning that their x/y coordinates are with respect to the axes of the plot. This means that panning the plot will cause the annotations to move. Setting `xref` and/or `yref` to `"paper"` will cause the `x` and `y` attributes to be interpreted in [paper coordinates](/julia/figure-structure/#positioning-with-paper-container-coordinates-or-axis-domain-coordinates). +By default, text annotations have `xref` and `yref` set to `"x"` and `"y"`, respectively, meaning that their x/y coordinates are with respect to the axes of the plot. This means that panning the plot will cause the annotations to move. Setting `xref` and/or `yref` to `"paper"` will cause the `x` and `y` attributes to be interpreted in [paper coordinates]. Try panning or zooming in the following figure: @@ -528,7 +528,7 @@ plot(trace) ### Set Date in Text Template -The following example shows how to show date by setting [axis.type](https://plotly.com/julia/reference/layout/yaxis/#layout-yaxis-type) in [funnel charts](https://plotly.com/julia/funnel-charts/). +The following example shows how to show date by setting [axis.type](https://plotly.com/julia/reference/layout/yaxis/#layout-yaxis-type) in [funnel charts]. As you can see [textinfo](https://plotly.com/julia/reference/funnel/#funnel-textinfo) and [texttemplate](https://plotly.com/julia/reference/funnel/#funnel-texttemplate) have the same functionality when you want to determine 'just' the trace information on the graph. ```julia diff --git a/julia/time-series.md b/julia/time-series.md index 98dba49..b01f818 100644 --- a/julia/time-series.md +++ b/julia/time-series.md @@ -27,7 +27,7 @@ jupyter: Time series charts can be constructed from Julia either from Arrays or DataFrame columns with time like types (`DateTime` or `Date`). -For financial applications, Plotly can also be used to create [Candlestick charts](/julia/candlestick-charts/) and [OHLC charts](/julia/ohlc-charts/), which default to date axes. +For financial applications, Plotly can also be used to create [Candlestick charts](/julia/candlestick-charts/) and [OHLC charts], which default to date axes. ```julia using PlotlyJS, DataFrames, VegaDatasets, Dates