diff --git a/docs/Manifest.toml b/docs/Manifest.toml index d38c923f..b046c6aa 100644 --- a/docs/Manifest.toml +++ b/docs/Manifest.toml @@ -22,27 +22,27 @@ version = "0.5.1" [[ChainRulesCore]] deps = ["Compat", "LinearAlgebra", "SparseArrays"] -git-tree-sha1 = "42e3c181483fbd2c416087a0a93838803e358358" +git-tree-sha1 = "5d64be50ea9b43a89b476be773e125cef03c7cd5" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "0.9.38" +version = "0.10.1" [[ColorTypes]] deps = ["FixedPointNumbers", "Random"] -git-tree-sha1 = "32a2b8af383f11cbb65803883837a149d10dfe8a" +git-tree-sha1 = "024fe24d83e4a5bf5fc80501a314ce0d1aa35597" uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.10.12" +version = "0.11.0" [[Colors]] deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] -git-tree-sha1 = "82f4e6ff9f847eca3e5ebc666ea2cd7b48e8b47e" +git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40" uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" -version = "0.12.7" +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 = "ac4132ad78082518ec2037ae5770b6e796f7f956" +git-tree-sha1 = "e4e2b39db08f967cc1360951f01e8a75ec441cab" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "3.27.0" +version = "3.30.0" [[CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] @@ -66,9 +66,9 @@ version = "1.6.0" [[DataFrames]] deps = ["Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] -git-tree-sha1 = "56ff5833e5b755d2db654479993e949e73606b64" +git-tree-sha1 = "66ee4fe515a9294a8836ef18eea7239c6ac3db5e" uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" -version = "1.0.0" +version = "1.1.1" [[DataStructures]] deps = ["Compat", "InteractiveUtils", "OrderedCollections"] @@ -101,9 +101,9 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[Distributions]] deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns"] -git-tree-sha1 = "a837fdf80f333415b69684ba8e8ae6ba76de6aaa" +git-tree-sha1 = "64a3e756c44dcf33bd33e7f500113d9992a02e92" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.24.18" +version = "0.25.2" [[DocStringExtensions]] deps = ["LibGit2", "Markdown", "Pkg", "Test"] @@ -205,10 +205,10 @@ deps = ["Libdl"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[LogExpFunctions]] -deps = ["DocStringExtensions"] -git-tree-sha1 = "49c5c32deda5999d15378b64ee10f2e87831ab25" +deps = ["DocStringExtensions", "LinearAlgebra"] +git-tree-sha1 = "1ba664552f1ef15325e68dc4c05c3ef8c2d5d885" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.2.2" +version = "0.2.4" [[Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -235,9 +235,9 @@ version = "2.6.0" [[Missings]] deps = ["DataAPI"] -git-tree-sha1 = "f8c673ccc215eb50fcadb285f522420e29e69e1c" +git-tree-sha1 = "4ea90bd5d3985ae1f9a908bd4500ae88921c5ce7" uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -version = "0.4.5" +version = "1.0.0" [[Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" @@ -250,14 +250,14 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" [[OpenSpecFun_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "9db77584158d0ab52307f8c04f8e7c08ca76b5b3" +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.3+4" +version = "0.5.5+0" [[OrderedCollections]] -git-tree-sha1 = "4fa2ba51070ec13fcc7517db714445b4ab986bdf" +git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.4.0" +version = "1.4.1" [[PDMats]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] @@ -295,15 +295,15 @@ version = "1.2.1" [[Preferences]] deps = ["TOML"] -git-tree-sha1 = "ea79e4c9077208cd3bc5d29631a26bc0cff78902" +git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a" uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.2.1" +version = "1.2.2" [[PrettyTables]] deps = ["Crayons", "Formatting", "Markdown", "Reexport", "Tables"] -git-tree-sha1 = "a7162ad93a899333717481f448a235ffafeb5eba" +git-tree-sha1 = "b60494adf99652d220cdef46f8a32232182cc22d" uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" -version = "1.0.0" +version = "1.0.1" [[Printf]] deps = ["Unicode"] @@ -329,9 +329,9 @@ uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" version = "1.1.1" [[Reexport]] -git-tree-sha1 = "57d8440b0c7d98fc4f889e478e80f268d534c9d5" +git-tree-sha1 = "5f6c21241f0f655da3952fd60aa18477cf96c220" uuid = "189a3867-3050-52da-a836-e630ba90ab69" -version = "1.0.0" +version = "1.1.0" [[Requires]] deps = ["UUIDs"] @@ -365,36 +365,41 @@ uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" uuid = "6462fe0b-24de-5631-8697-dd941f90decc" [[SortingAlgorithms]] -deps = ["DataStructures", "Random", "Test"] -git-tree-sha1 = "03f5898c9959f8115e30bc7226ada7d0df554ddd" +deps = ["DataStructures"] +git-tree-sha1 = "2ec1962eba973f383239da22e75218565c390a96" uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "0.3.1" +version = "1.0.0" [[SparseArrays]] deps = ["LinearAlgebra", "Random"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [[SpecialFunctions]] -deps = ["ChainRulesCore", "OpenSpecFun_jll"] -git-tree-sha1 = "5919936c0e92cff40e57d0ddf0ceb667d42e5902" +deps = ["ChainRulesCore", "LogExpFunctions", "OpenSpecFun_jll"] +git-tree-sha1 = "a50550fa3164a8c46747e62063b4d774ac1bcf49" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "1.3.0" +version = "1.5.1" [[StaticArrays]] deps = ["LinearAlgebra", "Random", "Statistics"] -git-tree-sha1 = "e8cd1b100d37f5b4cfd2c83f45becf61c762eaf7" +git-tree-sha1 = "42378d3bab8b4f57aa1ca443821b752850592668" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.1.1" +version = "1.2.2" [[Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +[[StatsAPI]] +git-tree-sha1 = "1958272568dc176a1d881acb797beb909c785510" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.0.0" + [[StatsBase]] -deps = ["DataAPI", "DataStructures", "LinearAlgebra", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics"] -git-tree-sha1 = "4bc58880426274277a066de306ef19ecc22a6863" +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "2f6792d523d7448bbe2fec99eca9218f06cc746d" uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.33.5" +version = "0.33.8" [[StatsFuns]] deps = ["LogExpFunctions", "Rmath", "SpecialFunctions"] @@ -418,9 +423,9 @@ version = "1.0.1" [[Tables]] deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "TableTraits", "Test"] -git-tree-sha1 = "c9d2d262e9a327be1f35844df25fe4561d258dc9" +git-tree-sha1 = "aa30f8bb63f9ff3f8303a06c604c8500a69aa791" uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.4.2" +version = "1.4.3" [[Tar]] deps = ["ArgTools", "SHA"] diff --git a/docs/src/examples/axislike.md b/docs/src/examples/axislike.md index 82f5e02a..26df4e2f 100644 --- a/docs/src/examples/axislike.md +++ b/docs/src/examples/axislike.md @@ -128,3 +128,31 @@ savefigs("smith", ans) # hide [\[.pdf\]](smith.pdf), [\[generated .tex\]](smith.tex) ![](smith.svg) + +## Ternary axis + +```@example pgf +@pgf TernaryAxis( + { + axis_on_top, + xlabel="x", ylabel="y", zlabel="z", + colorbar + }, + Plot3( + { + patch, + shader="interp", + point_meta="\\thisrow{C}" + }, + Table(["x" => [0, 1, 0.5, 0.5, 0, 0], + "y" => [0, 0, 0.5, 0.5, 1, 0], + "z" => [1, 0, 0, 0, 0, 1], + "C" => [100, 0, 0, 0, 20, 100]]) + ) +) +savefigs("ternary", ans) # hide +``` + +[\[.pdf\]](ternary.pdf), [\[generated .tex\]](ternary.tex) + +![](ternary.svg) diff --git a/docs/src/man/axislike.md b/docs/src/man/axislike.md index c91c94de..8c5f33bf 100644 --- a/docs/src/man/axislike.md +++ b/docs/src/man/axislike.md @@ -168,4 +168,5 @@ julia> print_tex(p) SemiLogXAxis SemiLogYAxis LogLogAxis +TernaryAxis ``` diff --git a/src/PGFPlotsX.jl b/src/PGFPlotsX.jl index 61b018e4..8f411e15 100644 --- a/src/PGFPlotsX.jl +++ b/src/PGFPlotsX.jl @@ -15,7 +15,7 @@ using Requires: @require using Tables: Tables export TikzDocument, TikzPicture -export Axis, SemiLogXAxis, SemiLogYAxis, LogLogAxis, PolarAxis, SmithChart, GroupPlot +export Axis, SemiLogXAxis, SemiLogYAxis, LogLogAxis, PolarAxis, SmithChart, GroupPlot, TernaryAxis export Plot, PlotInc, Plot3, Plot3Inc, Expression, Coordinate, Coordinates, TableData, Table, Graphics, Legend, LegendEntry, VLine, HLine export @pgf, pgfsave, print_tex, latexengine, latexengine!, push_preamble! diff --git a/src/axislike.jl b/src/axislike.jl index aa236627..c8a262e1 100644 --- a/src/axislike.jl +++ b/src/axislike.jl @@ -102,6 +102,13 @@ Smith Chart axes, corresponds to `smithchart` in PGFPlots. """ @define_axislike SmithChart "smithchart" +""" + TernaryAxis([options], elements...) + +Ternary axes, corresponds to `ternaryaxis` in PGFPlots. +""" +@define_axislike TernaryAxis "ternaryaxis" + """ GroupPlot([options], contents...) diff --git a/src/build.jl b/src/build.jl index 1059240a..bc59f5de 100644 --- a/src/build.jl +++ b/src/build.jl @@ -100,6 +100,7 @@ DEFAULT_PREAMBLE = "\\usepgfplotslibrary{smithchart}", "\\usepgfplotslibrary{statistics}", "\\usepgfplotslibrary{dateplot}", + "\\usepgfplotslibrary{ternary}", ] # Collects the full preamble from the different sources, default and custom