Compare commits
1 Commits
master
...
t-bltg-pat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2132334d97 |
3
.github/ISSUE_TEMPLATE/bug.md
vendored
3
.github/ISSUE_TEMPLATE/bug.md
vendored
@ -20,11 +20,10 @@ Backend | yes | no | untested
|
|||||||
-------------|-----|-----|---------
|
-------------|-----|-----|---------
|
||||||
gr (default) | | |
|
gr (default) | | |
|
||||||
pyplot | | |
|
pyplot | | |
|
||||||
|
plotly | | |
|
||||||
plotlyjs | | |
|
plotlyjs | | |
|
||||||
pgfplotsx | | |
|
pgfplotsx | | |
|
||||||
unicodeplots | | |
|
|
||||||
inspectdr | | |
|
inspectdr | | |
|
||||||
gaston | | |
|
|
||||||
|
|
||||||
### Versions
|
### Versions
|
||||||
|
|
||||||
|
|||||||
37
.github/workflows/SnoopCompile.yml
vendored
37
.github/workflows/SnoopCompile.yml
vendored
@ -1,11 +1,9 @@
|
|||||||
# NOTE: this file should be named 'SnoopCompile.yml', cf github.com/aminya/CompileBot.jl/blob/master/src/CompileBot.jl#L57
|
|
||||||
|
|
||||||
name: SnoopCompile
|
name: SnoopCompile
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master # NOTE: to run the bot only on pushes to master
|
# - 'master' # NOTE: to run the bot only on pushes to master
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@ -16,19 +14,14 @@ jobs:
|
|||||||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||||
env:
|
env:
|
||||||
GKS_ENCODING: "utf8"
|
GKS_ENCODING: "utf8"
|
||||||
GKSwstype: "nul"
|
GKSwstype: "100"
|
||||||
PLOTS_TEST: "true"
|
PLOTS_TEST: "true"
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{ matrix.os }}
|
||||||
continue-on-error: ${{ matrix.version == '~1.8.0-0' }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
version: # NOTE: the versions below should match those in your botconfig
|
version: # NOTE: the versions below should match those in your botconfig
|
||||||
- '1.6' # ⎤
|
- '1'
|
||||||
- '1.7' # |
|
|
||||||
- '~1.8.0-0' # |
|
|
||||||
# - 'nightly' # ⎦ <<< keep these versions in sync with deps/SnoopCompile/snoop_bot_config.jl
|
|
||||||
# ^^^^^^^^^ for 'nightly', see github.com/JuliaPlots/Plots.jl/issues/4079
|
|
||||||
os: # NOTE: should match the os setting of your botconfig
|
os: # NOTE: should match the os setting of your botconfig
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
arch:
|
arch:
|
||||||
@ -38,22 +31,13 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: julia-actions/setup-julia@latest
|
- uses: julia-actions/setup-julia@latest
|
||||||
with:
|
with:
|
||||||
version: ${{matrix.version}}
|
version: ${{ matrix.version }}
|
||||||
|
|
||||||
- name: Set Swap Space
|
|
||||||
uses: pierotofy/set-swap-space@master
|
|
||||||
with:
|
|
||||||
swap-size-gb: 10 # required (not enough memory on github actions virtual machine)
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
cat /proc/cpuinfo
|
julia --project -e 'using Pkg; Pkg.instantiate();'
|
||||||
cat /proc/meminfo
|
julia -e 'using Pkg; Pkg.add( PackageSpec(name = "CompileBot", version = "1") ); Pkg.develop(PackageSpec(; path=pwd())); using CompileBot; CompileBot.addtestdep();'
|
||||||
cat /proc/swaps
|
|
||||||
free
|
|
||||||
df -h
|
|
||||||
julia --project -e 'using Pkg; Pkg.instantiate()'
|
|
||||||
julia -e 'using Pkg; Pkg.add(PackageSpec(name="CompileBot", version="1")); Pkg.develop(PackageSpec(; path=pwd())); using CompileBot; CompileBot.addtestdep()'
|
|
||||||
|
|
||||||
# TESTCMD
|
# TESTCMD
|
||||||
- name: Default TESTCMD
|
- name: Default TESTCMD
|
||||||
@ -85,9 +69,7 @@ jobs:
|
|||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
|
|
||||||
- name: CompileBot postprocess
|
- name: CompileBot postprocess
|
||||||
run: |
|
run: julia -e 'using Pkg; Pkg.add( PackageSpec(name = "CompileBot", version = "1") ); using CompileBot; CompileBot.postprocess();'
|
||||||
if ! grep -m1 -q 'format: off' artifact/src/precompile_includer.jl; then sed -i '1 i\#! format: off' artifact/src/precompile_includer.jl; fi
|
|
||||||
julia -e 'using Pkg; Pkg.add(PackageSpec(name="CompileBot", version="1")); using CompileBot; CompileBot.postprocess()'
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
@ -100,6 +82,7 @@ jobs:
|
|||||||
no changelog
|
no changelog
|
||||||
branch: "Test_SnoopCompile_AutoPR_${{ github.ref }}"
|
branch: "Test_SnoopCompile_AutoPR_${{ github.ref }}"
|
||||||
|
|
||||||
|
|
||||||
Skip:
|
Skip:
|
||||||
if: "contains(github.event.head_commit.message, '[skip ci]')"
|
if: "contains(github.event.head_commit.message, '[skip ci]')"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
1
.github/workflows/TagBot.yml
vendored
1
.github/workflows/TagBot.yml
vendored
@ -12,4 +12,3 @@ jobs:
|
|||||||
- uses: JuliaRegistries/TagBot@v1
|
- uses: JuliaRegistries/TagBot@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
ssh: ${{ secrets.TAGBOT_KEY }}
|
|
||||||
|
|||||||
2
.github/workflows/benchmark.yml
vendored
2
.github/workflows/benchmark.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: julia-actions/setup-julia@latest
|
- uses: julia-actions/setup-julia@latest
|
||||||
with:
|
with:
|
||||||
version: '1.7'
|
version: 1
|
||||||
|
|
||||||
# Setup
|
# Setup
|
||||||
- name: Ubuntu TESTCMD
|
- name: Ubuntu TESTCMD
|
||||||
|
|||||||
29
.github/workflows/ci.yml
vendored
29
.github/workflows/ci.yml
vendored
@ -2,8 +2,6 @@ name: ci
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
@ -15,7 +13,7 @@ jobs:
|
|||||||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||||
env:
|
env:
|
||||||
GKS_ENCODING: "utf8"
|
GKS_ENCODING: "utf8"
|
||||||
GKSwstype: "nul"
|
GKSwstype: "100"
|
||||||
|
|
||||||
name: Julia ${{ matrix.version }} - ${{ matrix.os }}
|
name: Julia ${{ matrix.version }} - ${{ matrix.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
@ -24,8 +22,8 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
version:
|
version:
|
||||||
- '1.6' # LTS
|
- '1'
|
||||||
- '1.7' # latest stable
|
- 'nightly'
|
||||||
os:
|
os:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
- windows-latest
|
- windows-latest
|
||||||
@ -33,11 +31,9 @@ jobs:
|
|||||||
arch:
|
arch:
|
||||||
- x64
|
- x64
|
||||||
# - x86
|
# - x86
|
||||||
include:
|
|
||||||
- version: 'nightly'
|
|
||||||
os: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
# Setup environment
|
# Setup environment
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: julia-actions/setup-julia@latest
|
- uses: julia-actions/setup-julia@latest
|
||||||
@ -55,16 +51,19 @@ jobs:
|
|||||||
${{ runner.os }}-test-
|
${{ runner.os }}-test-
|
||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
|
|
||||||
|
## maybe required if we ever want to run graphical tests for plotly
|
||||||
|
# OS Dependencies
|
||||||
|
# - name: Ubuntu OS dependencies
|
||||||
|
# if: startsWith(matrix.os,'ubuntu')
|
||||||
|
# run: |
|
||||||
|
# ./test/install_wkhtmltoimage.sh
|
||||||
|
|
||||||
# TESTCMD
|
# TESTCMD
|
||||||
- name: Default TESTCMD
|
- name: Default TESTCMD
|
||||||
run: echo "TESTCMD=julia" >> $GITHUB_ENV
|
run: echo "TESTCMD=julia" >> $GITHUB_ENV
|
||||||
- name: Ubuntu TESTCMD
|
- name: Ubuntu TESTCMD
|
||||||
if: startsWith(matrix.os,'ubuntu')
|
if: startsWith(matrix.os,'ubuntu')
|
||||||
run: |
|
run: echo "TESTCMD=xvfb-run --auto-servernum julia" >> $GITHUB_ENV
|
||||||
echo "TESTCMD=xvfb-run --auto-servernum julia" >> $GITHUB_ENV
|
|
||||||
sudo apt-get -y update
|
|
||||||
sudo apt-get -y install gnuplot poppler-utils texlive-{latex-base,latex-extra,luatex}
|
|
||||||
sudo fc-cache -vr
|
|
||||||
|
|
||||||
# Julia Dependencies
|
# Julia Dependencies
|
||||||
- name: Install Julia dependencies
|
- name: Install Julia dependencies
|
||||||
@ -79,9 +78,7 @@ jobs:
|
|||||||
|
|
||||||
# Codecov
|
# Codecov
|
||||||
- uses: julia-actions/julia-processcoverage@v1
|
- uses: julia-actions/julia-processcoverage@v1
|
||||||
if: startsWith(matrix.os,'ubuntu')
|
- uses: codecov/codecov-action@v1
|
||||||
- uses: codecov/codecov-action@v2
|
|
||||||
if: startsWith(matrix.os,'ubuntu')
|
|
||||||
with:
|
with:
|
||||||
file: lcov.info
|
file: lcov.info
|
||||||
|
|
||||||
|
|||||||
42
.github/workflows/docs.yml
vendored
42
.github/workflows/docs.yml
vendored
@ -1,7 +1,6 @@
|
|||||||
name: docs
|
name: docs
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
@ -9,7 +8,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Build_docs:
|
Build_docs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@ -21,14 +20,37 @@ jobs:
|
|||||||
cache-name: cache-artifacts
|
cache-name: cache-artifacts
|
||||||
with:
|
with:
|
||||||
path: ~/.julia/artifacts
|
path: ~/.julia/artifacts
|
||||||
key: ${{runner.os}}-test-${{env.cache-name}}-${{hashFiles('**/Project.toml')}}
|
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{runner.os}}-test-${{env.cache-name}}-
|
${{ runner.os }}-test-${{ env.cache-name }}-
|
||||||
${{runner.os}}-test-
|
${{ runner.os }}-test-
|
||||||
${{runner.os}}-
|
${{ runner.os }}-
|
||||||
- name: Build documentation
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -y
|
||||||
|
sudo apt-get install -y qt5-default \
|
||||||
|
ttf-mscorefonts-installer \
|
||||||
|
poppler-utils \
|
||||||
|
pdf2svg \
|
||||||
|
texlive-latex-base \
|
||||||
|
texlive-binaries \
|
||||||
|
texlive-pictures \
|
||||||
|
texlive-latex-extra \
|
||||||
|
texlive-luatex \
|
||||||
|
ghostscript-x \
|
||||||
|
libgconf2-4 \
|
||||||
|
gnuplot
|
||||||
|
sudo fc-cache -vr
|
||||||
|
|
||||||
|
- name: build documentation
|
||||||
env:
|
env:
|
||||||
PYTHON: ""
|
PYTHON: ""
|
||||||
DOCUMENTER_KEY: ${{secrets.DOCUMENTER_KEY}}
|
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
|
||||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
run: |
|
||||||
run: bash docs/ci_build.sh
|
export JULIA_DEBUG=Documenter
|
||||||
|
export PLOTDOCS_ANSICOLOR=true
|
||||||
|
export GKSwstype=nul # Plots.jl/issues/3664
|
||||||
|
xvfb-run julia --color=yes --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.add(PackageSpec(name="Plots", rev=split(ENV["GITHUB_REF"], "/", limit=3)[3])); Pkg.instantiate()'
|
||||||
|
# xvfb-run julia --color=yes --project=docs/ -e 'using Pkg; pkg"add Documenter#master"'
|
||||||
|
xvfb-run julia --color=yes --project=docs/ -e 'using Pkg; pkg"st -m"'
|
||||||
|
xvfb-run julia --color=yes --project=docs/ -e 'withenv("GITHUB_REPOSITORY" => "JuliaPlots/PlotDocs.jl") do; include("docs/make.jl"); end'
|
||||||
|
|||||||
22
.github/workflows/format.yml.disabled
vendored
Normal file
22
.github/workflows/format.yml.disabled
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: format
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
JuliaFormatter:
|
||||||
|
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: julia-actions/setup-julia@latest
|
||||||
|
with:
|
||||||
|
version: 1
|
||||||
|
|
||||||
|
# Check format
|
||||||
|
- name: Install JuliaFormatter and format
|
||||||
|
run: |
|
||||||
|
git diff --name-only --exit-code
|
||||||
|
julia -e 'using Pkg; pkg"add JuliaFormatter CSTParser#master"'
|
||||||
|
julia -e 'using JuliaFormatter; [format(["src", "test"]) for _ in 1:2]'
|
||||||
|
git diff --exit-code
|
||||||
54
.github/workflows/format_check.yml
vendored
54
.github/workflows/format_check.yml
vendored
@ -1,54 +0,0 @@
|
|||||||
name: format
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
code-style:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: julia-actions/setup-julia@v1
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
using Pkg
|
|
||||||
Pkg.add([
|
|
||||||
PackageSpec("JuliaFormatter"),
|
|
||||||
PackageSpec(url = "https://github.com/tkf/JuliaProjectFormatter.jl.git"),
|
|
||||||
])
|
|
||||||
shell: julia --color=yes {0}
|
|
||||||
|
|
||||||
- name: Format Julia files
|
|
||||||
run: |
|
|
||||||
using JuliaFormatter
|
|
||||||
format(["src", "test"])
|
|
||||||
shell: julia --color=yes --compile=min -O0 {0}
|
|
||||||
- name: suggester / JuliaFormatter
|
|
||||||
uses: reviewdog/action-suggester@v1
|
|
||||||
with:
|
|
||||||
tool_name: JuliaFormatter
|
|
||||||
fail_on_error: true
|
|
||||||
|
|
||||||
# reviewdog/action-suggester not using `cleanup` flag?
|
|
||||||
- name: Cleanup
|
|
||||||
if: success() || failure()
|
|
||||||
run: |
|
|
||||||
git checkout -- .
|
|
||||||
git clean --force
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Format Julia project files
|
|
||||||
if: success() || failure()
|
|
||||||
run: |
|
|
||||||
using JuliaProjectFormatter
|
|
||||||
format_projects()
|
|
||||||
shell: julia --color=yes --compile=min -O0 {0}
|
|
||||||
- name: suggester / JuliaProjectFormatter
|
|
||||||
if: success() || failure()
|
|
||||||
uses: reviewdog/action-suggester@v1
|
|
||||||
with:
|
|
||||||
tool_name: JuliaProjectFormatter
|
|
||||||
fail_on_error: true
|
|
||||||
10
.github/workflows/format_pr.yml
vendored
10
.github/workflows/format_pr.yml
vendored
@ -1,19 +1,19 @@
|
|||||||
name: format
|
name: format-pr
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 1 * *'
|
- cron: '0 0 * * SUN'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pr:
|
build:
|
||||||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install JuliaFormatter and format
|
- name: Install JuliaFormatter and format
|
||||||
run: |
|
run: |
|
||||||
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
|
julia -e 'using Pkg; pkg"add JuliaFormatter CSTParser#master"'
|
||||||
julia -e 'using JuliaFormatter; [format(["src", "test"]) for _ in 1:2]'
|
julia -e 'using JuliaFormatter; [format(["src", "test"]) for _ in 1:2]'
|
||||||
git diff --exit-code
|
git diff --exit-code
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
|
|||||||
28
.zenodo.json
28
.zenodo.json
@ -3,7 +3,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"creators": [
|
"creators": [
|
||||||
{
|
{
|
||||||
"affiliation": "Headlands Technologies",
|
"affiliation": "Elemental Cognition",
|
||||||
"name": "Tom Breloff"
|
"name": "Tom Breloff"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -142,8 +142,6 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Anshul Singhvi",
|
"name": "Anshul Singhvi",
|
||||||
"affiliation": "Columbia University",
|
|
||||||
"orcid": "0000-0001-6055-1291",
|
|
||||||
"type": "Other"
|
"type": "Other"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -403,7 +401,7 @@
|
|||||||
"type": "Other"
|
"type": "Other"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Mosè Giodano",
|
"name": "Moesè Giodano",
|
||||||
"type": "Other"
|
"type": "Other"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -694,28 +692,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Fred Callaway",
|
"name": "Fred Callaway",
|
||||||
"type": "Other"
|
"type": "Other"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Jan Thorben Schneider",
|
|
||||||
"type": "Other"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"orcid": "0000-0003-4102-2460",
|
|
||||||
"affiliation": "Alogus Research Corporation",
|
|
||||||
"name": "Lee Phillips",
|
|
||||||
"type": "Other"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Tom Gillam",
|
|
||||||
"type": "Other"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Steve Leung",
|
|
||||||
"type": "Other"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Xu Zhi-Yuan",
|
|
||||||
"type": "Other"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"upload_type": "software"
|
"upload_type": "software"
|
||||||
|
|||||||
2
NEWS.md
2
NEWS.md
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#### notes on release changes, ongoing development, and future planned work
|
#### notes on release changes, ongoing development, and future planned work
|
||||||
|
|
||||||
## NOTE: this file is deprecated, see the [TagBot](https://github.com/marketplace/actions/julia-tagbot) auto-generated changelogs instead
|
## (current master)
|
||||||
|
|
||||||
## 0.28.3
|
## 0.28.3
|
||||||
- support generalized array interface
|
- support generalized array interface
|
||||||
|
|||||||
40
Project.toml
40
Project.toml
@ -1,7 +1,7 @@
|
|||||||
name = "Plots"
|
name = "Plots"
|
||||||
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
|
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
|
||||||
author = ["Tom Breloff (@tbreloff)"]
|
author = ["Tom Breloff (@tbreloff)"]
|
||||||
version = "1.29.0"
|
version = "1.21.3"
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
|
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
|
||||||
@ -17,7 +17,6 @@ Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316"
|
|||||||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
|
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
|
||||||
Measures = "442fdcdd-2543-5da2-b0f3-8c86c306513e"
|
Measures = "442fdcdd-2543-5da2-b0f3-8c86c306513e"
|
||||||
NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
|
NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
|
||||||
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
|
|
||||||
PlotThemes = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a"
|
PlotThemes = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a"
|
||||||
PlotUtils = "995b91a9-d308-5afd-9ec6-746e21dbc043"
|
PlotUtils = "995b91a9-d308-5afd-9ec6-746e21dbc043"
|
||||||
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
|
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
|
||||||
@ -33,53 +32,40 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
|
|||||||
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
|
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
|
||||||
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
|
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
|
||||||
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
|
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
|
||||||
UnicodeFun = "1cfade01-22cf-5700-b092-accc4b62d6e1"
|
|
||||||
Unzip = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d"
|
|
||||||
|
|
||||||
[compat]
|
[compat]
|
||||||
Contour = "0.5"
|
Contour = "0.5"
|
||||||
FFMPEG = "0.2 - 0.4"
|
FFMPEG = "0.2, 0.3, 0.4"
|
||||||
FixedPointNumbers = "0.6 - 0.8"
|
FixedPointNumbers = "0.6, 0.7, 0.8"
|
||||||
GR = "0.64"
|
GR = "0.53, 0.54, 0.55, 0.57, 0.58, 0.59"
|
||||||
GeometryBasics = "0.2, 0.3.1, 0.4"
|
GeometryBasics = "0.2, 0.3.1, 0.4"
|
||||||
JSON = "0.21, 1"
|
JSON = "0.21, 1"
|
||||||
Latexify = "0.14 - 0.15"
|
Latexify = "0.14, 0.15"
|
||||||
Measures = "0.3"
|
Measures = "0.3"
|
||||||
NaNMath = "0.3, 1"
|
NaNMath = "0.3"
|
||||||
PGFPlotsX = "1"
|
PlotThemes = "2"
|
||||||
PlotThemes = "2, 3"
|
|
||||||
PlotUtils = "1"
|
PlotUtils = "1"
|
||||||
PlotlyBase = "0.7"
|
RecipesBase = "1"
|
||||||
PlotlyJS = "0.18"
|
RecipesPipeline = "0.3.5, 0.4"
|
||||||
PyPlot = "2"
|
|
||||||
RecipesBase = "1.2"
|
|
||||||
RecipesPipeline = "0.5"
|
|
||||||
Reexport = "0.2, 1.0"
|
Reexport = "0.2, 1.0"
|
||||||
Requires = "1"
|
Requires = "1"
|
||||||
Scratch = "1"
|
Scratch = "1"
|
||||||
Showoff = "0.3.1, 1.0"
|
Showoff = "0.3.1, 1.0"
|
||||||
StatsBase = "0.32 - 0.33"
|
StatsBase = "0.32, 0.33"
|
||||||
UnicodeFun = "0.4"
|
UnicodePlots = "2.2"
|
||||||
UnicodePlots = "2.10"
|
julia = "1.5"
|
||||||
Unzip = "0.1"
|
|
||||||
julia = "1.6"
|
|
||||||
|
|
||||||
[extras]
|
[extras]
|
||||||
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
|
|
||||||
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
|
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
|
||||||
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
|
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
|
||||||
Gaston = "4b11ee91-296f-5714-9832-002c20994614"
|
|
||||||
Gtk = "4c0ca9eb-093a-5379-98c5-f87ac0bbbf44"
|
Gtk = "4c0ca9eb-093a-5379-98c5-f87ac0bbbf44"
|
||||||
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
|
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
|
||||||
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
|
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
|
||||||
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
|
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
|
||||||
InspectDR = "d0351b0e-4b05-5898-87b3-e2a8edfddd1d"
|
|
||||||
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
|
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
|
||||||
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
|
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
|
||||||
PGFPlotsX = "8314cec4-20b6-5062-9cdb-752b83310925"
|
PGFPlotsX = "8314cec4-20b6-5062-9cdb-752b83310925"
|
||||||
PlotlyBase = "a03496cd-edff-5a9b-9e67-9cda94a718b5"
|
|
||||||
PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a"
|
PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a"
|
||||||
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
|
|
||||||
RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b"
|
RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b"
|
||||||
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
|
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
|
||||||
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
|
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
|
||||||
@ -90,4 +76,4 @@ UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"
|
|||||||
VisualRegressionTests = "34922c18-7c2a-561c-bac1-01e79b2c4c92"
|
VisualRegressionTests = "34922c18-7c2a-561c-bac1-01e79b2c4c92"
|
||||||
|
|
||||||
[targets]
|
[targets]
|
||||||
test = ["Colors", "Distributions", "FileIO", "Gaston", "Gtk", "ImageMagick", "Images", "InspectDR", "LibGit2", "OffsetArrays", "PGFPlotsX", "PlotlyJS", "PlotlyBase", "PyPlot", "HDF5", "RDatasets", "StableRNGs", "StaticArrays", "StatsPlots", "Test", "TestImages", "UnicodePlots", "VisualRegressionTests"]
|
test = ["Distributions", "FileIO", "Gtk", "ImageMagick", "Images", "LibGit2", "OffsetArrays", "PGFPlotsX", "PlotlyJS", "HDF5", "RDatasets", "StableRNGs", "StaticArrays", "StatsPlots", "Test", "TestImages", "UnicodePlots", "VisualRegressionTests"]
|
||||||
|
|||||||
@ -10,18 +10,18 @@
|
|||||||
[gitter-url]: https://gitter.im/tbreloff/Plots.jl?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
[gitter-url]: https://gitter.im/tbreloff/Plots.jl?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
||||||
|
|
||||||
[docs-img]: https://img.shields.io/badge/docs-stable-blue.svg
|
[docs-img]: https://img.shields.io/badge/docs-stable-blue.svg
|
||||||
[docs-url]: https://docs.juliaplots.org/stable/
|
[docs-url]: http://docs.juliaplots.org/latest/
|
||||||
|
|
||||||
[![][gh-ci-img]][gh-ci-url]
|
[![][gh-ci-img]][gh-ci-url]
|
||||||
[![][pkgeval-img]][pkgeval-url]
|
[![][pkgeval-img]][pkgeval-url]
|
||||||
[](https://julialang.zulipchat.com/#narrow/stream/236493-plots)
|
[](https://julialang.zulipchat.com/#narrow/stream/236493-plots)
|
||||||
[![][docs-img]][docs-url]
|
[![][docs-img]][docs-url]
|
||||||
[](https://codecov.io/gh/JuliaPlots/Plots.jl)
|
[](https://codecov.io/gh/JuliaPlots/Plots.jl)
|
||||||
[](https://pkgs.genieframework.com?packages=Plots)
|
|
||||||
|
|
||||||
[](https://doi.org/10.5281/zenodo.4725317)
|
[](https://doi.org/10.5281/zenodo.4725317)
|
||||||
This is the DOI for all Versions, please follow the link to get the DOI for a specific version.
|
This is the DOI for all Versions, please follow the link to get the DOI for a specific version.
|
||||||
|
|
||||||
|
|
||||||
#### Created by Tom Breloff (@tbreloff)
|
#### Created by Tom Breloff (@tbreloff)
|
||||||
|
|
||||||
#### Maintained by the [JuliaPlots members](https://github.com/orgs/JuliaPlots/people)
|
#### Maintained by the [JuliaPlots members](https://github.com/orgs/JuliaPlots/people)
|
||||||
|
|||||||
487
deps/SnoopCompile/precompile/1.7/precompile_Plots.jl
vendored
487
deps/SnoopCompile/precompile/1.7/precompile_Plots.jl
vendored
@ -1,487 +0,0 @@
|
|||||||
# Use
|
|
||||||
# @warnpcfail precompile(args...)
|
|
||||||
# if you want to be warned when a precompile directive fails
|
|
||||||
macro warnpcfail(ex::Expr)
|
|
||||||
modl = __module__
|
|
||||||
file = __source__.file === nothing ? "?" : String(__source__.file)
|
|
||||||
line = __source__.line
|
|
||||||
quote
|
|
||||||
$(esc(ex)) || @warn """precompile directive
|
|
||||||
$($(Expr(:quote, ex)))
|
|
||||||
failed. Please report an issue in $($modl) (after checking for duplicates) or remove this directive.""" _file=$file _line=$line
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
const __bodyfunction__ = Dict{Method,Any}()
|
|
||||||
|
|
||||||
# Find keyword "body functions" (the function that contains the body
|
|
||||||
# as written by the developer, called after all missing keyword-arguments
|
|
||||||
# have been assigned values), in a manner that doesn't depend on
|
|
||||||
# gensymmed names.
|
|
||||||
# `mnokw` is the method that gets called when you invoke it without
|
|
||||||
# supplying any keywords.
|
|
||||||
function __lookup_kwbody__(mnokw::Method)
|
|
||||||
function getsym(arg)
|
|
||||||
isa(arg, Symbol) && return arg
|
|
||||||
@assert isa(arg, GlobalRef)
|
|
||||||
return arg.name
|
|
||||||
end
|
|
||||||
|
|
||||||
f = get(__bodyfunction__, mnokw, nothing)
|
|
||||||
if f === nothing
|
|
||||||
fmod = mnokw.module
|
|
||||||
# The lowered code for `mnokw` should look like
|
|
||||||
# %1 = mkw(kwvalues..., #self#, args...)
|
|
||||||
# return %1
|
|
||||||
# where `mkw` is the name of the "active" keyword body-function.
|
|
||||||
ast = Base.uncompressed_ast(mnokw)
|
|
||||||
if isa(ast, Core.CodeInfo) && length(ast.code) >= 2
|
|
||||||
callexpr = ast.code[end-1]
|
|
||||||
if isa(callexpr, Expr) && callexpr.head == :call
|
|
||||||
fsym = callexpr.args[1]
|
|
||||||
if isa(fsym, Symbol)
|
|
||||||
f = getfield(fmod, fsym)
|
|
||||||
elseif isa(fsym, GlobalRef)
|
|
||||||
if fsym.mod === Core && fsym.name === :_apply
|
|
||||||
f = getfield(mnokw.module, getsym(callexpr.args[2]))
|
|
||||||
elseif fsym.mod === Core && fsym.name === :_apply_iterate
|
|
||||||
f = getfield(mnokw.module, getsym(callexpr.args[3]))
|
|
||||||
else
|
|
||||||
f = getfield(fsym.mod, fsym.name)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
f = missing
|
|
||||||
end
|
|
||||||
else
|
|
||||||
f = missing
|
|
||||||
end
|
|
||||||
else
|
|
||||||
f = missing
|
|
||||||
end
|
|
||||||
__bodyfunction__[mnokw] = f
|
|
||||||
end
|
|
||||||
return f
|
|
||||||
end
|
|
||||||
|
|
||||||
function _precompile_()
|
|
||||||
ccall(:jl_generating_output, Cint, ()) == 1 || return nothing
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(Type)),NamedTuple{(:parent,), Tuple{GridLayout}},Type{Subplot},GRBackend})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(Type)),NamedTuple{(:parent,), Tuple{GridLayout}},Type{Subplot},PlotlyBackend})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(Type)),NamedTuple{(:parent,), Tuple{Subplot{GRBackend}}},Type{Subplot},GRBackend})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(Type)),NamedTuple{(:parent,), Tuple{Subplot{PlotlyBackend}}},Type{Subplot},PlotlyBackend})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}},typeof(_make_hist),Tuple{Vector{Float64}, Vector{Float64}},Int64})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}},typeof(_make_hist),Tuple{Vector{Float64}, Vector{Float64}},Tuple{Int64, Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}},typeof(_make_hist),Tuple{Vector{Float64}},Symbol})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Vector{Int64}}},typeof(_make_hist),Tuple{Vector{Float64}},Symbol})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(areaplot)),Any,typeof(areaplot),Any,Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:flip,), Tuple{Bool}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:foreground_color_grid, :grid, :gridalpha, :gridstyle, :gridlinewidth), Tuple{RGBA{Float64}, Bool, Float64, Symbol, Int64}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:formatter,), Tuple{Symbol}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:formatter,), Tuple{typeof(datetimeformatter)}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :flip, :minorgrid, :guide), Tuple{Bool, Bool, Bool, String}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :lims), Tuple{Bool, Tuple{Float64, Float64}}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :lims, :flip), Tuple{Bool, Tuple{Float64, Float64}, Bool}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :minorgrid, :guide), Tuple{Bool, Bool, String}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :minorgrid, :mirror, :guide), Tuple{Bool, Bool, Bool, String}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid,), Tuple{Bool}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guide,), Tuple{String}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guide_position, :guidefontvalign, :mirror, :guide), Tuple{Symbol, Symbol, Bool, String}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guidefonthalign, :guide_position, :mirror, :guide), Tuple{Symbol, Symbol, Bool, String}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims, :flip, :ticks, :guide), Tuple{Tuple{Int64, Int64}, Bool, StepRange{Int64, Int64}, String}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims,), Tuple{Tuple{Float64, Float64}}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims,), Tuple{Tuple{Int64, Float64}}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims,), Tuple{Tuple{Int64, Int64}}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:minorgrid, :scale, :guide), Tuple{Bool, Symbol, String}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:minorgrid,), Tuple{Bool}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:rotation,), Tuple{Int64}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:ticks,), Tuple{Nothing}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:ticks,), Tuple{UnitRange{Int64}}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(default)),NamedTuple{(:shape,), Tuple{Symbol}},typeof(default)})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(default)),NamedTuple{(:titlefont, :legendfontsize, :guidefont, :tickfont, :guide, :framestyle, :yminorgrid), Tuple{Tuple{Int64, String}, Int64, Tuple{Int64, Symbol}, Tuple{Int64, Symbol}, String, Symbol, Bool}},typeof(default)})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(font)),NamedTuple{(:family, :pointsize, :halign, :valign, :rotation, :color), Tuple{String, Int64, Symbol, Symbol, Float64, RGBA{Float64}}},typeof(font)})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(font)),NamedTuple{(:family, :pointsize, :valign, :halign, :rotation, :color), Tuple{String, Int64, Symbol, Symbol, Float64, RGBA{Float64}}},typeof(font)})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),StepRange{Int64, Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),UnitRange{Int64},UnitRange{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),UnitRange{Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),Vector{Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_set_font)),NamedTuple{(:halign, :valign, :rotation), Tuple{Symbol, Symbol, Int64}},typeof(gr_set_font),Font,Subplot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_set_font)),NamedTuple{(:rotation, :color), Tuple{Int64, RGBA{Float64}}},typeof(gr_set_font),Font,Subplot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(lens!)),Any,typeof(lens!),Any,Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :label, :seriestype), Tuple{Float64, String, Symbol}},typeof(plot!),Plot{GRBackend},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :label, :seriestype), Tuple{Float64, String, Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :label, :seriestype), Tuple{Float64, String, Symbol}},typeof(plot!),Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Plot{GRBackend},Vector{GeometryBasics.Point2{Float64}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{GeometryBasics.Point2{Float64}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Vector{GeometryBasics.Point2{Float64}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:annotation,), Tuple{Vector{Tuple{Int64, Float64, Tuple{String, Any, Any, Any}}}}},typeof(plot!)})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:c, :lw, :label), Tuple{Symbol, Int64, String}},typeof(plot!),Plot{GRBackend},Vector{Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:c, :lw, :label), Tuple{Symbol, Int64, String}},typeof(plot!),Plot{PlotlyBackend},Vector{Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:c, :lw, :label), Tuple{Symbol, Int64, String}},typeof(plot!),Vector{Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:layout, :margin), Tuple{Matrix{Any}, AbsoluteLength}},typeof(plot!),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Bool}},typeof(plot!),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Bool}},typeof(plot!),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Symbol}},typeof(plot!),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Symbol}},typeof(plot!),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:line, :seriestype), Tuple{Tuple{Int64, Symbol, Float64, Matrix{Symbol}}, Symbol}},typeof(plot!),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:line, :seriestype), Tuple{Tuple{Int64, Symbol, Float64, Matrix{Symbol}}, Symbol}},typeof(plot!),Plot{GRBackend},Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:line, :seriestype), Tuple{Tuple{Int64, Symbol, Float64, Matrix{Symbol}}, Symbol}},typeof(plot!),Plot{PlotlyBackend},Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:lw, :color), Tuple{Int64, Symbol}},typeof(plot!),Function,Float64,Irrational{:π}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:lw, :color), Tuple{Int64, Symbol}},typeof(plot!),Plot{GRBackend},Function,Float64,Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:marker, :series_annotations, :seriestype), Tuple{Tuple{Int64, Float64, Symbol}, Vector{Any}, Symbol}},typeof(plot!),Plot{GRBackend},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:marker, :series_annotations, :seriestype), Tuple{Tuple{Int64, Float64, Symbol}, Vector{Any}, Symbol}},typeof(plot!),Plot{PlotlyBackend},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:marker, :series_annotations, :seriestype), Tuple{Tuple{Int64, Float64, Symbol}, Vector{Any}, Symbol}},typeof(plot!),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:markersize, :c, :seriestype), Tuple{Int64, Symbol, Symbol}},typeof(plot!),Plot{GRBackend},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:markersize, :c, :seriestype), Tuple{Int64, Symbol, Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:markersize, :c, :seriestype), Tuple{Int64, Symbol, Symbol}},typeof(plot!),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype, :inset), Tuple{Symbol, Tuple{Int64, BoundingBox{Tuple{Length{:w, Float64}, Length{:h, Float64}}, Tuple{Length{:w, Float64}, Length{:h, Float64}}}}}},typeof(plot!),Plot{GRBackend},Vector{Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype, :inset), Tuple{Symbol, Tuple{Int64, BoundingBox{Tuple{Length{:w, Float64}, Length{:h, Float64}}, Tuple{Length{:w, Float64}, Length{:h, Float64}}}}}},typeof(plot!),Plot{PlotlyBackend},Vector{Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype, :inset), Tuple{Symbol, Tuple{Int64, BoundingBox{Tuple{Length{:w, Float64}, Length{:h, Float64}}, Tuple{Length{:w, Float64}, Length{:h, Float64}}}}}},typeof(plot!),Vector{Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot!),Plot{GRBackend},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot!),Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:title,), Tuple{String}},typeof(plot!),Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:title,), Tuple{String}},typeof(plot!),Plot{PlotlyBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:title,), Tuple{String}},typeof(plot!)})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:w,), Tuple{Int64}},typeof(plot!),Plot{GRBackend},Vector{Float64},Vector{Float64},Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:xgrid,), Tuple{Tuple{Symbol, Symbol, Int64, Symbol, Float64}}},typeof(plot!),Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:yaxis, :minorgrid), Tuple{Tuple{String, Symbol}, Bool}},typeof(plot!),Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:yaxis, :minorgrid), Tuple{Tuple{String, Symbol}, Bool}},typeof(plot!)})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype), Tuple{Vector{Float64}, Tuple{Symbol, Float64, Stroke}, Vector{Float64}, String, Symbol}},typeof(plot!),Plot{GRBackend},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype), Tuple{Vector{Float64}, Tuple{Symbol, Float64, Stroke}, Vector{Float64}, String, Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype), Tuple{Vector{Float64}, Tuple{Symbol, Float64, Stroke}, Vector{Float64}, String, Symbol}},typeof(plot!),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:annotations, :leg), Tuple{Tuple{Int64, Float64, PlotText}, Bool}},typeof(plot),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:arrow,), Tuple{Int64}},typeof(plot),Vector{Float64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:aspect_ratio, :seriestype), Tuple{Int64, Symbol}},typeof(plot),Vector{String},Vector{String},Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:bar_width, :alpha, :color, :fillto, :label, :seriestype), Tuple{Float64, Float64, Vector{Symbol}, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, String, Symbol}},typeof(plot),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:bins, :weights, :seriestype), Tuple{Symbol, Vector{Int64}, Symbol}},typeof(plot),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:color, :line, :marker), Tuple{Matrix{Symbol}, Tuple{Symbol, Int64}, Tuple{Matrix{Symbol}, Int64, Float64, Stroke}}},typeof(plot),Vector{Vector}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:connections, :title, :xlabel, :ylabel, :zlabel, :legend, :margin, :seriestype), Tuple{Tuple{Vector{Int64}, Vector{Int64}, Vector{Int64}}, String, String, String, String, Symbol, AbsoluteLength, Symbol}},typeof(plot),Vector{Int64},Vector{Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:fill, :seriestype), Tuple{Bool, Symbol}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Function})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:fill_z, :alpha, :label, :bar_width, :seriestype), Tuple{StepRange{Int64, Int64}, Vector{Float64}, String, UnitRange{Int64}, Symbol}},typeof(plot),Vector{Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:framestyle, :title, :color, :layout, :label, :markerstrokewidth, :ticks, :seriestype), Tuple{Matrix{Symbol}, Matrix{String}, Base.ReshapedArray{Int64, 2, UnitRange{Int64}, Tuple{}}, Int64, String, Int64, UnitRange{Int64}, Symbol}},typeof(plot),Vector{Vector{Float64}},Vector{Vector{Float64}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:grid, :title), Tuple{Tuple{Symbol, Symbol, Symbol, Int64, Float64}, String}},typeof(plot),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:lab, :w, :palette, :fill, :α), Tuple{String, Int64, PlotUtils.ContinuousColorGradient, Int64, Float64}},typeof(plot),StepRange{Int64, Int64},Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label, :legend, :seriestype), Tuple{String, Symbol, Symbol}},typeof(plot),Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label, :title, :xlabel, :linewidth, :legend), Tuple{Matrix{String}, String, String, Int64, Symbol}},typeof(plot),Vector{Function},Float64,Float64})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label,), Tuple{Matrix{String}}},typeof(plot),Vector{AbstractVector{Float64}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:labels,), Tuple{Matrix{String}}},typeof(plot),PortfolioComposition})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :group, :linetype, :linecolor), Tuple{Matrix{Any}, Vector{String}, Matrix{Symbol}, Symbol}},typeof(plot),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :label, :fillrange, :fillalpha), Tuple{Tuple{Int64, Int64}, String, Int64, Float64}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :label, :fillrange, :fillalpha), Tuple{Tuple{Int64, Int64}, String, Int64, Float64}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :link), Tuple{Int64, Symbol}},typeof(plot),Plot{GRBackend},Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :link), Tuple{Int64, Symbol}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :margin), Tuple{Matrix{Any}, AbsoluteLength}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :palette, :bg_inside), Tuple{Int64, Matrix{PlotUtils.ContinuousColorGradient}, Matrix{Symbol}}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :t, :leg, :ticks, :border), Tuple{Matrix{Any}, Matrix{Symbol}, Bool, Nothing, Symbol}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :title, :titlelocation, :left_margin, :bottom_margin, :xrotation), Tuple{Matrix{Any}, Matrix{String}, Symbol, Matrix{AbsoluteLength}, AbsoluteLength, Int64}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :xguide, :yguide, :xguidefonthalign, :yguidefontvalign, :xguideposition, :yguideposition, :ymirror, :xmirror, :legend, :seriestype), Tuple{Int64, String, String, Matrix{Symbol}, Matrix{Symbol}, Symbol, Matrix{Symbol}, Matrix{Bool}, Matrix{Bool}, Bool, Matrix{Symbol}}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :xlims), Tuple{Matrix{Any}, Tuple{Int64, Float64}}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout,), Tuple{Tuple{Int64, Int64}}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout,), Tuple{Tuple{Int64, Int64}}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:legend,), Tuple{Bool}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:legend,), Tuple{Bool}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:legend,), Tuple{Symbol}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:legend,), Tuple{Symbol}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:legend,), Tuple{Symbol}},typeof(plot),Vector{Tuple{Int64, Real}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:line, :lab, :ms), Tuple{Tuple{Matrix{Symbol}, Int64}, Matrix{String}, Int64}},typeof(plot),Vector{Vector},Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:line, :label, :legendtitle), Tuple{Tuple{Int64, Matrix{Symbol}}, Matrix{String}, String}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:line, :leg, :fill), Tuple{Int64, Bool, Tuple{Int64, Symbol}}},typeof(plot),Function,Function,Int64,Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:line, :marker, :bg, :fg, :xlim, :ylim, :leg), Tuple{Tuple{Int64, Symbol, Symbol}, Tuple{Shape{Float64, Float64}, Int64, RGBA{Float64}}, Symbol, Symbol, Tuple{Int64, Int64}, Tuple{Int64, Int64}, Bool}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:line_z, :linewidth, :legend), Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, Int64, Bool}},typeof(plot),Vector{Float64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:m, :markersize, :lab, :bg, :xlim, :ylim, :seriestype), Tuple{Matrix{Symbol}, Int64, Matrix{String}, Symbol, Tuple{Int64, Int64}, Tuple{Int64, Int64}, Symbol}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:marker,), Tuple{Bool}},typeof(plot),Vector{Union{Missing, Int64}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:marker_z, :color, :legend, :seriestype), Tuple{typeof(+), Symbol, Bool, Symbol}},typeof(plot),Vector{Float64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:markershape, :markersize, :marker_z, :line_z, :linewidth), Tuple{Matrix{Symbol}, Matrix{Int64}, Matrix{Int64}, Matrix{Int64}, Matrix{Int64}}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:markershape, :seriestype, :label), Tuple{Symbol, Symbol, String}},typeof(plot),UnitRange{Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:nbins, :seriestype), Tuple{Int64, Symbol}},typeof(plot),Vector{Float64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:nbins, :show_empty_bins, :normed, :aspect_ratio, :seriestype), Tuple{Tuple{Int64, Int64}, Bool, Bool, Int64, Symbol}},typeof(plot),Vector{ComplexF64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:proj, :m), Tuple{Symbol, Int64}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:projection, :seriestype), Tuple{Symbol, Symbol}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},UnitRange{Int64},Matrix{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:quiver, :seriestype), Tuple{Tuple{Vector{Float64}, Vector{Float64}, Vector{Float64}}, Symbol}},typeof(plot),Vector{Float64},Vector{Float64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:reg, :fill), Tuple{Bool, Tuple{Int64, Symbol}}},typeof(plot),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{Int64}},typeof(plot),UnitRange{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}}},typeof(plot),UnitRange{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{Tuple{LinRange{Float64, Int64}, LinRange{Float64, Int64}}}},typeof(plot),UnitRange{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{typeof(sqrt)}},typeof(plot),UnitRange{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriescolor, :fillalpha), Tuple{Matrix{Symbol}, Matrix{Float64}}},typeof(plot),AreaPlot})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype, :markershape, :markersize, :color), Tuple{Matrix{Symbol}, Vector{Symbol}, Int64, Vector{Symbol}}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot),Vector{DateTime},UnitRange{Int64},Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot),Vector{OHLC}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:st, :xlabel, :ylabel, :zlabel), Tuple{Symbol, String, String, String}},typeof(plot),Vector{Float64},Vector{Float64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title, :l, :seriestype), Tuple{String, Float64, Symbol}},typeof(plot),Vector{String},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title, :xflip, :yflip, :zflip, :zlabel, :grid, :ylabel, :minorgrid, :xlabel, :seriestype), Tuple{String, Bool, Bool, Bool, String, Bool, String, Bool, String, Symbol}},typeof(plot),Vector{Float64},Vector{Float64},Function})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title, :xmirror, :ymirror, :zmirror, :zlabel, :grid, :ylabel, :minorgrid, :xlabel, :seriestype), Tuple{String, Bool, Bool, Bool, String, Bool, String, Bool, String, Symbol}},typeof(plot),Vector{Float64},Vector{Float64},Function})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title, :zlabel, :grid, :ylabel, :minorgrid, :xlabel, :seriestype), Tuple{String, String, Bool, String, Bool, String, Symbol}},typeof(plot),Vector{Float64},Vector{Float64},Function})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title,), Tuple{Matrix{String}}},typeof(plot),Plot{GRBackend},Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title,), Tuple{Matrix{String}}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:w,), Tuple{Int64}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:xaxis, :background_color, :leg), Tuple{Tuple{String, Tuple{Int64, Int64}, StepRange{Int64, Int64}, Symbol}, RGB{Float64}, Bool}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:zcolor, :m, :leg, :cbar, :w), Tuple{StepRange{Int64, Int64}, Tuple{Int64, Float64, Symbol, Stroke}, Bool, Bool, Int64}},typeof(plot),Vector{Float64},Vector{Float64},UnitRange{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(portfoliocomposition)),Any,typeof(portfoliocomposition),Any,Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(scatter!)),Any,typeof(scatter!),Any})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(test_examples)),NamedTuple{(:skip, :disp), Tuple{Vector{Int64}, Bool}},typeof(test_examples),Symbol})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(test_examples)),NamedTuple{(:skip,), Tuple{Vector{Int64}}},typeof(test_examples),Symbol})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(yaxis!)),Any,typeof(yaxis!),Any,Any})
|
|
||||||
Base.precompile(Tuple{Type{GridLayout},Int64,Vararg{Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},AbstractVector{<:GeometryBasics.Point}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},AbstractVector{OHLC}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},PortfolioComposition})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:barbins}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:barhist}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:bar}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:bins2d}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:histogram2d}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:hline}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:hspan}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:lens}},AbstractPlot})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:pie}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:quiver}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:spy}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:steppre}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:sticks}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:vline}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:vspan}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:xerror}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Vector{ComplexF64}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.add_series!),Plot{GRBackend},DefaultsDict})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.add_series!),Plot{PlotlyBackend},DefaultsDict})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.plot_setup!),Plot{GRBackend},Dict{Symbol, Any},Vector{Dict{Symbol, Any}}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.plot_setup!),Plot{PlotlyBackend},Dict{Symbol, Any},Vector{Dict{Symbol, Any}}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.preprocess_attributes!),Plot{GRBackend},DefaultsDict})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.preprocess_axis_args!),Plot{GRBackend},Dict{Symbol, Any},Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.preprocess_axis_args!),Plot{PlotlyBackend},Dict{Symbol, Any},Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.process_sliced_series_attributes!),Plot{GRBackend},Vector{Dict{Symbol, Any}}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.process_sliced_series_attributes!),Plot{PlotlyBackend},Vector{Dict{Symbol, Any}}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.process_userrecipe!),Plot{GRBackend},Vector{Dict{Symbol, Any}},Dict{Symbol, Any}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.process_userrecipe!),Plot{PlotlyBackend},Vector{Dict{Symbol, Any}},Dict{Symbol, Any}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.unzip),Vector{GeometryBasics.Point2{Float64}}})
|
|
||||||
Base.precompile(Tuple{typeof(_bin_centers),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(_cbar_unique),Vector{Float64},String})
|
|
||||||
Base.precompile(Tuple{typeof(_cbar_unique),Vector{Int64},String})
|
|
||||||
Base.precompile(Tuple{typeof(_cbar_unique),Vector{Nothing},String})
|
|
||||||
Base.precompile(Tuple{typeof(_cbar_unique),Vector{PlotUtils.ContinuousColorGradient},String})
|
|
||||||
Base.precompile(Tuple{typeof(_cbar_unique),Vector{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}},String})
|
|
||||||
Base.precompile(Tuple{typeof(_cbar_unique),Vector{Symbol},String})
|
|
||||||
Base.precompile(Tuple{typeof(_cycle),Base.OneTo{Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(_cycle),StepRange{Int64, Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(_cycle),UnitRange{Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(_cycle),Vector{Float64},StepRange{Int64, Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(_cycle),Vector{Float64},UnitRange{Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(_cycle),Vector{Float64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(_cycle),Vector{Int64},StepRange{Int64, Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(_cycle),Vector{Int64},UnitRange{Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(_do_plot_show),Plot{GRBackend},Bool})
|
|
||||||
Base.precompile(Tuple{typeof(_do_plot_show),Plot{PlotlyBackend},Bool})
|
|
||||||
Base.precompile(Tuple{typeof(_heatmap_edges),Vector{Float64},Bool,Bool})
|
|
||||||
Base.precompile(Tuple{typeof(_plot!),Plot,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(_preprocess_barlike),DefaultsDict,Base.OneTo{Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(_preprocess_binlike),DefaultsDict,StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(_replace_markershape),Vector{Symbol}})
|
|
||||||
Base.precompile(Tuple{typeof(_update_min_padding!),GridLayout})
|
|
||||||
Base.precompile(Tuple{typeof(_update_subplot_args),Plot{GRBackend},Subplot{GRBackend},Dict{Symbol, Any},Int64,Bool})
|
|
||||||
Base.precompile(Tuple{typeof(_update_subplot_args),Plot{PlotlyBackend},Subplot{PlotlyBackend},Dict{Symbol, Any},Int64,Bool})
|
|
||||||
Base.precompile(Tuple{typeof(_update_subplot_periphery),Subplot{GRBackend},Vector{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(_update_subplot_periphery),Subplot{PlotlyBackend},Vector{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(annotate!),AbstractVector{<:Tuple}})
|
|
||||||
Base.precompile(Tuple{typeof(axis_limits),Subplot{GRBackend},Symbol,Bool,Bool})
|
|
||||||
Base.precompile(Tuple{typeof(axis_limits),Subplot{PlotlyBackend},Symbol,Bool,Bool})
|
|
||||||
Base.precompile(Tuple{typeof(backend),PlotlyBackend})
|
|
||||||
Base.precompile(Tuple{typeof(bbox),AbsoluteLength,AbsoluteLength,AbsoluteLength,AbsoluteLength})
|
|
||||||
Base.precompile(Tuple{typeof(bbox),Float64,Float64,Float64,Float64})
|
|
||||||
Base.precompile(Tuple{typeof(build_layout),GridLayout,Int64,Vector{Plot}})
|
|
||||||
Base.precompile(Tuple{typeof(convert_to_polar),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64},Tuple{Int64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(discrete_value!),Axis,Vector{Union{Missing, Float64}}})
|
|
||||||
Base.precompile(Tuple{typeof(error_coords),Vector{Float64},Vector{Float64},Vector{Float64},Vararg{Vector{Float64}}})
|
|
||||||
Base.precompile(Tuple{typeof(error_coords),Vector{Float64},Vector{Float64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(error_zipit),Tuple{Vector{Float64}, Vector{Float64}, Vector{Float64}}})
|
|
||||||
Base.precompile(Tuple{typeof(fakedata),Int64,Int64})
|
|
||||||
Base.precompile(Tuple{typeof(fakedata),TaskLocalRNG,Int64,Vararg{Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(get_minor_ticks),Subplot{GRBackend},Axis,Tuple{Vector{Float64}, Vector{String}}})
|
|
||||||
Base.precompile(Tuple{typeof(get_minor_ticks),Subplot{GRBackend},Axis,Tuple{Vector{Int64}, Vector{String}}})
|
|
||||||
Base.precompile(Tuple{typeof(get_series_color),SubArray{Symbol, 1, Vector{Symbol}, Tuple{UnitRange{Int64}}, true},Subplot{GRBackend},Int64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(get_series_color),Vector{Symbol},Subplot{GRBackend},Int64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(get_series_color),Vector{Symbol},Subplot{PlotlyBackend},Int64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(get_ticks),StepRange{Int64, Int64},Vector{Float64},Vector{Any},Tuple{Int64, Int64},Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(get_ticks),Symbol,Vector{Float64},Vector{Any},Tuple{Float64, Float64},Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(get_ticks),Symbol,Vector{Float64},Vector{Any},Tuple{Int64, Float64},Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(get_ticks),Symbol,Vector{Float64},Vector{Any},Tuple{Int64, Int64},Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(get_ticks),UnitRange{Int64},Vector{Float64},Vector{Any},Tuple{Float64, Float64},Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(get_xy),Vector{OHLC}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_add_legend),Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), NTuple{9, Float64}},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_add_legend),Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), Tuple{Int64, Int64, Int64, Float64, Int64, Float64, Float64, Float64, Float64}},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_display),Subplot{GRBackend},AbsoluteLength,AbsoluteLength,Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_contour),Series,StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Matrix{Float64},Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_heatmap),Series,Vector{Float64},Vector{Float64},Matrix{Float64},Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Float64,Float64,Tuple{Float64, Float64},Int64,Float64,Float64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Float64,Float64,Tuple{Float64, Float64},Int64,Int64,Int64,Shape{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Float64,Float64,Tuple{Float64, Float64},Int64,Int64,Int64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Int64,Float64,Tuple{Float64, Float64},Int64,Float64,Int64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Int64,Float64,Tuple{Float64, Float64},Int64,Int64,Int64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Int64,Int64,Tuple{Float64, Float64},Int64,Int64,Int64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_markers),Series,Base.OneTo{Int64},Vector{Float64},Tuple{Float64, Float64},Int64,Int64})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_markers),Series,Base.OneTo{Int64},Vector{Float64},Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_markers),Series,StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64},Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_markers),Series,UnitRange{Int64},Vector{Float64},Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Base.OneTo{Int64},UnitRange{Int64},Tuple{Vector{Float64}, Vector{Float64}},Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Base.OneTo{Int64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Base.OneTo{Int64},Vector{Float64},Nothing,Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64},Nothing,Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,StepRange{Int64, Int64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,UnitRange{Int64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,UnitRange{Int64},Vector{Float64},Nothing,Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,UnitRange{Int64},Vector{Float64},Vector{Int64},Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Vector{Float64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Vector{Float64},Vector{Float64},Nothing,Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Vector{Int64},Vector{Int64},Nothing,Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_surface),Series,Vector{Float64},Vector{Float64},Matrix{Float64},Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_surface),Series,Vector{Float64},Vector{Float64},Vector{Float64},Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_fill_viewport),Vector{Float64},RGBA{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_get_3d_axis_angle),Vector{Float64},Float64,Float64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(gr_get_ticks_size),Tuple{Vector{Float64}, Vector{String}},Int64})
|
|
||||||
Base.precompile(Tuple{typeof(gr_get_ticks_size),Tuple{Vector{Int64}, Vector{String}},Int64})
|
|
||||||
Base.precompile(Tuple{typeof(gr_label_ticks),Subplot{GRBackend},Symbol,Tuple{Vector{Float64}, Vector{String}}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_label_ticks),Subplot{GRBackend},Symbol,Tuple{Vector{Int64}, Vector{String}}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_label_ticks_3d),Subplot{GRBackend},Symbol,Tuple{Vector{Float64}, Vector{String}}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_polaraxes),Int64,Float64,Subplot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_polyline),Vector{Float64},Vector{Float64},Function})
|
|
||||||
Base.precompile(Tuple{typeof(gr_set_gradient),PlotUtils.ContinuousColorGradient})
|
|
||||||
Base.precompile(Tuple{typeof(gr_text),Float64,Float64,String})
|
|
||||||
Base.precompile(Tuple{typeof(gr_text_size),String})
|
|
||||||
Base.precompile(Tuple{typeof(gr_update_viewport_legend!),Vector{Float64},Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), NTuple{9, Float64}}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_update_viewport_legend!),Vector{Float64},Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), Tuple{Int64, Int64, Int64, Float64, Int64, Float64, Float64, Float64, Float64}}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_viewport_from_bbox),Subplot{GRBackend},BoundingBox{Tuple{AbsoluteLength, AbsoluteLength}, Tuple{AbsoluteLength, AbsoluteLength}},AbsoluteLength,AbsoluteLength,Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(heatmap_edges),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(heatmap_edges),UnitRange{Int64},Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(heatmap_edges),Vector{Float64},Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(ignorenan_minimum),Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(layout_args),Matrix{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(layout_args),NamedTuple{(:label, :blank), Tuple{Symbol, Bool}}})
|
|
||||||
Base.precompile(Tuple{typeof(layout_args),NamedTuple{(:label, :width, :height), Tuple{Symbol, Symbol, Float64}}})
|
|
||||||
Base.precompile(Tuple{typeof(make_fillrange_side),UnitRange{Int64},LinRange{Float64, Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Float64, Float64},Symbol,Function})
|
|
||||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Float64, Float64},Symbol,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Int64, Float64},Symbol,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Int64, Int64},Symbol,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),StepRange{Int64, Int64},Tuple{Int64, Int64},Symbol,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),UnitRange{Int64},Tuple{Float64, Float64},Symbol,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(partialcircle),Float64,Float64,Int64})
|
|
||||||
Base.precompile(Tuple{typeof(partialcircle),Int64,Float64,Int64})
|
|
||||||
Base.precompile(Tuple{typeof(plot!),Any})
|
|
||||||
Base.precompile(Tuple{typeof(plot!),Plot,Plot,Plot,Vararg{Plot}})
|
|
||||||
Base.precompile(Tuple{typeof(plot),Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}}})
|
|
||||||
Base.precompile(Tuple{typeof(plot),Plot{GRBackend},Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{typeof(plot),Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}}})
|
|
||||||
Base.precompile(Tuple{typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
|
||||||
Base.precompile(Tuple{typeof(processGridArg!),Dict{Symbol, Any},Symbol,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(processLineArg),Dict{Symbol, Any},Matrix{Symbol}})
|
|
||||||
Base.precompile(Tuple{typeof(processLineArg),Dict{Symbol, Any},Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Bool})
|
|
||||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Matrix{Symbol}})
|
|
||||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},RGBA{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Shape{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Stroke})
|
|
||||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,PlotText})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,Tuple{String, Int64, Symbol, Symbol}})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,Tuple{String, Symbol, Int64, String}})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{PlotlyBackend},Int64,Float64,PlotText})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{PlotlyBackend},Int64,Float64,Tuple{String, Int64, Symbol, Symbol}})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{PlotlyBackend},Int64,Float64,Tuple{String, Symbol, Int64, String}})
|
|
||||||
Base.precompile(Tuple{typeof(process_axis_arg!),Dict{Symbol, Any},StepRange{Int64, Int64},Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(process_axis_arg!),Dict{Symbol, Any},Symbol,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(push!),Plot{GRBackend},Float64,Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(quiver_using_arrows),DefaultsDict})
|
|
||||||
Base.precompile(Tuple{typeof(resetfontsizes)})
|
|
||||||
Base.precompile(Tuple{typeof(scalefontsizes),Float64})
|
|
||||||
Base.precompile(Tuple{typeof(series_annotations),Vector{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(slice_arg),Base.ReshapedArray{Int64, 2, UnitRange{Int64}, Tuple{}},Int64})
|
|
||||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{AbsoluteLength},Int64})
|
|
||||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{Bool},Int64})
|
|
||||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{Int64},Int64})
|
|
||||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{PlotUtils.ContinuousColorGradient},Int64})
|
|
||||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{RGBA{Float64}},Int64})
|
|
||||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{String},Int64})
|
|
||||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{Symbol},Int64})
|
|
||||||
Base.precompile(Tuple{typeof(spy),Any})
|
|
||||||
Base.precompile(Tuple{typeof(straightline_data),Tuple{Float64, Float64},Tuple{Float64, Float64},Vector{Float64},Vector{Float64},Int64})
|
|
||||||
Base.precompile(Tuple{typeof(stroke),Int64,Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(text),String,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(title!),AbstractString})
|
|
||||||
Base.precompile(Tuple{typeof(vline!),Any})
|
|
||||||
Base.precompile(Tuple{typeof(warn_on_attr_dim_mismatch),Series,Vector{Float64},Vector{Float64},Nothing,Base.Iterators.Flatten{Vector{Tuple{SeriesSegment}}}})
|
|
||||||
Base.precompile(Tuple{typeof(xgrid!),Plot{GRBackend},Symbol,Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(xgrid!),Plot{PlotlyBackend},Symbol,Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(xlims),Subplot{PlotlyBackend}})
|
|
||||||
isdefined(Plots, Symbol("#168#169")) && Base.precompile(Tuple{getfield(Plots, Symbol("#168#169")),Any})
|
|
||||||
isdefined(Plots, Symbol("#170#171")) && Base.precompile(Tuple{getfield(Plots, Symbol("#170#171")),Any})
|
|
||||||
isdefined(Plots, Symbol("#2#6")) && Base.precompile(Tuple{getfield(Plots, Symbol("#2#6")),UnitRange{Int64}})
|
|
||||||
isdefined(Plots, Symbol("#301#337")) && Base.precompile(Tuple{getfield(Plots, Symbol("#301#337"))})
|
|
||||||
isdefined(Plots, Symbol("#322#358")) && Base.precompile(Tuple{getfield(Plots, Symbol("#322#358"))})
|
|
||||||
isdefined(Plots, Symbol("#add_major_or_minor_segments#102")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#102")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64}},Float64,Bool})
|
|
||||||
isdefined(Plots, Symbol("#add_major_or_minor_segments#103")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#103")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64, Float64}},Float64,Bool})
|
|
||||||
let fbody = try __lookup_kwbody__(which(annotate!, (AbstractVector{<:Tuple},))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}},typeof(annotate!),AbstractVector{<:Tuple},))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(font, (Font,Vararg{Any},))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}},typeof(font),Font,Vararg{Any},))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(gr_polyline, (Vector{Float64},Vector{Float64},typeof(GR.fillarea),))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Symbol,Symbol,typeof(gr_polyline),Vector{Float64},Vector{Float64},typeof(GR.fillarea),))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(gr_set_font, (Font,Subplot{GRBackend},))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Symbol,Symbol,RGBA{Float64},Float64,typeof(gr_set_font),Font,Subplot{GRBackend},))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(plot!, (Any,Vararg{Any},))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}},typeof(plot!),Any,Vararg{Any},))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(plot!, (Plot,Plot,))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}},typeof(plot!),Plot,Plot,))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(plot!, (Plot,Plot,Plot,))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}},typeof(plot!),Plot,Plot,Plot,))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(plot!, (Plot,Plot,Plot,Vararg{Plot},))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}},typeof(plot!),Plot,Plot,Plot,Vararg{Plot},))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(plot, (Any,))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}},typeof(plot),Any,))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(plot, (Any,Vararg{Any},))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}},typeof(plot),Any,Vararg{Any},))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(title!, (AbstractString,))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}},typeof(title!),AbstractString,))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(yaxis!, (Any,Vararg{Any},))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}},typeof(yaxis!),Any,Vararg{Any},))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
282
deps/SnoopCompile/precompile/1.8/precompile_Plots.jl
vendored
282
deps/SnoopCompile/precompile/1.8/precompile_Plots.jl
vendored
@ -1,282 +0,0 @@
|
|||||||
# Use
|
|
||||||
# @warnpcfail precompile(args...)
|
|
||||||
# if you want to be warned when a precompile directive fails
|
|
||||||
macro warnpcfail(ex::Expr)
|
|
||||||
modl = __module__
|
|
||||||
file = __source__.file === nothing ? "?" : String(__source__.file)
|
|
||||||
line = __source__.line
|
|
||||||
quote
|
|
||||||
$(esc(ex)) || @warn """precompile directive
|
|
||||||
$($(Expr(:quote, ex)))
|
|
||||||
failed. Please report an issue in $($modl) (after checking for duplicates) or remove this directive.""" _file=$file _line=$line
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
function _precompile_()
|
|
||||||
ccall(:jl_generating_output, Cint, ()) == 1 || return nothing
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}},typeof(_make_hist),Tuple{Vector{Float64}, Vector{Float64}},Int64})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}},typeof(_make_hist),Tuple{Vector{Float64}},Symbol})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Vector{Int64}}},typeof(_make_hist),Tuple{Vector{Float64}},Symbol})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:formatter,), Tuple{typeof(datetimeformatter)}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guide,), Tuple{String}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guide_position, :guidefontvalign, :mirror, :guide), Tuple{Symbol, Symbol, Bool, String}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims,), Tuple{Tuple{Int64, Float64}}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:ticks,), Tuple{Nothing}},typeof(attr!),Axis})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(default)),NamedTuple{(:titlefont, :legendfontsize, :guidefont, :tickfont, :guide, :framestyle, :yminorgrid), Tuple{Tuple{Int64, String}, Int64, Tuple{Int64, Symbol}, Tuple{Int64, Symbol}, String, Symbol, Bool}},typeof(default)})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),StepRange{Int64, Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),UnitRange{Int64},UnitRange{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),UnitRange{Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),Vector{Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_set_font)),NamedTuple{(:halign, :valign, :rotation), Tuple{Symbol, Symbol, Int64}},typeof(gr_set_font),Font,Subplot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_set_font)),NamedTuple{(:rotation, :color), Tuple{Int64, RGBA{Float64}}},typeof(gr_set_font),Font,Subplot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :label, :seriestype), Tuple{Float64, String, Symbol}},typeof(plot!),Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Plot{GRBackend},Vector{GeometryBasics.Point2{Float64}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{GeometryBasics.Point2{Float64}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Vector{GeometryBasics.Point2{Float64}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:annotation,), Tuple{Vector{Tuple{Int64, Float64, Tuple{String, Any, Any, Any}}}}},typeof(plot!)})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:c, :lw, :label), Tuple{Symbol, Int64, String}},typeof(plot!),Plot{GRBackend},Vector{Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:c, :lw, :label), Tuple{Symbol, Int64, String}},typeof(plot!),Plot{PlotlyBackend},Vector{Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:c, :lw, :label), Tuple{Symbol, Int64, String}},typeof(plot!),Vector{Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:layout, :margin), Tuple{Matrix{Any}, AbsoluteLength}},typeof(plot!),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Bool}},typeof(plot!),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Bool}},typeof(plot!),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Symbol}},typeof(plot!),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Symbol}},typeof(plot!),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:line, :seriestype), Tuple{Tuple{Int64, Symbol, Float64, Matrix{Symbol}}, Symbol}},typeof(plot!),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:line, :seriestype), Tuple{Tuple{Int64, Symbol, Float64, Matrix{Symbol}}, Symbol}},typeof(plot!),Plot{GRBackend},Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:line, :seriestype), Tuple{Tuple{Int64, Symbol, Float64, Matrix{Symbol}}, Symbol}},typeof(plot!),Plot{PlotlyBackend},Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:lw, :color), Tuple{Int64, Symbol}},typeof(plot!),Function,Float64,Irrational{:π}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:lw, :color), Tuple{Int64, Symbol}},typeof(plot!),Plot{GRBackend},Function,Float64,Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:marker, :series_annotations, :seriestype), Tuple{Tuple{Int64, Float64, Symbol}, Vector{Any}, Symbol}},typeof(plot!),Plot{GRBackend},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:marker, :series_annotations, :seriestype), Tuple{Tuple{Int64, Float64, Symbol}, Vector{Any}, Symbol}},typeof(plot!),Plot{PlotlyBackend},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:marker, :series_annotations, :seriestype), Tuple{Tuple{Int64, Float64, Symbol}, Vector{Any}, Symbol}},typeof(plot!),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:markersize, :c, :seriestype), Tuple{Int64, Symbol, Symbol}},typeof(plot!),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype, :inset), Tuple{Symbol, Tuple{Int64, BoundingBox{Tuple{Length{:w, Float64}, Length{:h, Float64}}, Tuple{Length{:w, Float64}, Length{:h, Float64}}}}}},typeof(plot!),Plot{GRBackend},Vector{Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype, :inset), Tuple{Symbol, Tuple{Int64, BoundingBox{Tuple{Length{:w, Float64}, Length{:h, Float64}}, Tuple{Length{:w, Float64}, Length{:h, Float64}}}}}},typeof(plot!),Plot{PlotlyBackend},Vector{Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype, :inset), Tuple{Symbol, Tuple{Int64, BoundingBox{Tuple{Length{:w, Float64}, Length{:h, Float64}}, Tuple{Length{:w, Float64}, Length{:h, Float64}}}}}},typeof(plot!),Vector{Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot!),Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:title,), Tuple{String}},typeof(plot!),Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:title,), Tuple{String}},typeof(plot!),Plot{PlotlyBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:title,), Tuple{String}},typeof(plot!)})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:w,), Tuple{Int64}},typeof(plot!),Plot{GRBackend},Vector{Float64},Vector{Float64},Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:yaxis, :minorgrid), Tuple{Tuple{String, Symbol}, Bool}},typeof(plot!)})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype), Tuple{Vector{Float64}, Tuple{Symbol, Float64, Stroke}, Vector{Float64}, String, Symbol}},typeof(plot!),Plot{GRBackend},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype), Tuple{Vector{Float64}, Tuple{Symbol, Float64, Stroke}, Vector{Float64}, String, Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype), Tuple{Vector{Float64}, Tuple{Symbol, Float64, Stroke}, Vector{Float64}, String, Symbol}},typeof(plot!),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:annotations, :leg), Tuple{Tuple{Int64, Float64, PlotText}, Bool}},typeof(plot),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:aspect_ratio, :seriestype), Tuple{Int64, Symbol}},typeof(plot),Vector{String},Vector{String},Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:bar_width, :alpha, :color, :fillto, :label, :seriestype), Tuple{Float64, Float64, Vector{Symbol}, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, String, Symbol}},typeof(plot),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:bins, :weights, :seriestype), Tuple{Symbol, Vector{Int64}, Symbol}},typeof(plot),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:color, :line, :marker), Tuple{Matrix{Symbol}, Tuple{Symbol, Int64}, Tuple{Matrix{Symbol}, Int64, Float64, Stroke}}},typeof(plot),Vector{Vector}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:connections, :title, :xlabel, :ylabel, :zlabel, :legend, :margin, :seriestype), Tuple{Tuple{Vector{Int64}, Vector{Int64}, Vector{Int64}}, String, String, String, String, Symbol, AbsoluteLength, Symbol}},typeof(plot),Vector{Int64},Vector{Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:fill, :seriestype), Tuple{Bool, Symbol}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Function})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:fill_z, :alpha, :label, :bar_width, :seriestype), Tuple{StepRange{Int64, Int64}, Vector{Float64}, String, UnitRange{Int64}, Symbol}},typeof(plot),Vector{Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:framestyle, :title, :color, :layout, :label, :markerstrokewidth, :ticks, :seriestype), Tuple{Matrix{Symbol}, Matrix{String}, Base.ReshapedArray{Int64, 2, UnitRange{Int64}, Tuple{}}, Int64, String, Int64, UnitRange{Int64}, Symbol}},typeof(plot),Vector{Vector{Float64}},Vector{Vector{Float64}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:grid, :title), Tuple{Tuple{Symbol, Symbol, Symbol, Int64, Float64}, String}},typeof(plot),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:lab, :w, :palette, :fill, :α), Tuple{String, Int64, PlotUtils.ContinuousColorGradient, Int64, Float64}},typeof(plot),StepRange{Int64, Int64},Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label, :legend, :seriestype), Tuple{String, Symbol, Symbol}},typeof(plot),Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label, :title, :xlabel, :linewidth, :legend), Tuple{Matrix{String}, String, String, Int64, Symbol}},typeof(plot),Vector{Function},Float64,Float64})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label,), Tuple{Matrix{String}}},typeof(plot),Vector{AbstractVector{Float64}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :group, :linetype, :linecolor), Tuple{Matrix{Any}, Vector{String}, Matrix{Symbol}, Symbol}},typeof(plot),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :label, :fillrange, :fillalpha), Tuple{Tuple{Int64, Int64}, String, Int64, Float64}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :label, :fillrange, :fillalpha), Tuple{Tuple{Int64, Int64}, String, Int64, Float64}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :link), Tuple{Int64, Symbol}},typeof(plot),Plot{GRBackend},Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :link), Tuple{Int64, Symbol}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :palette, :bg_inside), Tuple{Int64, Matrix{PlotUtils.ContinuousColorGradient}, Matrix{Symbol}}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :t, :leg, :ticks, :border), Tuple{Matrix{Any}, Matrix{Symbol}, Bool, Nothing, Symbol}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :title, :titlelocation, :left_margin, :bottom_margin, :xrotation), Tuple{Matrix{Any}, Matrix{String}, Symbol, Matrix{AbsoluteLength}, AbsoluteLength, Int64}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :xguide, :yguide, :xguidefonthalign, :yguidefontvalign, :xguideposition, :yguideposition, :ymirror, :xmirror, :legend, :seriestype), Tuple{Int64, String, String, Matrix{Symbol}, Matrix{Symbol}, Symbol, Matrix{Symbol}, Matrix{Bool}, Matrix{Bool}, Bool, Matrix{Symbol}}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :xlims), Tuple{Matrix{Any}, Tuple{Int64, Float64}}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout,), Tuple{Tuple{Int64, Int64}}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout,), Tuple{Tuple{Int64, Int64}}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:legend,), Tuple{Symbol}},typeof(plot),Vector{Tuple{Int64, Real}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:line, :lab, :ms), Tuple{Tuple{Matrix{Symbol}, Int64}, Matrix{String}, Int64}},typeof(plot),Vector{Vector},Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:line, :label, :legendtitle), Tuple{Tuple{Int64, Matrix{Symbol}}, Matrix{String}, String}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:line, :leg, :fill), Tuple{Int64, Bool, Tuple{Int64, Symbol}}},typeof(plot),Function,Function,Int64,Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:line, :marker, :bg, :fg, :xlim, :ylim, :leg), Tuple{Tuple{Int64, Symbol, Symbol}, Tuple{Shape{Float64, Float64}, Int64, RGBA{Float64}}, Symbol, Symbol, Tuple{Int64, Int64}, Tuple{Int64, Int64}, Bool}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:line_z, :linewidth, :legend), Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, Int64, Bool}},typeof(plot),Vector{Float64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:m, :markersize, :lab, :bg, :xlim, :ylim, :seriestype), Tuple{Matrix{Symbol}, Int64, Matrix{String}, Symbol, Tuple{Int64, Int64}, Tuple{Int64, Int64}, Symbol}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:marker,), Tuple{Bool}},typeof(plot),Vector{Union{Missing, Int64}}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:marker_z, :color, :legend, :seriestype), Tuple{typeof(+), Symbol, Bool, Symbol}},typeof(plot),Vector{Float64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:markershape, :markersize, :marker_z, :line_z, :linewidth), Tuple{Matrix{Symbol}, Matrix{Int64}, Matrix{Int64}, Matrix{Int64}, Matrix{Int64}}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:markershape, :seriestype, :label), Tuple{Symbol, Symbol, String}},typeof(plot),UnitRange{Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:nbins, :seriestype), Tuple{Int64, Symbol}},typeof(plot),Vector{Float64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:nbins, :show_empty_bins, :normed, :aspect_ratio, :seriestype), Tuple{Tuple{Int64, Int64}, Bool, Bool, Int64, Symbol}},typeof(plot),Vector{ComplexF64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:proj, :m), Tuple{Symbol, Int64}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:projection, :seriestype), Tuple{Symbol, Symbol}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},UnitRange{Int64},Matrix{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:quiver, :seriestype), Tuple{Tuple{Vector{Float64}, Vector{Float64}, Vector{Float64}}, Symbol}},typeof(plot),Vector{Float64},Vector{Float64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:reg, :fill), Tuple{Bool, Tuple{Int64, Symbol}}},typeof(plot),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{Tuple{LinRange{Float64, Int64}, LinRange{Float64, Int64}}}},typeof(plot),UnitRange{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{typeof(sqrt)}},typeof(plot),UnitRange{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype, :markershape, :markersize, :color), Tuple{Matrix{Symbol}, Vector{Symbol}, Int64, Vector{Symbol}}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot),Vector{DateTime},UnitRange{Int64},Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot),Vector{OHLC}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:st, :xlabel, :ylabel, :zlabel), Tuple{Symbol, String, String, String}},typeof(plot),Vector{Float64},Vector{Float64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title, :l, :seriestype), Tuple{String, Float64, Symbol}},typeof(plot),Vector{String},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title, :xflip, :yflip, :zflip, :zlabel, :grid, :ylabel, :minorgrid, :xlabel, :seriestype), Tuple{String, Bool, Bool, Bool, String, Bool, String, Bool, String, Symbol}},typeof(plot),Vector{Float64},Vector{Float64},Function})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title, :xmirror, :ymirror, :zmirror, :zlabel, :grid, :ylabel, :minorgrid, :xlabel, :seriestype), Tuple{String, Bool, Bool, Bool, String, Bool, String, Bool, String, Symbol}},typeof(plot),Vector{Float64},Vector{Float64},Function})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title, :zlabel, :grid, :ylabel, :minorgrid, :xlabel, :seriestype), Tuple{String, String, Bool, String, Bool, String, Symbol}},typeof(plot),Vector{Float64},Vector{Float64},Function})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title,), Tuple{Matrix{String}}},typeof(plot),Plot{GRBackend},Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title,), Tuple{Matrix{String}}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:w,), Tuple{Int64}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:xaxis, :background_color, :leg), Tuple{Tuple{String, Tuple{Int64, Int64}, StepRange{Int64, Int64}, Symbol}, RGB{Float64}, Bool}},typeof(plot),Matrix{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:zcolor, :m, :leg, :cbar, :w), Tuple{StepRange{Int64, Int64}, Tuple{Int64, Float64, Symbol, Stroke}, Bool, Bool, Int64}},typeof(plot),Vector{Float64},Vector{Float64},UnitRange{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(portfoliocomposition)),Any,typeof(portfoliocomposition),Any,Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(test_examples)),NamedTuple{(:skip, :disp), Tuple{Vector{Int64}, Bool}},typeof(test_examples),Symbol})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(test_examples)),NamedTuple{(:skip,), Tuple{Vector{Int64}}},typeof(test_examples),Symbol})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(yaxis!)),Any,typeof(yaxis!),Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},AbstractVector{OHLC}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},PortfolioComposition})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:barhist}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:bar}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:bins2d}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:histogram2d}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:hline}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:hspan}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:lens}},AbstractPlot})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:pie}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:quiver}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:sticks}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:vline}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:vspan}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:xerror}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Vector{ComplexF64}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.add_series!),Plot{GRBackend},DefaultsDict})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.add_series!),Plot{PlotlyBackend},DefaultsDict})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.plot_setup!),Plot{GRBackend},Dict{Symbol, Any},Vector{Dict{Symbol, Any}}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.plot_setup!),Plot{PlotlyBackend},Dict{Symbol, Any},Vector{Dict{Symbol, Any}}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.preprocess_attributes!),Plot{GRBackend},DefaultsDict})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.process_sliced_series_attributes!),Plot{GRBackend},Vector{Dict{Symbol, Any}}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.process_sliced_series_attributes!),Plot{PlotlyBackend},Vector{Dict{Symbol, Any}}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.process_userrecipe!),Plot{GRBackend},Vector{Dict{Symbol, Any}},Dict{Symbol, Any}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.unzip),Vector{GeometryBasics.Point2{Float64}}})
|
|
||||||
Base.precompile(Tuple{typeof(_bin_centers),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(_cbar_unique),Vector{PlotUtils.ContinuousColorGradient},String})
|
|
||||||
Base.precompile(Tuple{typeof(_cycle),StepRange{Int64, Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(_cycle),Vector{Float64},StepRange{Int64, Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(_cycle),Vector{Float64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(_do_plot_show),Plot{GRBackend},Bool})
|
|
||||||
Base.precompile(Tuple{typeof(_do_plot_show),Plot{PlotlyBackend},Bool})
|
|
||||||
Base.precompile(Tuple{typeof(_preprocess_barlike),DefaultsDict,Base.OneTo{Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(_preprocess_binlike),DefaultsDict,StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(_update_min_padding!),GridLayout})
|
|
||||||
Base.precompile(Tuple{typeof(_update_subplot_args),Plot{GRBackend},Subplot{GRBackend},Dict{Symbol, Any},Int64,Bool})
|
|
||||||
Base.precompile(Tuple{typeof(_update_subplot_args),Plot{PlotlyBackend},Subplot{PlotlyBackend},Dict{Symbol, Any},Int64,Bool})
|
|
||||||
Base.precompile(Tuple{typeof(_update_subplot_periphery),Subplot{GRBackend},Vector{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(_update_subplot_periphery),Subplot{PlotlyBackend},Vector{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(annotate!),AbstractVector{<:Tuple}})
|
|
||||||
Base.precompile(Tuple{typeof(axis_limits),Subplot{GRBackend},Symbol,Bool,Bool})
|
|
||||||
Base.precompile(Tuple{typeof(axis_limits),Subplot{PlotlyBackend},Symbol,Bool,Bool})
|
|
||||||
Base.precompile(Tuple{typeof(backend),PlotlyBackend})
|
|
||||||
Base.precompile(Tuple{typeof(bbox),AbsoluteLength,AbsoluteLength,AbsoluteLength,AbsoluteLength})
|
|
||||||
Base.precompile(Tuple{typeof(bbox),Float64,Float64,Float64,Float64})
|
|
||||||
Base.precompile(Tuple{typeof(build_layout),GridLayout,Int64,Vector{Plot}})
|
|
||||||
Base.precompile(Tuple{typeof(convert_to_polar),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64},Tuple{Int64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(error_coords),Vector{Float64},Vector{Float64},Vector{Float64},Vararg{Vector{Float64}}})
|
|
||||||
Base.precompile(Tuple{typeof(error_coords),Vector{Float64},Vector{Float64},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(error_zipit),Tuple{Vector{Float64}, Vector{Float64}, Vector{Float64}}})
|
|
||||||
Base.precompile(Tuple{typeof(fakedata),Int64,Int64})
|
|
||||||
Base.precompile(Tuple{typeof(get_minor_ticks),Subplot{GRBackend},Axis,Tuple{Vector{Float64}, Vector{String}}})
|
|
||||||
Base.precompile(Tuple{typeof(get_minor_ticks),Subplot{GRBackend},Axis,Tuple{Vector{Int64}, Vector{String}}})
|
|
||||||
Base.precompile(Tuple{typeof(get_series_color),SubArray{Symbol, 1, Vector{Symbol}, Tuple{UnitRange{Int64}}, true},Subplot{GRBackend},Int64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(get_series_color),Vector{Symbol},Subplot{GRBackend},Int64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(get_series_color),Vector{Symbol},Subplot{PlotlyBackend},Int64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(get_ticks),StepRange{Int64, Int64},Vector{Float64},Vector{Any},Tuple{Int64, Int64},Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(get_ticks),Symbol,Vector{Float64},Vector{Any},Tuple{Float64, Float64},Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(get_ticks),Symbol,Vector{Float64},Vector{Any},Tuple{Int64, Float64},Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(get_ticks),Symbol,Vector{Float64},Vector{Any},Tuple{Int64, Int64},Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(get_ticks),UnitRange{Int64},Vector{Float64},Vector{Any},Tuple{Float64, Float64},Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(get_xy),Vector{OHLC}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_add_legend),Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), NTuple{9, Float64}},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_add_legend),Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), Tuple{Int64, Int64, Int64, Float64, Int64, Float64, Float64, Float64, Float64}},Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_display),Subplot{GRBackend},AbsoluteLength,AbsoluteLength,Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_contour),Series,StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Matrix{Float64},Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_heatmap),Series,Vector{Float64},Vector{Float64},Matrix{Float64},Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Float64,Float64,Tuple{Float64, Float64},Int64,Float64,Float64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Float64,Float64,Tuple{Float64, Float64},Int64,Int64,Int64,Shape{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Float64,Float64,Tuple{Float64, Float64},Int64,Int64,Int64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Int64,Float64,Tuple{Float64, Float64},Int64,Float64,Int64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Int64,Float64,Tuple{Float64, Float64},Int64,Int64,Int64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Int64,Int64,Tuple{Float64, Float64},Int64,Int64,Int64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Base.OneTo{Int64},UnitRange{Int64},Tuple{Vector{Float64}, Vector{Float64}},Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Base.OneTo{Int64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,StepRange{Int64, Int64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Vector{Float64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_surface),Series,Vector{Float64},Vector{Float64},Matrix{Float64},Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_surface),Series,Vector{Float64},Vector{Float64},Vector{Float64},Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_fill_viewport),Vector{Float64},RGBA{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_get_ticks_size),Tuple{Vector{Float64}, Vector{String}},Int64})
|
|
||||||
Base.precompile(Tuple{typeof(gr_label_ticks),Subplot{GRBackend},Symbol,Tuple{Vector{Float64}, Vector{String}}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_label_ticks),Subplot{GRBackend},Symbol,Tuple{Vector{Int64}, Vector{String}}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_label_ticks_3d),Subplot{GRBackend},Symbol,Tuple{Vector{Float64}, Vector{String}}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_polaraxes),Int64,Float64,Subplot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_set_gradient),PlotUtils.ContinuousColorGradient})
|
|
||||||
Base.precompile(Tuple{typeof(gr_text),Float64,Float64,String})
|
|
||||||
Base.precompile(Tuple{typeof(gr_text_size),String})
|
|
||||||
Base.precompile(Tuple{typeof(gr_update_viewport_legend!),Vector{Float64},Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), NTuple{9, Float64}}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_update_viewport_legend!),Vector{Float64},Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), Tuple{Int64, Int64, Int64, Float64, Int64, Float64, Float64, Float64, Float64}}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_viewport_from_bbox),Subplot{GRBackend},BoundingBox{Tuple{AbsoluteLength, AbsoluteLength}, Tuple{AbsoluteLength, AbsoluteLength}},AbsoluteLength,AbsoluteLength,Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(heatmap_edges),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(heatmap_edges),UnitRange{Int64},Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(heatmap_edges),Vector{Float64},Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(ignorenan_minimum),Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(is_marker_supported),GRBackend,Vector{Symbol}})
|
|
||||||
Base.precompile(Tuple{typeof(layout_args),Matrix{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(link_axes!),GridLayout,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Float64, Float64},Symbol,Function})
|
|
||||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Float64, Float64},Symbol,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Int64, Float64},Symbol,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Int64, Int64},Symbol,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),StepRange{Int64, Int64},Tuple{Int64, Int64},Symbol,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),UnitRange{Int64},Tuple{Float64, Float64},Symbol,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(partialcircle),Int64,Float64,Int64})
|
|
||||||
Base.precompile(Tuple{typeof(plot!),Plot,Plot,Plot,Vararg{Plot}})
|
|
||||||
Base.precompile(Tuple{typeof(plot),Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}}})
|
|
||||||
Base.precompile(Tuple{typeof(plot),Plot{GRBackend},Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{typeof(plot),Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
|
||||||
Base.precompile(Tuple{typeof(processLineArg),Dict{Symbol, Any},Matrix{Symbol}})
|
|
||||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Matrix{Symbol}})
|
|
||||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},RGBA{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Shape{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,PlotText,Font})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,PlotText})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,Tuple{String, Int64, Symbol, Symbol},Font})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,Tuple{String, Int64, Symbol, Symbol}})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,Tuple{String, Symbol, Int64, String},Font})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,Tuple{String, Symbol, Int64, String}})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{PlotlyBackend},Int64,Float64,PlotText,Font})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{PlotlyBackend},Int64,Float64,PlotText})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{PlotlyBackend},Int64,Float64,Tuple{String, Int64, Symbol, Symbol},Font})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{PlotlyBackend},Int64,Float64,Tuple{String, Int64, Symbol, Symbol}})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{PlotlyBackend},Int64,Float64,Tuple{String, Symbol, Int64, String},Font})
|
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{PlotlyBackend},Int64,Float64,Tuple{String, Symbol, Int64, String}})
|
|
||||||
Base.precompile(Tuple{typeof(process_axis_arg!),Dict{Symbol, Any},StepRange{Int64, Int64},Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(process_axis_arg!),Dict{Symbol, Any},Symbol,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(push!),Plot{GRBackend},Float64,Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(push!),Segments{Tuple{Float64, Float64, Float64}},Tuple{Float64, Int64, Int64},Tuple{Float64, Int64, Int64}})
|
|
||||||
Base.precompile(Tuple{typeof(resetfontsizes)})
|
|
||||||
Base.precompile(Tuple{typeof(scalefontsizes),Float64})
|
|
||||||
Base.precompile(Tuple{typeof(series_annotations),Vector{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{AbsoluteLength},Int64})
|
|
||||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{Bool},Int64})
|
|
||||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{Int64},Int64})
|
|
||||||
Base.precompile(Tuple{typeof(spy),Any})
|
|
||||||
Base.precompile(Tuple{typeof(straightline_data),Tuple{Float64, Float64},Tuple{Float64, Float64},Vector{Float64},Vector{Float64},Int64})
|
|
||||||
Base.precompile(Tuple{typeof(title!),AbstractString})
|
|
||||||
Base.precompile(Tuple{typeof(update_child_bboxes!),GridLayout})
|
|
||||||
Base.precompile(Tuple{typeof(update_clims),Float64,Float64,SubArray{Int64, 1, Vector{Int64}, Tuple{UnitRange{Int64}}, true},typeof(ignorenan_extrema)})
|
|
||||||
Base.precompile(Tuple{typeof(warn_on_attr_dim_mismatch),Series,Vector{Float64},Vector{Float64},Nothing,Base.Iterators.Flatten{Vector{Tuple{SeriesSegment}}}})
|
|
||||||
Base.precompile(Tuple{typeof(xgrid!),Plot{GRBackend},Symbol,Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(xgrid!),Plot{PlotlyBackend},Symbol,Vararg{Any}})
|
|
||||||
Base.precompile(Tuple{typeof(xlims),Subplot{PlotlyBackend}})
|
|
||||||
isdefined(Plots, Symbol("#2#6")) && Base.precompile(Tuple{getfield(Plots, Symbol("#2#6")),UnitRange{Int64}})
|
|
||||||
isdefined(Plots, Symbol("#322#358")) && Base.precompile(Tuple{getfield(Plots, Symbol("#322#358"))})
|
|
||||||
isdefined(Plots, Symbol("#add_major_or_minor_segments#102")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#102")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64}},Float64,Bool})
|
|
||||||
isdefined(Plots, Symbol("#add_major_or_minor_segments#103")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#103")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64, Float64}},Float64,Bool})
|
|
||||||
end
|
|
||||||
@ -66,19 +66,26 @@ end
|
|||||||
|
|
||||||
function _precompile_()
|
function _precompile_()
|
||||||
ccall(:jl_generating_output, Cint, ()) == 1 || return nothing
|
ccall(:jl_generating_output, Cint, ()) == 1 || return nothing
|
||||||
|
Base.precompile(Tuple{Core.kwftype(typeof(Type)),NamedTuple{(:label, :blank), Tuple{Symbol, Bool}},Type{EmptyLayout}})
|
||||||
|
Base.precompile(Tuple{Core.kwftype(typeof(Type)),NamedTuple{(:label, :width, :height), Tuple{Symbol, Symbol, Length{:pct, Float64}}},Type{EmptyLayout}})
|
||||||
|
Base.precompile(Tuple{Core.kwftype(typeof(Type)),NamedTuple{(:parent,), Tuple{GridLayout}},Type{Subplot},GRBackend})
|
||||||
|
Base.precompile(Tuple{Core.kwftype(typeof(Type)),NamedTuple{(:parent,), Tuple{GridLayout}},Type{Subplot},PlotlyBackend})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(Type)),NamedTuple{(:parent,), Tuple{Subplot{GRBackend}}},Type{Subplot},GRBackend})
|
Base.precompile(Tuple{Core.kwftype(typeof(Type)),NamedTuple{(:parent,), Tuple{Subplot{GRBackend}}},Type{Subplot},GRBackend})
|
||||||
|
Base.precompile(Tuple{Core.kwftype(typeof(Type)),NamedTuple{(:parent,), Tuple{Subplot{PlotlyBackend}}},Type{Subplot},PlotlyBackend})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}},typeof(_make_hist),Tuple{Vector{Float64}, Vector{Float64}},Int64})
|
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}},typeof(_make_hist),Tuple{Vector{Float64}, Vector{Float64}},Int64})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}},typeof(_make_hist),Tuple{Vector{Float64}, Vector{Float64}},Tuple{Int64, Int64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}},typeof(_make_hist),Tuple{Vector{Float64}, Vector{Float64}},Tuple{Int64, Int64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}},typeof(_make_hist),Tuple{Vector{Float64}},Symbol})
|
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}},typeof(_make_hist),Tuple{Vector{Float64}},Symbol})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Vector{Int64}}},typeof(_make_hist),Tuple{Vector{Float64}},Symbol})
|
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Vector{Int64}}},typeof(_make_hist),Tuple{Vector{Float64}},Symbol})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(areaplot)),Any,typeof(areaplot),Any,Vararg{Any, N} where N})
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:flip,), Tuple{Bool}},typeof(attr!),Axis})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:foreground_color_grid, :grid, :gridalpha, :gridstyle, :gridlinewidth), Tuple{RGBA{Float64}, Bool, Float64, Symbol, Int64}},typeof(attr!),Axis})
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:formatter,), Tuple{Symbol}},typeof(attr!),Axis})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:formatter,), Tuple{typeof(datetimeformatter)}},typeof(attr!),Axis})
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:formatter,), Tuple{typeof(datetimeformatter)}},typeof(attr!),Axis})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :flip, :minorgrid, :guide), Tuple{Bool, Bool, Bool, String}},typeof(attr!),Axis})
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :flip, :minorgrid, :guide), Tuple{Bool, Bool, Bool, String}},typeof(attr!),Axis})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :lims), Tuple{Bool, Tuple{Float64, Float64}}},typeof(attr!),Axis})
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :lims), Tuple{Bool, Tuple{Float64, Float64}}},typeof(attr!),Axis})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :lims, :flip), Tuple{Bool, Tuple{Float64, Float64}, Bool}},typeof(attr!),Axis})
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :lims, :flip), Tuple{Bool, Tuple{Float64, Float64}, Bool}},typeof(attr!),Axis})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :minorgrid, :guide), Tuple{Bool, Bool, String}},typeof(attr!),Axis})
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :minorgrid, :guide), Tuple{Bool, Bool, String}},typeof(attr!),Axis})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :minorgrid, :mirror, :guide), Tuple{Bool, Bool, Bool, String}},typeof(attr!),Axis})
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :minorgrid, :mirror, :guide), Tuple{Bool, Bool, Bool, String}},typeof(attr!),Axis})
|
||||||
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid,), Tuple{Bool}},typeof(attr!),Axis})
|
||||||
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:gridlinewidth, :grid, :gridalpha, :gridstyle, :foreground_color_grid), Tuple{Int64, Bool, Float64, Symbol, RGBA{Float64}}},typeof(attr!),Axis})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guide,), Tuple{String}},typeof(attr!),Axis})
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guide,), Tuple{String}},typeof(attr!),Axis})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guide_position, :guidefontvalign, :mirror, :guide), Tuple{Symbol, Symbol, Bool, String}},typeof(attr!),Axis})
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guide_position, :guidefontvalign, :mirror, :guide), Tuple{Symbol, Symbol, Bool, String}},typeof(attr!),Axis})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guidefonthalign, :guide_position, :mirror, :guide), Tuple{Symbol, Symbol, Bool, String}},typeof(attr!),Axis})
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guidefonthalign, :guide_position, :mirror, :guide), Tuple{Symbol, Symbol, Bool, String}},typeof(attr!),Axis})
|
||||||
@ -87,6 +94,8 @@ function _precompile_()
|
|||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims,), Tuple{Tuple{Int64, Float64}}},typeof(attr!),Axis})
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims,), Tuple{Tuple{Int64, Float64}}},typeof(attr!),Axis})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims,), Tuple{Tuple{Int64, Int64}}},typeof(attr!),Axis})
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims,), Tuple{Tuple{Int64, Int64}}},typeof(attr!),Axis})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:minorgrid, :scale, :guide), Tuple{Bool, Symbol, String}},typeof(attr!),Axis})
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:minorgrid, :scale, :guide), Tuple{Bool, Symbol, String}},typeof(attr!),Axis})
|
||||||
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:minorgrid,), Tuple{Bool}},typeof(attr!),Axis})
|
||||||
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:rotation,), Tuple{Int64}},typeof(attr!),Axis})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:ticks,), Tuple{Nothing}},typeof(attr!),Axis})
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:ticks,), Tuple{Nothing}},typeof(attr!),Axis})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:ticks,), Tuple{UnitRange{Int64}}},typeof(attr!),Axis})
|
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:ticks,), Tuple{UnitRange{Int64}}},typeof(attr!),Axis})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(default)),NamedTuple{(:shape,), Tuple{Symbol}},typeof(default)})
|
Base.precompile(Tuple{Core.kwftype(typeof(default)),NamedTuple{(:shape,), Tuple{Symbol}},typeof(default)})
|
||||||
@ -99,17 +108,12 @@ function _precompile_()
|
|||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),UnitRange{Int64},Vector{Float64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),UnitRange{Int64},Vector{Float64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),Vector{Int64},Vector{Float64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),Vector{Int64},Vector{Float64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_set_font)),NamedTuple{(:halign, :valign, :rotation), Tuple{Symbol, Symbol, Int64}},typeof(gr_set_font),Font,Subplot{GRBackend}})
|
Base.precompile(Tuple{Core.kwftype(typeof(gr_set_font)),NamedTuple{(:halign, :valign, :rotation), Tuple{Symbol, Symbol, Int64}},typeof(gr_set_font),Font,Subplot{GRBackend}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_set_font)),NamedTuple{(:rotation, :color), Tuple{Int64, RGBA{Float64}}},typeof(gr_set_font),Font,Subplot{GRBackend}})
|
Base.precompile(Tuple{Core.kwftype(typeof(hline!)),Any,typeof(hline!),Any})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :label, :seriestype), Tuple{Float64, String, Symbol}},typeof(plot!),Plot{GRBackend},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :label, :seriestype), Tuple{Float64, String, Symbol}},typeof(plot!),Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Plot{GRBackend},Vector{GeometryBasics.Point2{Float64}}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Plot{GRBackend},Vector{GeometryBasics.Point2{Float64}}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{GeometryBasics.Point2{Float64}}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{GeometryBasics.Point2{Float64}}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Vector{GeometryBasics.Point2{Float64}}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Vector{GeometryBasics.Point2{Float64}}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:annotation,), Tuple{Vector{Tuple{Int64, Float64, Tuple{String, Any, Any, Any}}}}},typeof(plot!)})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:annotation,), Tuple{Vector{Tuple{Int64, Float64, Tuple{String, Any, Any, Any}}}}},typeof(plot!)})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:c, :lw, :label), Tuple{Symbol, Int64, String}},typeof(plot!),Plot{GRBackend},Vector{Int64},Vector{Int64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:layout, :margin), Tuple{GridLayout, AbsoluteLength}},typeof(plot!),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:c, :lw, :label), Tuple{Symbol, Int64, String}},typeof(plot!),Plot{PlotlyBackend},Vector{Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:c, :lw, :label), Tuple{Symbol, Int64, String}},typeof(plot!),Vector{Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:layout, :margin), Tuple{Matrix{Any}, AbsoluteLength}},typeof(plot!),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Bool}},typeof(plot!),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Bool}},typeof(plot!),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Bool}},typeof(plot!),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}, N} where N})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Bool}},typeof(plot!),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}, N} where N})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Symbol}},typeof(plot!),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Symbol}},typeof(plot!),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
||||||
@ -141,30 +145,29 @@ function _precompile_()
|
|||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype), Tuple{Vector{Float64}, Tuple{Symbol, Float64, Stroke}, Vector{Float64}, String, Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{Float64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype), Tuple{Vector{Float64}, Tuple{Symbol, Float64, Stroke}, Vector{Float64}, String, Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{Float64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype), Tuple{Vector{Float64}, Tuple{Symbol, Float64, Stroke}, Vector{Float64}, String, Symbol}},typeof(plot!),Vector{Float64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype), Tuple{Vector{Float64}, Tuple{Symbol, Float64, Stroke}, Vector{Float64}, String, Symbol}},typeof(plot!),Vector{Float64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:annotations, :leg), Tuple{Tuple{Int64, Float64, PlotText}, Bool}},typeof(plot),Vector{Float64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:annotations, :leg), Tuple{Tuple{Int64, Float64, PlotText}, Bool}},typeof(plot),Vector{Float64}})
|
||||||
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:arrow,), Tuple{Int64}},typeof(plot),Vector{Float64},Vector{Float64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:aspect_ratio, :seriestype), Tuple{Int64, Symbol}},typeof(plot),Vector{String},Vector{String},Matrix{Float64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:aspect_ratio, :seriestype), Tuple{Int64, Symbol}},typeof(plot),Vector{String},Vector{String},Matrix{Float64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:bar_width, :alpha, :color, :fillto, :label, :seriestype), Tuple{Float64, Float64, Vector{Symbol}, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, String, Symbol}},typeof(plot),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:bins, :weights, :seriestype), Tuple{Symbol, Vector{Int64}, Symbol}},typeof(plot),Vector{Float64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:bins, :weights, :seriestype), Tuple{Symbol, Vector{Int64}, Symbol}},typeof(plot),Vector{Float64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:color, :line, :marker), Tuple{Matrix{Symbol}, Tuple{Symbol, Int64}, Tuple{Matrix{Symbol}, Int64, Float64, Stroke}}},typeof(plot),Vector{Vector{T} where T}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:color, :line, :marker), Tuple{Matrix{Symbol}, Tuple{Symbol, Int64}, Tuple{Matrix{Symbol}, Int64, Float64, Stroke}}},typeof(plot),Vector{Vector{T} where T}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:connections, :title, :xlabel, :ylabel, :zlabel, :legend, :margin, :seriestype), Tuple{Tuple{Vector{Int64}, Vector{Int64}, Vector{Int64}}, String, String, String, String, Symbol, AbsoluteLength, Symbol}},typeof(plot),Vector{Int64},Vector{Int64},Vector{Int64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:connections, :title, :xlabel, :ylabel, :zlabel, :legend, :margin, :seriestype), Tuple{Tuple{Vector{Int64}, Vector{Int64}, Vector{Int64}}, String, String, String, String, Symbol, AbsoluteLength, Symbol}},typeof(plot),Vector{Int64},Vector{Int64},Vector{Int64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:fill, :seriestype), Tuple{Bool, Symbol}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Function})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:fill, :seriestype), Tuple{Bool, Symbol}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Function})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:fill_z, :alpha, :label, :bar_width, :seriestype), Tuple{StepRange{Int64, Int64}, Vector{Float64}, String, UnitRange{Int64}, Symbol}},typeof(plot),Vector{Int64},Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:framestyle, :title, :color, :layout, :label, :markerstrokewidth, :ticks, :seriestype), Tuple{Matrix{Symbol}, Matrix{String}, Base.ReshapedArray{Int64, 2, UnitRange{Int64}, Tuple{}}, Int64, String, Int64, UnitRange{Int64}, Symbol}},typeof(plot),Vector{Vector{Float64}},Vector{Vector{Float64}}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:framestyle, :title, :color, :layout, :label, :markerstrokewidth, :ticks, :seriestype), Tuple{Matrix{Symbol}, Matrix{String}, Base.ReshapedArray{Int64, 2, UnitRange{Int64}, Tuple{}}, Int64, String, Int64, UnitRange{Int64}, Symbol}},typeof(plot),Vector{Vector{Float64}},Vector{Vector{Float64}}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:grid, :title), Tuple{Tuple{Symbol, Symbol, Symbol, Int64, Float64}, String}},typeof(plot),Vector{Float64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:grid, :title), Tuple{Tuple{Symbol, Symbol, Symbol, Int64, Float64}, String}},typeof(plot),Vector{Float64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:lab, :w, :palette, :fill, :α), Tuple{String, Int64, PlotUtils.ContinuousColorGradient, Int64, Float64}},typeof(plot),StepRange{Int64, Int64},Matrix{Float64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:lab, :w, :palette, :fill, :α), Tuple{String, Int64, PlotUtils.ContinuousColorGradient, Int64, Float64}},typeof(plot),StepRange{Int64, Int64},Matrix{Float64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label, :legend, :seriestype), Tuple{String, Symbol, Symbol}},typeof(plot),Vector{Int64}})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label, :title, :xlabel, :linewidth, :legend), Tuple{Matrix{String}, String, String, Int64, Symbol}},typeof(plot),Vector{Function},Float64,Float64})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label, :title, :xlabel, :linewidth, :legend), Tuple{Matrix{String}, String, String, Int64, Symbol}},typeof(plot),Vector{Function},Float64,Float64})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label,), Tuple{Matrix{String}}},typeof(plot),Vector{AbstractVector{Float64}}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label,), Tuple{Matrix{String}}},typeof(plot),Vector{AbstractVector{Float64}}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :group, :linetype, :linecolor), Tuple{Matrix{Any}, Vector{String}, Matrix{Symbol}, Symbol}},typeof(plot),Vector{Float64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:labels,), Tuple{Matrix{String}}},typeof(plot),PortfolioComposition})
|
||||||
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :group, :linetype, :linecolor), Tuple{GridLayout, Vector{String}, Matrix{Symbol}, Symbol}},typeof(plot),Vector{Float64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :label, :fillrange, :fillalpha), Tuple{Tuple{Int64, Int64}, String, Int64, Float64}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :label, :fillrange, :fillalpha), Tuple{Tuple{Int64, Int64}, String, Int64, Float64}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :label, :fillrange, :fillalpha), Tuple{Tuple{Int64, Int64}, String, Int64, Float64}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :label, :fillrange, :fillalpha), Tuple{Tuple{Int64, Int64}, String, Int64, Float64}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :link), Tuple{Int64, Symbol}},typeof(plot),Plot{GRBackend},Plot{GRBackend}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :link), Tuple{Int64, Symbol}},typeof(plot),Plot{GRBackend},Plot{GRBackend}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :link), Tuple{Int64, Symbol}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :link), Tuple{Int64, Symbol}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :margin), Tuple{Matrix{Any}, AbsoluteLength}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :margin), Tuple{GridLayout, AbsoluteLength}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :palette, :bg_inside), Tuple{Int64, Matrix{PlotUtils.ContinuousColorGradient}, Matrix{Symbol}}},typeof(plot),Matrix{Float64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :palette, :bg_inside), Tuple{Int64, Matrix{PlotUtils.ContinuousColorGradient}, Matrix{Symbol}}},typeof(plot),Matrix{Float64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :t, :leg, :ticks, :border), Tuple{Matrix{Any}, Matrix{Symbol}, Bool, Nothing, Symbol}},typeof(plot),Matrix{Float64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :t, :leg, :ticks, :border), Tuple{GridLayout, Matrix{Symbol}, Bool, Nothing, Symbol}},typeof(plot),Matrix{Float64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :title, :titlelocation, :left_margin, :bottom_margin, :xrotation), Tuple{Matrix{Any}, Matrix{String}, Symbol, Matrix{AbsoluteLength}, AbsoluteLength, Int64}},typeof(plot),Matrix{Float64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :title, :titlelocation, :left_margin, :bottom_margin, :xrotation), Tuple{GridLayout, Matrix{String}, Symbol, Matrix{AbsoluteLength}, AbsoluteLength, Int64}},typeof(plot),Matrix{Float64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :xguide, :yguide, :xguidefonthalign, :yguidefontvalign, :xguideposition, :yguideposition, :ymirror, :xmirror, :legend, :seriestype), Tuple{Int64, String, String, Matrix{Symbol}, Matrix{Symbol}, Symbol, Matrix{Symbol}, Matrix{Bool}, Matrix{Bool}, Bool, Matrix{Symbol}}},typeof(plot),Matrix{Float64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :xguide, :yguide, :xguidefonthalign, :yguidefontvalign, :xguideposition, :yguideposition, :ymirror, :xmirror, :legend, :seriestype), Tuple{Int64, String, String, Matrix{Symbol}, Matrix{Symbol}, Symbol, Matrix{Symbol}, Matrix{Bool}, Matrix{Bool}, Bool, Matrix{Symbol}}},typeof(plot),Matrix{Float64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :xlims), Tuple{Matrix{Any}, Tuple{Int64, Float64}}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :xlims), Tuple{GridLayout, Tuple{Int64, Float64}}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout,), Tuple{Tuple{Int64, Int64}}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout,), Tuple{Tuple{Int64, Int64}}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout,), Tuple{Tuple{Int64, Int64}}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout,), Tuple{Tuple{Int64, Int64}}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:legend,), Tuple{Bool}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:legend,), Tuple{Bool}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
||||||
@ -192,7 +195,6 @@ function _precompile_()
|
|||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}}},typeof(plot),UnitRange{Int64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}}},typeof(plot),UnitRange{Int64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{Tuple{LinRange{Float64}, LinRange{Float64}}}},typeof(plot),UnitRange{Int64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{Tuple{LinRange{Float64}, LinRange{Float64}}}},typeof(plot),UnitRange{Int64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{typeof(sqrt)}},typeof(plot),UnitRange{Int64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{typeof(sqrt)}},typeof(plot),UnitRange{Int64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriescolor, :fillalpha), Tuple{Matrix{Symbol}, Matrix{Float64}}},typeof(plot),AreaPlot})
|
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype, :markershape, :markersize, :color), Tuple{Matrix{Symbol}, Vector{Symbol}, Int64, Vector{Symbol}}},typeof(plot),Matrix{Float64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype, :markershape, :markersize, :color), Tuple{Matrix{Symbol}, Vector{Symbol}, Int64, Vector{Symbol}}},typeof(plot),Matrix{Float64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Matrix{Float64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Matrix{Float64}})
|
||||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot),Vector{DateTime},UnitRange{Int64},Matrix{Float64}})
|
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot),Vector{DateTime},UnitRange{Int64},Matrix{Float64}})
|
||||||
@ -220,14 +222,12 @@ function _precompile_()
|
|||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:bins2d}},Any,Any,Any})
|
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:bins2d}},Any,Any,Any})
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:histogram2d}},Any,Any,Any})
|
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:histogram2d}},Any,Any,Any})
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:hline}},Any,Any,Any})
|
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:hline}},Any,Any,Any})
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:hspan}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:lens}},AbstractPlot})
|
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:lens}},AbstractPlot})
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:pie}},Any,Any,Any})
|
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:pie}},Any,Any,Any})
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:quiver}},Any,Any,Any})
|
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:quiver}},Any,Any,Any})
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:steppre}},Any,Any,Any})
|
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:steppre}},Any,Any,Any})
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:sticks}},Any,Any,Any})
|
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:sticks}},Any,Any,Any})
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:vline}},Any,Any,Any})
|
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:vline}},Any,Any,Any})
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:vspan}},Any,Any,Any})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:xerror}},Any,Any,Any})
|
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:xerror}},Any,Any,Any})
|
||||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Vector{ComplexF64}})
|
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Vector{ComplexF64}})
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.add_series!),Plot{GRBackend},DefaultsDict})
|
Base.precompile(Tuple{typeof(RecipesPipeline.add_series!),Plot{GRBackend},DefaultsDict})
|
||||||
@ -235,23 +235,22 @@ function _precompile_()
|
|||||||
Base.precompile(Tuple{typeof(RecipesPipeline.plot_setup!),Plot{GRBackend},Dict{Symbol, Any},Vector{Dict{Symbol, Any}}})
|
Base.precompile(Tuple{typeof(RecipesPipeline.plot_setup!),Plot{GRBackend},Dict{Symbol, Any},Vector{Dict{Symbol, Any}}})
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.plot_setup!),Plot{PlotlyBackend},Dict{Symbol, Any},Vector{Dict{Symbol, Any}}})
|
Base.precompile(Tuple{typeof(RecipesPipeline.plot_setup!),Plot{PlotlyBackend},Dict{Symbol, Any},Vector{Dict{Symbol, Any}}})
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.preprocess_attributes!),Plot{GRBackend},DefaultsDict})
|
Base.precompile(Tuple{typeof(RecipesPipeline.preprocess_attributes!),Plot{GRBackend},DefaultsDict})
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.process_sliced_series_attributes!),Plot{GRBackend},Vector{Dict{Symbol, Any}}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.process_sliced_series_attributes!),Plot{PlotlyBackend},Vector{Dict{Symbol, Any}}})
|
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.process_userrecipe!),Plot{GRBackend},Vector{Dict{Symbol, Any}},Dict{Symbol, Any}})
|
Base.precompile(Tuple{typeof(RecipesPipeline.process_userrecipe!),Plot{GRBackend},Vector{Dict{Symbol, Any}},Dict{Symbol, Any}})
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.process_userrecipe!),Plot{PlotlyBackend},Vector{Dict{Symbol, Any}},Dict{Symbol, Any}})
|
Base.precompile(Tuple{typeof(RecipesPipeline.process_userrecipe!),Plot{PlotlyBackend},Vector{Dict{Symbol, Any}},Dict{Symbol, Any}})
|
||||||
Base.precompile(Tuple{typeof(RecipesPipeline.unzip),Vector{GeometryBasics.Point2{Float64}}})
|
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plot{GRBackend},DefaultsDict,Symbol,Any})
|
||||||
|
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plot{GRBackend},Dict{Symbol, Any},Symbol,Any})
|
||||||
|
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plot{PlotlyBackend},DefaultsDict,Symbol,Any})
|
||||||
|
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plot{PlotlyBackend},Dict{Symbol, Any},Symbol,Any})
|
||||||
Base.precompile(Tuple{typeof(_bin_centers),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}})
|
Base.precompile(Tuple{typeof(_bin_centers),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}})
|
||||||
Base.precompile(Tuple{typeof(_bin_centers),Vector{Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(_cbar_unique),Vector{Float64},String})
|
|
||||||
Base.precompile(Tuple{typeof(_cbar_unique),Vector{Int64},String})
|
Base.precompile(Tuple{typeof(_cbar_unique),Vector{Int64},String})
|
||||||
Base.precompile(Tuple{typeof(_cbar_unique),Vector{Nothing},String})
|
Base.precompile(Tuple{typeof(_cbar_unique),Vector{Nothing},String})
|
||||||
Base.precompile(Tuple{typeof(_cbar_unique),Vector{PlotUtils.ContinuousColorGradient},String})
|
Base.precompile(Tuple{typeof(_cbar_unique),Vector{PlotUtils.ContinuousColorGradient},String})
|
||||||
Base.precompile(Tuple{typeof(_cbar_unique),Vector{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}},String})
|
Base.precompile(Tuple{typeof(_cbar_unique),Vector{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}},String})
|
||||||
Base.precompile(Tuple{typeof(_cbar_unique),Vector{Symbol},String})
|
Base.precompile(Tuple{typeof(_cbar_unique),Vector{Symbol},String})
|
||||||
Base.precompile(Tuple{typeof(_cycle),UnitRange{Int64},Vector{Int64}})
|
Base.precompile(Tuple{typeof(_cycle),Base.OneTo{Int64},Vector{Int64}})
|
||||||
Base.precompile(Tuple{typeof(_cycle),Vector{Float64},StepRange{Int64, Int64}})
|
Base.precompile(Tuple{typeof(_cycle),StepRange{Int64, Int64},Vector{Int64}})
|
||||||
Base.precompile(Tuple{typeof(_cycle),Vector{Int64},StepRange{Int64, Int64}})
|
Base.precompile(Tuple{typeof(_cycle),Vector{Float64},UnitRange{Int64}})
|
||||||
Base.precompile(Tuple{typeof(_cycle),Vector{Int64},UnitRange{Int64}})
|
Base.precompile(Tuple{typeof(_cycle),Vector{Float64},Vector{Int64}})
|
||||||
Base.precompile(Tuple{typeof(_do_plot_show),Plot{GRBackend},Bool})
|
Base.precompile(Tuple{typeof(_do_plot_show),Plot{GRBackend},Bool})
|
||||||
Base.precompile(Tuple{typeof(_do_plot_show),Plot{PlotlyBackend},Bool})
|
Base.precompile(Tuple{typeof(_do_plot_show),Plot{PlotlyBackend},Bool})
|
||||||
Base.precompile(Tuple{typeof(_heatmap_edges),Vector{Float64},Bool,Bool})
|
Base.precompile(Tuple{typeof(_heatmap_edges),Vector{Float64},Bool,Bool})
|
||||||
@ -270,7 +269,7 @@ function _precompile_()
|
|||||||
Base.precompile(Tuple{typeof(bbox),Float64,Float64,Float64,Float64})
|
Base.precompile(Tuple{typeof(bbox),Float64,Float64,Float64,Float64})
|
||||||
Base.precompile(Tuple{typeof(build_layout),GridLayout,Int64,Vector{Plot}})
|
Base.precompile(Tuple{typeof(build_layout),GridLayout,Int64,Vector{Plot}})
|
||||||
Base.precompile(Tuple{typeof(convert_to_polar),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Vector{Float64},Tuple{Int64, Float64}})
|
Base.precompile(Tuple{typeof(convert_to_polar),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Vector{Float64},Tuple{Int64, Float64}})
|
||||||
Base.precompile(Tuple{typeof(default),Symbol,Bool})
|
Base.precompile(Tuple{typeof(create_grid),Expr})
|
||||||
Base.precompile(Tuple{typeof(error_coords),Vector{Float64},Vector{Float64},Vector{Float64},Vararg{Vector{Float64}, N} where N})
|
Base.precompile(Tuple{typeof(error_coords),Vector{Float64},Vector{Float64},Vector{Float64},Vararg{Vector{Float64}, N} where N})
|
||||||
Base.precompile(Tuple{typeof(error_coords),Vector{Float64},Vector{Float64},Vector{Float64}})
|
Base.precompile(Tuple{typeof(error_coords),Vector{Float64},Vector{Float64},Vector{Float64}})
|
||||||
Base.precompile(Tuple{typeof(error_zipit),Tuple{Vector{Float64}, Vector{Float64}, Vector{Float64}}})
|
Base.precompile(Tuple{typeof(error_zipit),Tuple{Vector{Float64}, Vector{Float64}, Vector{Float64}}})
|
||||||
@ -278,7 +277,6 @@ function _precompile_()
|
|||||||
Base.precompile(Tuple{typeof(fakedata),MersenneTwister,Int64,Vararg{Int64, N} where N})
|
Base.precompile(Tuple{typeof(fakedata),MersenneTwister,Int64,Vararg{Int64, N} where N})
|
||||||
Base.precompile(Tuple{typeof(get_minor_ticks),Subplot{GRBackend},Axis,Tuple{Vector{Float64}, Vector{String}}})
|
Base.precompile(Tuple{typeof(get_minor_ticks),Subplot{GRBackend},Axis,Tuple{Vector{Float64}, Vector{String}}})
|
||||||
Base.precompile(Tuple{typeof(get_minor_ticks),Subplot{GRBackend},Axis,Tuple{Vector{Int64}, Vector{String}}})
|
Base.precompile(Tuple{typeof(get_minor_ticks),Subplot{GRBackend},Axis,Tuple{Vector{Int64}, Vector{String}}})
|
||||||
Base.precompile(Tuple{typeof(get_series_color),SubArray{Symbol, 1, Vector{Symbol}, Tuple{UnitRange{Int64}}, true},Subplot{GRBackend},Int64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(get_series_color),Vector{Symbol},Subplot{GRBackend},Int64,Symbol})
|
Base.precompile(Tuple{typeof(get_series_color),Vector{Symbol},Subplot{GRBackend},Int64,Symbol})
|
||||||
Base.precompile(Tuple{typeof(get_series_color),Vector{Symbol},Subplot{PlotlyBackend},Int64,Symbol})
|
Base.precompile(Tuple{typeof(get_series_color),Vector{Symbol},Subplot{PlotlyBackend},Int64,Symbol})
|
||||||
Base.precompile(Tuple{typeof(get_ticks),StepRange{Int64, Int64},Vector{Float64},Vector{Any},Tuple{Int64, Int64},Vararg{Any, N} where N})
|
Base.precompile(Tuple{typeof(get_ticks),StepRange{Int64, Int64},Vector{Float64},Vector{Any},Tuple{Int64, Int64},Vararg{Any, N} where N})
|
||||||
@ -290,44 +288,43 @@ function _precompile_()
|
|||||||
Base.precompile(Tuple{typeof(gr_add_legend),Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), NTuple{9, Float64}},Vector{Float64}})
|
Base.precompile(Tuple{typeof(gr_add_legend),Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), NTuple{9, Float64}},Vector{Float64}})
|
||||||
Base.precompile(Tuple{typeof(gr_add_legend),Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), Tuple{Int64, Int64, Int64, Float64, Int64, Float64, Float64, Float64, Float64}},Vector{Float64}})
|
Base.precompile(Tuple{typeof(gr_add_legend),Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), Tuple{Int64, Int64, Int64, Float64, Int64, Float64, Float64, Float64, Float64}},Vector{Float64}})
|
||||||
Base.precompile(Tuple{typeof(gr_display),Subplot{GRBackend},AbsoluteLength,AbsoluteLength,Vector{Float64}})
|
Base.precompile(Tuple{typeof(gr_display),Subplot{GRBackend},AbsoluteLength,AbsoluteLength,Vector{Float64}})
|
||||||
|
Base.precompile(Tuple{typeof(gr_draw_colorbar),GRColorbar,Subplot{GRBackend},Tuple{Float64, Float64},Vector{Float64}})
|
||||||
Base.precompile(Tuple{typeof(gr_draw_contour),Series,StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Matrix{Float64},Tuple{Float64, Float64}})
|
Base.precompile(Tuple{typeof(gr_draw_contour),Series,StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Matrix{Float64},Tuple{Float64, Float64}})
|
||||||
Base.precompile(Tuple{typeof(gr_draw_heatmap),Series,Vector{Float64},Vector{Float64},Matrix{Float64},Tuple{Float64, Float64}})
|
Base.precompile(Tuple{typeof(gr_draw_heatmap),Series,Vector{Float64},Vector{Float64},Matrix{Float64},Tuple{Float64, Float64}})
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Float64,Float64,Tuple{Float64, Float64},Int64,Float64,Float64,Symbol})
|
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Float64,Float64,Tuple{Float64, Float64},Int64,Float64,Float64,Symbol})
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Float64,Float64,Tuple{Float64, Float64},Int64,Int64,Int64,Shape{Float64, Float64}})
|
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Float64,Float64,Tuple{Float64, Float64},Int64,Int64,Int64,Shape{Float64, Float64}})
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Float64,Float64,Tuple{Float64, Float64},Int64,Int64,Int64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Int64,Float64,Tuple{Float64, Float64},Int64,Float64,Int64,Symbol})
|
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Int64,Float64,Tuple{Float64, Float64},Int64,Float64,Int64,Symbol})
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Int64,Float64,Tuple{Float64, Float64},Int64,Int64,Int64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Int64,Int64,Tuple{Float64, Float64},Int64,Int64,Int64,Symbol})
|
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Int64,Int64,Tuple{Float64, Float64},Int64,Int64,Int64,Symbol})
|
||||||
Base.precompile(Tuple{typeof(gr_draw_markers),Series,Base.OneTo{Int64},Vector{Float64},Tuple{Float64, Float64}})
|
Base.precompile(Tuple{typeof(gr_draw_markers),Series,Base.OneTo{Int64},Vector{Float64},Tuple{Float64, Float64}})
|
||||||
Base.precompile(Tuple{typeof(gr_draw_markers),Series,StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Vector{Float64},Tuple{Float64, Float64}})
|
Base.precompile(Tuple{typeof(gr_draw_markers),Series,StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Vector{Float64},Tuple{Float64, Float64}})
|
||||||
|
Base.precompile(Tuple{typeof(gr_draw_markers),Series,UnitRange{Int64},Vector{Float64},Tuple{Float64, Float64}})
|
||||||
|
Base.precompile(Tuple{typeof(gr_draw_markers),Series,Vector{Int64},Vector{Float64},Tuple{Float64, Float64}})
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Base.OneTo{Int64},UnitRange{Int64},Tuple{Vector{Float64}, Vector{Float64}},Tuple{Float64, Float64}})
|
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Base.OneTo{Int64},UnitRange{Int64},Tuple{Vector{Float64}, Vector{Float64}},Tuple{Float64, Float64}})
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Base.OneTo{Int64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Base.OneTo{Int64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,StepRange{Int64, Int64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
Base.precompile(Tuple{typeof(gr_draw_segments),Series,StepRange{Int64, Int64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,UnitRange{Int64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,UnitRange{Int64},Vector{Float64},Vector{Int64},Tuple{Float64, Float64}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Vector{Float64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Vector{Float64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
||||||
|
Base.precompile(Tuple{typeof(gr_draw_shapes),Series,Tuple{Float64, Float64}})
|
||||||
Base.precompile(Tuple{typeof(gr_draw_surface),Series,Vector{Float64},Vector{Float64},Matrix{Float64},Tuple{Float64, Float64}})
|
Base.precompile(Tuple{typeof(gr_draw_surface),Series,Vector{Float64},Vector{Float64},Matrix{Float64},Tuple{Float64, Float64}})
|
||||||
Base.precompile(Tuple{typeof(gr_draw_surface),Series,Vector{Float64},Vector{Float64},Vector{Float64},Tuple{Float64, Float64}})
|
Base.precompile(Tuple{typeof(gr_draw_surface),Series,Vector{Float64},Vector{Float64},Vector{Float64},Tuple{Float64, Float64}})
|
||||||
Base.precompile(Tuple{typeof(gr_fill_viewport),Vector{Float64},RGBA{Float64}})
|
Base.precompile(Tuple{typeof(gr_fill_viewport),Vector{Float64},RGBA{Float64}})
|
||||||
Base.precompile(Tuple{typeof(gr_get_3d_axis_angle),Vector{Float64},Float64,Float64,Symbol})
|
|
||||||
Base.precompile(Tuple{typeof(gr_get_ticks_size),Tuple{Vector{Float64}, Vector{String}},Int64})
|
Base.precompile(Tuple{typeof(gr_get_ticks_size),Tuple{Vector{Float64}, Vector{String}},Int64})
|
||||||
|
Base.precompile(Tuple{typeof(gr_get_ticks_size),Tuple{Vector{Int64}, Vector{String}},Int64})
|
||||||
Base.precompile(Tuple{typeof(gr_label_ticks),Subplot{GRBackend},Symbol,Tuple{Vector{Float64}, Vector{String}}})
|
Base.precompile(Tuple{typeof(gr_label_ticks),Subplot{GRBackend},Symbol,Tuple{Vector{Float64}, Vector{String}}})
|
||||||
Base.precompile(Tuple{typeof(gr_label_ticks),Subplot{GRBackend},Symbol,Tuple{Vector{Int64}, Vector{String}}})
|
|
||||||
Base.precompile(Tuple{typeof(gr_label_ticks_3d),Subplot{GRBackend},Symbol,Tuple{Vector{Float64}, Vector{String}}})
|
Base.precompile(Tuple{typeof(gr_label_ticks_3d),Subplot{GRBackend},Symbol,Tuple{Vector{Float64}, Vector{String}}})
|
||||||
Base.precompile(Tuple{typeof(gr_polaraxes),Int64,Float64,Subplot{GRBackend}})
|
Base.precompile(Tuple{typeof(gr_polaraxes),Int64,Float64,Subplot{GRBackend}})
|
||||||
Base.precompile(Tuple{typeof(gr_polyline),Vector{Float64},Vector{Float64},Function})
|
Base.precompile(Tuple{typeof(gr_polyline),Vector{Float64},Vector{Float64},Function})
|
||||||
Base.precompile(Tuple{typeof(gr_set_gradient),PlotUtils.ContinuousColorGradient})
|
Base.precompile(Tuple{typeof(gr_set_gradient),PlotUtils.ContinuousColorGradient})
|
||||||
Base.precompile(Tuple{typeof(gr_text),Float64,Float64,String})
|
|
||||||
Base.precompile(Tuple{typeof(gr_text_size),String})
|
|
||||||
Base.precompile(Tuple{typeof(gr_update_viewport_legend!),Vector{Float64},Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), NTuple{9, Float64}}})
|
Base.precompile(Tuple{typeof(gr_update_viewport_legend!),Vector{Float64},Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), NTuple{9, Float64}}})
|
||||||
Base.precompile(Tuple{typeof(gr_update_viewport_legend!),Vector{Float64},Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), Tuple{Int64, Int64, Int64, Float64, Int64, Float64, Float64, Float64, Float64}}})
|
Base.precompile(Tuple{typeof(gr_update_viewport_legend!),Vector{Float64},Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), Tuple{Int64, Int64, Int64, Float64, Int64, Float64, Float64, Float64, Float64}}})
|
||||||
Base.precompile(Tuple{typeof(gr_viewport_from_bbox),Subplot{GRBackend},BoundingBox{Tuple{AbsoluteLength, AbsoluteLength}, Tuple{AbsoluteLength, AbsoluteLength}},AbsoluteLength,AbsoluteLength,Vector{Float64}})
|
Base.precompile(Tuple{typeof(gr_viewport_from_bbox),Subplot{GRBackend},BoundingBox{Tuple{AbsoluteLength, AbsoluteLength}, Tuple{AbsoluteLength, AbsoluteLength}},AbsoluteLength,AbsoluteLength,Vector{Float64}})
|
||||||
|
Base.precompile(Tuple{typeof(heatmap_edges),Base.OneTo{Int64},Symbol})
|
||||||
|
Base.precompile(Tuple{typeof(heatmap_edges),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Symbol,StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Symbol,Tuple{Int64, Int64},Bool})
|
||||||
Base.precompile(Tuple{typeof(heatmap_edges),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Symbol})
|
Base.precompile(Tuple{typeof(heatmap_edges),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Symbol})
|
||||||
Base.precompile(Tuple{typeof(heatmap_edges),UnitRange{Int64},Symbol})
|
Base.precompile(Tuple{typeof(heatmap_edges),UnitRange{Int64},Symbol})
|
||||||
|
Base.precompile(Tuple{typeof(heatmap_edges),Vector{Float64},Symbol,UnitRange{Int64},Symbol,Tuple{Int64, Int64},Bool})
|
||||||
|
Base.precompile(Tuple{typeof(heatmap_edges),Vector{Float64},Symbol,Vector{Float64},Symbol,Tuple{Int64, Int64},Bool})
|
||||||
Base.precompile(Tuple{typeof(heatmap_edges),Vector{Float64},Symbol})
|
Base.precompile(Tuple{typeof(heatmap_edges),Vector{Float64},Symbol})
|
||||||
Base.precompile(Tuple{typeof(ignorenan_minimum),Vector{Int64}})
|
Base.precompile(Tuple{typeof(ignorenan_minimum),Vector{Int64}})
|
||||||
Base.precompile(Tuple{typeof(layout_args),NamedTuple{(:label, :blank), Tuple{Symbol, Bool}}})
|
|
||||||
Base.precompile(Tuple{typeof(layout_args),NamedTuple{(:label, :width, :height), Tuple{Symbol, Symbol, Float64}}})
|
|
||||||
Base.precompile(Tuple{typeof(make_fillrange_side),UnitRange{Int64},LinRange{Float64}})
|
Base.precompile(Tuple{typeof(make_fillrange_side),UnitRange{Int64},LinRange{Float64}})
|
||||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Float64, Float64},Symbol,Function})
|
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Float64, Float64},Symbol,Function})
|
||||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Float64, Float64},Symbol,Symbol})
|
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Float64, Float64},Symbol,Symbol})
|
||||||
@ -336,12 +333,10 @@ function _precompile_()
|
|||||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),StepRange{Int64, Int64},Tuple{Int64, Int64},Symbol,Symbol})
|
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),StepRange{Int64, Int64},Tuple{Int64, Int64},Symbol,Symbol})
|
||||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),UnitRange{Int64},Tuple{Float64, Float64},Symbol,Symbol})
|
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),UnitRange{Int64},Tuple{Float64, Float64},Symbol,Symbol})
|
||||||
Base.precompile(Tuple{typeof(partialcircle),Int64,Float64,Int64})
|
Base.precompile(Tuple{typeof(partialcircle),Int64,Float64,Int64})
|
||||||
Base.precompile(Tuple{typeof(plot!),Any})
|
|
||||||
Base.precompile(Tuple{typeof(plot!),Plot,Plot,Plot,Vararg{Plot, N} where N})
|
|
||||||
Base.precompile(Tuple{typeof(plot),Any,Any})
|
Base.precompile(Tuple{typeof(plot),Any,Any})
|
||||||
|
Base.precompile(Tuple{typeof(plot),Any})
|
||||||
Base.precompile(Tuple{typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
Base.precompile(Tuple{typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
||||||
Base.precompile(Tuple{typeof(plot),Plot{GRBackend},Plot{GRBackend}})
|
Base.precompile(Tuple{typeof(plot),Plot{GRBackend},Plot{GRBackend}})
|
||||||
Base.precompile(Tuple{typeof(plot),Plot{GRBackend}})
|
|
||||||
Base.precompile(Tuple{typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}, N} where N})
|
Base.precompile(Tuple{typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}, N} where N})
|
||||||
Base.precompile(Tuple{typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
Base.precompile(Tuple{typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
||||||
Base.precompile(Tuple{typeof(processGridArg!),Dict{Symbol, Any},Symbol,Symbol})
|
Base.precompile(Tuple{typeof(processGridArg!),Dict{Symbol, Any},Symbol,Symbol})
|
||||||
@ -350,7 +345,9 @@ function _precompile_()
|
|||||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Matrix{Symbol}})
|
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Matrix{Symbol}})
|
||||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},RGBA{Float64}})
|
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},RGBA{Float64}})
|
||||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Shape{Float64, Float64}})
|
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Shape{Float64, Float64}})
|
||||||
|
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Stroke})
|
||||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Symbol})
|
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Symbol})
|
||||||
|
Base.precompile(Tuple{typeof(processMinorGridArg!),Dict{Symbol, Any},Bool,Symbol})
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,PlotText})
|
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,PlotText})
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,Tuple{String, Int64, Symbol, Symbol}})
|
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,Tuple{String, Int64, Symbol, Symbol}})
|
||||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,Tuple{String, Symbol, Int64, String}})
|
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,Tuple{String, Symbol, Int64, String}})
|
||||||
@ -360,7 +357,8 @@ function _precompile_()
|
|||||||
Base.precompile(Tuple{typeof(process_axis_arg!),Dict{Symbol, Any},StepRange{Int64, Int64},Symbol})
|
Base.precompile(Tuple{typeof(process_axis_arg!),Dict{Symbol, Any},StepRange{Int64, Int64},Symbol})
|
||||||
Base.precompile(Tuple{typeof(process_axis_arg!),Dict{Symbol, Any},Symbol,Symbol})
|
Base.precompile(Tuple{typeof(process_axis_arg!),Dict{Symbol, Any},Symbol,Symbol})
|
||||||
Base.precompile(Tuple{typeof(push!),Plot{GRBackend},Float64,Vector{Float64}})
|
Base.precompile(Tuple{typeof(push!),Plot{GRBackend},Float64,Vector{Float64}})
|
||||||
Base.precompile(Tuple{typeof(push!),Segments{Tuple{Float64, Float64, Float64}},Tuple{Int64, Int64, Float64},Tuple{Int64, Int64, Float64}})
|
Base.precompile(Tuple{typeof(push!),Segments{Tuple{Float64, Float64, Float64}},Tuple{Float64, Float64, Float64},Tuple{Float64, Float64, Float64}})
|
||||||
|
Base.precompile(Tuple{typeof(push!),Segments{Tuple{Float64, Float64, Float64}},Tuple{Int64, Float64, Int64},Tuple{Int64, Float64, Int64}})
|
||||||
Base.precompile(Tuple{typeof(resetfontsizes)})
|
Base.precompile(Tuple{typeof(resetfontsizes)})
|
||||||
Base.precompile(Tuple{typeof(scalefontsizes),Float64})
|
Base.precompile(Tuple{typeof(scalefontsizes),Float64})
|
||||||
Base.precompile(Tuple{typeof(series_annotations),Vector{Any}})
|
Base.precompile(Tuple{typeof(series_annotations),Vector{Any}})
|
||||||
@ -368,84 +366,53 @@ function _precompile_()
|
|||||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{AbsoluteLength},Int64})
|
Base.precompile(Tuple{typeof(slice_arg),Matrix{AbsoluteLength},Int64})
|
||||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{Bool},Int64})
|
Base.precompile(Tuple{typeof(slice_arg),Matrix{Bool},Int64})
|
||||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{Int64},Int64})
|
Base.precompile(Tuple{typeof(slice_arg),Matrix{Int64},Int64})
|
||||||
|
Base.precompile(Tuple{typeof(slice_arg),Matrix{PlotUtils.ContinuousColorGradient},Int64})
|
||||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{RGBA{Float64}},Int64})
|
Base.precompile(Tuple{typeof(slice_arg),Matrix{RGBA{Float64}},Int64})
|
||||||
|
Base.precompile(Tuple{typeof(slice_arg),Matrix{String},Int64})
|
||||||
|
Base.precompile(Tuple{typeof(slice_arg),Matrix{Symbol},Int64})
|
||||||
Base.precompile(Tuple{typeof(spy),Any})
|
Base.precompile(Tuple{typeof(spy),Any})
|
||||||
Base.precompile(Tuple{typeof(straightline_data),Tuple{Float64, Float64},Tuple{Float64, Float64},Vector{Float64},Vector{Float64},Int64})
|
Base.precompile(Tuple{typeof(straightline_data),Tuple{Float64, Float64},Tuple{Float64, Float64},Vector{Float64},Vector{Float64},Int64})
|
||||||
Base.precompile(Tuple{typeof(stroke),Int64,Vararg{Any, N} where N})
|
Base.precompile(Tuple{typeof(stroke),Int64,Vararg{Any, N} where N})
|
||||||
Base.precompile(Tuple{typeof(title!),AbstractString})
|
Base.precompile(Tuple{typeof(title!),AbstractString})
|
||||||
|
Base.precompile(Tuple{typeof(unzip),Vector{GeometryBasics.Point2{Float64}}})
|
||||||
Base.precompile(Tuple{typeof(vline!),Any})
|
Base.precompile(Tuple{typeof(vline!),Any})
|
||||||
Base.precompile(Tuple{typeof(warn_on_attr_dim_mismatch),Series,Vector{Float64},Vector{Float64},Nothing,Base.Iterators.Flatten{Vector{Tuple{SeriesSegment}}}})
|
|
||||||
Base.precompile(Tuple{typeof(xgrid!),Plot{GRBackend},Symbol,Vararg{Any, N} where N})
|
Base.precompile(Tuple{typeof(xgrid!),Plot{GRBackend},Symbol,Vararg{Any, N} where N})
|
||||||
Base.precompile(Tuple{typeof(xlims),Subplot{PlotlyBackend}})
|
Base.precompile(Tuple{typeof(xlims),Subplot{PlotlyBackend}})
|
||||||
isdefined(Plots, Symbol("#166#167")) && Base.precompile(Tuple{getfield(Plots, Symbol("#166#167")),Any})
|
isdefined(Plots, Symbol("#add_major_or_minor_segments#120")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#120")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64}},Float64,Bool})
|
||||||
isdefined(Plots, Symbol("#2#6")) && Base.precompile(Tuple{getfield(Plots, Symbol("#2#6")),UnitRange{Int64}})
|
isdefined(Plots, Symbol("#add_major_or_minor_segments#121")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#121")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64, Float64}},Float64,Bool})
|
||||||
isdefined(Plots, Symbol("#295#331")) && Base.precompile(Tuple{getfield(Plots, Symbol("#295#331"))})
|
|
||||||
isdefined(Plots, Symbol("#316#352")) && Base.precompile(Tuple{getfield(Plots, Symbol("#316#352"))})
|
|
||||||
isdefined(Plots, Symbol("#add_major_or_minor_segments#100")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#100")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64}},Float64,Bool})
|
|
||||||
isdefined(Plots, Symbol("#add_major_or_minor_segments#101")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#101")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64, Float64}},Float64,Bool})
|
|
||||||
let fbody = try __lookup_kwbody__(which(font, (Font,Vararg{Any, N} where N,))) catch missing end
|
let fbody = try __lookup_kwbody__(which(font, (Font,Vararg{Any, N} where N,))) catch missing end
|
||||||
if !ismissing(fbody)
|
if !ismissing(fbody)
|
||||||
precompile(fbody, (Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}},typeof(font),Font,Vararg{Any, N} where N,))
|
precompile(fbody, (Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}},typeof(font),Font,Vararg{Any, N} where N,))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(gr_polyline, (Vector{Float64},Vector{Float64},typeof(GR.fillarea),))) catch missing end
|
let fbody = try __lookup_kwbody__(which(gr_polyline, (Vector{Float64},Vector{Float64},typeof(GR.fillarea),))) catch missing end
|
||||||
if !ismissing(fbody)
|
if !ismissing(fbody)
|
||||||
precompile(fbody, (Symbol,Symbol,typeof(gr_polyline),Vector{Float64},Vector{Float64},typeof(GR.fillarea),))
|
precompile(fbody, (Symbol,Symbol,typeof(gr_polyline),Vector{Float64},Vector{Float64},typeof(GR.fillarea),))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(gr_set_font, (Font,Subplot{GRBackend},))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Symbol,Symbol,RGBA{Float64},Float64,typeof(gr_set_font),Font,Subplot{GRBackend},))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(plot!, (Any,))) catch missing end
|
let fbody = try __lookup_kwbody__(which(plot!, (Any,))) catch missing end
|
||||||
if !ismissing(fbody)
|
if !ismissing(fbody)
|
||||||
precompile(fbody, (Any,typeof(plot!),Any,))
|
precompile(fbody, (Any,typeof(plot!),Any,))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(plot!, (Any,Vararg{Any, N} where N,))) catch missing end
|
let fbody = try __lookup_kwbody__(which(plot!, (Any,Vararg{Any, N} where N,))) catch missing end
|
||||||
if !ismissing(fbody)
|
if !ismissing(fbody)
|
||||||
precompile(fbody, (Any,typeof(plot!),Any,Vararg{Any, N} where N,))
|
precompile(fbody, (Any,typeof(plot!),Any,Vararg{Any, N} where N,))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(plot!, (Plot,))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Any,typeof(plot!),Plot,))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(plot!, (Plot,Plot,))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Any,typeof(plot!),Plot,Plot,))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(plot!, (Plot,Plot,Plot,))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Any,typeof(plot!),Plot,Plot,Plot,))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(plot!, (Plot,Plot,Plot,Vararg{Plot, N} where N,))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Any,typeof(plot!),Plot,Plot,Plot,Vararg{Plot, N} where N,))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(plot, (Any,))) catch missing end
|
let fbody = try __lookup_kwbody__(which(plot, (Any,))) catch missing end
|
||||||
if !ismissing(fbody)
|
if !ismissing(fbody)
|
||||||
precompile(fbody, (Any,typeof(plot),Any,))
|
precompile(fbody, (Any,typeof(plot),Any,))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(plot, (Any,Vararg{Any, N} where N,))) catch missing end
|
let fbody = try __lookup_kwbody__(which(plot, (Any,Vararg{Any, N} where N,))) catch missing end
|
||||||
if !ismissing(fbody)
|
if !ismissing(fbody)
|
||||||
precompile(fbody, (Any,typeof(plot),Any,Vararg{Any, N} where N,))
|
precompile(fbody, (Any,typeof(plot),Any,Vararg{Any, N} where N,))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(scatter, (Any,Vararg{Any, N} where N,))) catch missing end
|
|
||||||
if !ismissing(fbody)
|
|
||||||
precompile(fbody, (Any,typeof(scatter),Any,Vararg{Any, N} where N,))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
let fbody = try __lookup_kwbody__(which(title!, (AbstractString,))) catch missing end
|
let fbody = try __lookup_kwbody__(which(title!, (AbstractString,))) catch missing end
|
||||||
if !ismissing(fbody)
|
if !ismissing(fbody)
|
||||||
precompile(fbody, (Any,typeof(title!),AbstractString,))
|
precompile(fbody, (Any,typeof(title!),AbstractString,))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
6
deps/SnoopCompile/snoop_bench.jl
vendored
6
deps/SnoopCompile/snoop_bench.jl
vendored
@ -1,6 +1,8 @@
|
|||||||
include("snoop_bot_config.jl")
|
using CompileBot
|
||||||
|
|
||||||
snoop_bench(
|
snoop_bench(
|
||||||
botconfig,
|
BotConfig(
|
||||||
|
"Plots",
|
||||||
|
),
|
||||||
joinpath(@__DIR__, "precompile_script.jl"),
|
joinpath(@__DIR__, "precompile_script.jl"),
|
||||||
)
|
)
|
||||||
|
|||||||
6
deps/SnoopCompile/snoop_bot.jl
vendored
6
deps/SnoopCompile/snoop_bot.jl
vendored
@ -1,6 +1,8 @@
|
|||||||
include("snoop_bot_config.jl")
|
using CompileBot
|
||||||
|
|
||||||
snoop_bot(
|
snoop_bot(
|
||||||
botconfig,
|
BotConfig(
|
||||||
|
"Plots",
|
||||||
|
),
|
||||||
joinpath(@__DIR__, "precompile_script.jl"),
|
joinpath(@__DIR__, "precompile_script.jl"),
|
||||||
)
|
)
|
||||||
|
|||||||
7
deps/SnoopCompile/snoop_bot_config.jl
vendored
7
deps/SnoopCompile/snoop_bot_config.jl
vendored
@ -1,7 +0,0 @@
|
|||||||
using CompileBot
|
|
||||||
|
|
||||||
botconfig = BotConfig(
|
|
||||||
"Plots",
|
|
||||||
version = ["1.6", "1.7", "1.8", "nightly"], # <<< keep these versions in sync with .github/workflows/SnoopCompile.yml
|
|
||||||
# else_version = "nightly",
|
|
||||||
)
|
|
||||||
50
src/Plots.jl
50
src/Plots.jl
@ -1,52 +1,37 @@
|
|||||||
module Plots
|
module Plots
|
||||||
|
|
||||||
using Pkg
|
|
||||||
|
|
||||||
if isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("@optlevel"))
|
if isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("@optlevel"))
|
||||||
@eval Base.Experimental.@optlevel 1
|
@eval Base.Experimental.@optlevel 1
|
||||||
end
|
end
|
||||||
if isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("@max_methods"))
|
|
||||||
@eval Base.Experimental.@max_methods 1
|
|
||||||
end
|
|
||||||
|
|
||||||
const _plots_project = Pkg.Types.read_project(normpath(@__DIR__, "..", "Project.toml"))
|
const _current_plots_version = VersionNumber(
|
||||||
const _current_plots_version = _plots_project.version
|
split(
|
||||||
const _plots_compats = _plots_project.compat
|
first(
|
||||||
function _check_compat(sim::Module)
|
filter(
|
||||||
sim_str = string(sim)
|
line -> occursin("version", line),
|
||||||
if !haskey(_plots_compats, sim_str)
|
readlines(normpath(@__DIR__, "..", "Project.toml")),
|
||||||
return nothing
|
),
|
||||||
end
|
),
|
||||||
be_v = Pkg.Types.read_project(joinpath(Base.pkgdir(sim), "Project.toml")).version
|
"\"",
|
||||||
be_c = _plots_compats[sim_str]
|
)[2],
|
||||||
if be_c isa String # julia 1.6
|
)
|
||||||
if !(be_v in Pkg.Types.semver_spec(be_c))
|
|
||||||
@warn "$sim $be_v is not compatible with this version of Plots. The declared compatibility is $(be_c)."
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if isempty(intersect(be_v, be_c.val))
|
|
||||||
@warn "$sim $be_v is not compatible with this version of Plots. The declared compatibility is $(be_c.str)."
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
using Reexport
|
using Reexport
|
||||||
|
|
||||||
import GeometryBasics
|
import GeometryBasics
|
||||||
using Dates, Printf, Statistics, Base64, LinearAlgebra, Random, Unzip
|
using Dates, Printf, Statistics, Base64, LinearAlgebra, Random
|
||||||
using SparseArrays
|
using SparseArrays
|
||||||
|
|
||||||
using FFMPEG
|
using FFMPEG
|
||||||
|
|
||||||
@reexport using RecipesBase
|
@reexport using RecipesBase
|
||||||
import RecipesBase: plot, plot!, animate, is_explicit, grid
|
import RecipesBase: plot, plot!, animate, is_explicit
|
||||||
using Base.Meta
|
using Base.Meta
|
||||||
@reexport using PlotUtils
|
@reexport using PlotUtils
|
||||||
@reexport using PlotThemes
|
@reexport using PlotThemes
|
||||||
import UnicodeFun
|
import Showoff
|
||||||
import StatsBase
|
import StatsBase
|
||||||
import Downloads
|
import Downloads
|
||||||
import Showoff
|
|
||||||
import JSON
|
import JSON
|
||||||
|
|
||||||
using Requires
|
using Requires
|
||||||
@ -56,6 +41,7 @@ export
|
|||||||
grid,
|
grid,
|
||||||
bbox,
|
bbox,
|
||||||
plotarea,
|
plotarea,
|
||||||
|
@layout,
|
||||||
KW,
|
KW,
|
||||||
|
|
||||||
wrap,
|
wrap,
|
||||||
@ -180,8 +166,6 @@ const BBox = Measures.Absolute2DBox
|
|||||||
const px = AbsoluteLength(0.254)
|
const px = AbsoluteLength(0.254)
|
||||||
const pct = Length{:pct,Float64}(1.0)
|
const pct = Length{:pct,Float64}(1.0)
|
||||||
|
|
||||||
Base.convert(::Type{<:Measure}, x::Float64) = x * pct
|
|
||||||
|
|
||||||
Base.:*(m1::AbsoluteLength, m2::Length{:pct}) = AbsoluteLength(m1.value * m2.value)
|
Base.:*(m1::AbsoluteLength, m2::Length{:pct}) = AbsoluteLength(m1.value * m2.value)
|
||||||
Base.:*(m1::Length{:pct}, m2::AbsoluteLength) = AbsoluteLength(m2.value * m1.value)
|
Base.:*(m1::Length{:pct}, m2::AbsoluteLength) = AbsoluteLength(m2.value * m1.value)
|
||||||
Base.:/(m1::AbsoluteLength, m2::Length{:pct}) = AbsoluteLength(m1.value / m2.value)
|
Base.:/(m1::AbsoluteLength, m2::Length{:pct}) = AbsoluteLength(m1.value / m2.value)
|
||||||
@ -210,13 +194,14 @@ import RecipesPipeline:
|
|||||||
pop_kw!,
|
pop_kw!,
|
||||||
scale_func,
|
scale_func,
|
||||||
inverse_scale_func,
|
inverse_scale_func,
|
||||||
|
unzip,
|
||||||
dateformatter,
|
dateformatter,
|
||||||
datetimeformatter,
|
datetimeformatter,
|
||||||
timeformatter
|
timeformatter
|
||||||
|
|
||||||
# Use fixed version of Plotly instead of the latest one for stable dependency
|
# Use fixed version of Plotly instead of the latest one for stable dependency
|
||||||
# Ref: https://github.com/JuliaPlots/Plots.jl/pull/2779
|
# Ref: https://github.com/JuliaPlots/Plots.jl/pull/2779
|
||||||
const _plotly_min_js_filename = "plotly-2.6.3.min.js"
|
const _plotly_min_js_filename = "plotly-1.57.1.min.js"
|
||||||
|
|
||||||
include("types.jl")
|
include("types.jl")
|
||||||
include("utils.jl")
|
include("utils.jl")
|
||||||
@ -224,7 +209,6 @@ include("colorbars.jl")
|
|||||||
include("axes.jl")
|
include("axes.jl")
|
||||||
include("args.jl")
|
include("args.jl")
|
||||||
include("components.jl")
|
include("components.jl")
|
||||||
include("consts.jl")
|
|
||||||
include("themes.jl")
|
include("themes.jl")
|
||||||
include("plot.jl")
|
include("plot.jl")
|
||||||
include("pipeline.jl")
|
include("pipeline.jl")
|
||||||
|
|||||||
118
src/arg_desc.jl
118
src/arg_desc.jl
@ -32,8 +32,7 @@ const _arg_desc = KW(
|
|||||||
:line_z => "AbstractVector, Function `f(x,y,z) -> z_value`, or Function `f(x,y) -> z_value`, or nothing. z-values for each series line segment, which correspond to the color to be used from a linecolor gradient. Note that for N points, only the first N-1 values are used (one per line-segment).",
|
:line_z => "AbstractVector, Function `f(x,y,z) -> z_value`, or Function `f(x,y) -> z_value`, or nothing. z-values for each series line segment, which correspond to the color to be used from a linecolor gradient. Note that for N points, only the first N-1 values are used (one per line-segment).",
|
||||||
:fill_z => "Matrix{Float64} of the same size as z matrix, which specifies the color of the 3D surface; the default value is `nothing`.",
|
:fill_z => "Matrix{Float64} of the same size as z matrix, which specifies the color of the 3D surface; the default value is `nothing`.",
|
||||||
:levels => "Integer (number of contours) or AbstractVector (contour values). Determines contour levels for a contour type.",
|
:levels => "Integer (number of contours) or AbstractVector (contour values). Determines contour levels for a contour type.",
|
||||||
:permute => "Tuple{Symbol,Symbol}. Permutes data and axis properties of the axes given in the tuple. E.g. (:x, :y).",
|
:orientation => "Symbol. Horizontal or vertical orientation for bar types. Values `:h`, `:hor`, `:horizontal` correspond to horizontal (sideways, anchored to y-axis), and `:v`, `:vert`, and `:vertical` correspond to vertical (the default).",
|
||||||
:orientation => "Symbol. (deprecated) Horizontal or vertical orientation for bar types. Values `:h`, `:hor`, `:horizontal` correspond to horizontal (sideways, anchored to y-axis), and `:v`, `:vert`, and `:vertical` correspond to vertical (the default).",
|
|
||||||
:bar_position => "Symbol. Choose from `:overlay` (default), `:stack`. (warning: May not be implemented fully)",
|
:bar_position => "Symbol. Choose from `:overlay` (default), `:stack`. (warning: May not be implemented fully)",
|
||||||
:bar_width => "nothing or Number. Width of bars in data coordinates. When nothing, chooses based on x (or y when `orientation = :h`).",
|
:bar_width => "nothing or Number. Width of bars in data coordinates. When nothing, chooses based on x (or y when `orientation = :h`).",
|
||||||
:bar_edges => "Bool. Align bars to edges (true), or centers (the default)?",
|
:bar_edges => "Bool. Align bars to edges (true), or centers (the default)?",
|
||||||
@ -53,7 +52,6 @@ const _arg_desc = KW(
|
|||||||
:primary => "Bool. Does this count as a 'real series'? For example, you could have a path (primary), and a scatter (secondary) as 2 separate series, maybe with different data (see sticks recipe for an example). The secondary series will get the same color, etc as the primary.",
|
:primary => "Bool. Does this count as a 'real series'? For example, you could have a path (primary), and a scatter (secondary) as 2 separate series, maybe with different data (see sticks recipe for an example). The secondary series will get the same color, etc as the primary.",
|
||||||
:hover => "nothing or vector of strings. Text to display when hovering over each data point.",
|
:hover => "nothing or vector of strings. Text to display when hovering over each data point.",
|
||||||
:colorbar_entry => "Bool. Include this series in the color bar? Set to `false` to exclude.",
|
:colorbar_entry => "Bool. Include this series in the color bar? Set to `false` to exclude.",
|
||||||
:z_order => "Symbol or Integer. :front (default), :back or index of position where 1 is farest in the background.",
|
|
||||||
|
|
||||||
# plot args
|
# plot args
|
||||||
:plot_title => "String. Title for the whole plot (not the subplots)",
|
:plot_title => "String. Title for the whole plot (not the subplots)",
|
||||||
@ -79,66 +77,64 @@ const _arg_desc = KW(
|
|||||||
:warn_on_unsupported => "Bool. Warn on unsupported attributes, series types and marker shapes",
|
:warn_on_unsupported => "Bool. Warn on unsupported attributes, series types and marker shapes",
|
||||||
|
|
||||||
# subplot args
|
# subplot args
|
||||||
:title => "String. Subplot title.",
|
:title => "String. Subplot title.",
|
||||||
:titlelocation => "Symbol. Position of subplot title. Values: `:left`, `:center`, `:right`",
|
:titlelocation => "Symbol. Position of subplot title. Values: `:left`, `:center`, `:right`",
|
||||||
:titlefontfamily => "String or Symbol. Font family of subplot title.",
|
:titlefontfamily => "String or Symbol. Font family of subplot title.",
|
||||||
:titlefontsize => "Integer. Font pointsize of subplot title.",
|
:titlefontsize => "Integer. Font pointsize of subplot title.",
|
||||||
:titlefonthalign => "Symbol. Font horizontal alignment of subplot title: :hcenter, :left, :right or :center",
|
:titlefonthalign => "Symbol. Font horizontal alignment of subplot title: :hcenter, :left, :right or :center",
|
||||||
:titlefontvalign => "Symbol. Font vertical alignment of subplot title: :vcenter, :top, :bottom or :center",
|
:titlefontvalign => "Symbol. Font vertical alignment of subplot title: :vcenter, :top, :bottom or :center",
|
||||||
:titlefontrotation => "Real. Font rotation of subplot title",
|
:titlefontrotation => "Real. Font rotation of subplot title",
|
||||||
:titlefontcolor => "Color Type. Font color of subplot title",
|
:titlefontcolor => "Color Type. Font color of subplot title",
|
||||||
:background_color_subplot => "Color Type or `:match` (matches `:background_color`). Base background color of the subplot.",
|
:background_color_subplot => "Color Type or `:match` (matches `:background_color`). Base background color of the subplot.",
|
||||||
:legend_background_color => "Color Type or `:match` (matches `:background_color_subplot`). Background color of the legend.",
|
:background_color_legend => "Color Type or `:match` (matches `:background_color_subplot`). Background color of the legend.",
|
||||||
:background_color_inside => "Color Type or `:match` (matches `:background_color_subplot`). Background color inside the plot area (under the grid).",
|
:background_color_inside => "Color Type or `:match` (matches `:background_color_subplot`). Background color inside the plot area (under the grid).",
|
||||||
:foreground_color_subplot => "Color Type or `:match` (matches `:foreground_color`). Base foreground color of the subplot.",
|
:foreground_color_subplot => "Color Type or `:match` (matches `:foreground_color`). Base foreground color of the subplot.",
|
||||||
:legend_foreground_color => "Color Type or `:match` (matches `:foreground_color_subplot`). Foreground color of the legend.",
|
:foreground_color_legend => "Color Type or `:match` (matches `:foreground_color_subplot`). Foreground color of the legend.",
|
||||||
:foreground_color_title => "Color Type or `:match` (matches `:foreground_color_subplot`). Color of subplot title.",
|
:foreground_color_title => "Color Type or `:match` (matches `:foreground_color_subplot`). Color of subplot title.",
|
||||||
:color_palette => "Vector of colors (cycle through) or color gradient (generate list from gradient) or `:auto` (generate a color list using `Colors.distiguishable_colors` and custom seed colors chosen to contrast with the background). The color palette is a color list from which series colors are automatically chosen.",
|
:color_palette => "Vector of colors (cycle through) or color gradient (generate list from gradient) or `:auto` (generate a color list using `Colors.distiguishable_colors` and custom seed colors chosen to contrast with the background). The color palette is a color list from which series colors are automatically chosen.",
|
||||||
:legend_position => "Bool (show the legend?) or (x,y) tuple or Symbol (legend position) or angle or (angle,inout) tuple. Bottom left corner of legend is placed at (x,y). Symbol values: `:none`; `:best`; `:inline`; `:inside`; `:legend`; any valid combination of `:(outer ?)(top/bottom ?)(right/left ?)`, i.e.: `:top`, `:topright`, `:outerleft`, `:outerbottomright` ... (note: only some may be supported in each backend)",
|
:legend => "Bool (show the legend?) or (x,y) tuple or Symbol (legend position) or angle or (angle,inout) tuple. Bottom left corner of legend is placed at (x,y). Symbol values: `:none`; `:best`; `:inline`; `:inside`; `:legend`; any valid combination of `:(outer ?)(top/bottom ?)(right/left ?)`, i.e.: `:top`, `:topright`, `:outerleft`, `:outerbottomright` ... (note: only some may be supported in each backend). Legend is positioned at (angle degrees) (so (90,:outer) is roughly equivalent to :outertop), close to the inside of the axes or the outside if inout=:outer.",
|
||||||
:legend_column => "Integer. Number of columns in the legend. `-1` stands for maximum number of colums (horizontal legend).",
|
:legendfontfamily => "String or Symbol. Font family of legend entries.",
|
||||||
:legend_title_font => "Font. Font of the legend title.",
|
:legendfontsize => "Integer. Font pointsize of legend entries.",
|
||||||
:legend_font_family => "String or Symbol. Font family of legend entries.",
|
:legendfonthalign => "Symbol. Font horizontal alignment of legend entries: :hcenter, :left, :right or :center",
|
||||||
:legend_font_pointsize => "Integer. Font pointsize of legend entries.",
|
:legendfontvalign => "Symbol. Font vertical alignment of legend entries: :vcenter, :top, :bottom or :center",
|
||||||
:legend_font_halign => "Symbol. Font horizontal alignment of legend entries: :hcenter, :left, :right or :center",
|
:legendfontrotation => "Real. Font rotation of legend entries",
|
||||||
:legend_font_valign => "Symbol. Font vertical alignment of legend entries: :vcenter, :top, :bottom or :center",
|
:legendfontcolor => "Color Type. Font color of legend entries",
|
||||||
:legend_font_rotation => "Real. Font rotation of legend entries",
|
:legendtitle => "String. Legend title.",
|
||||||
:legend_font_color => "Color Type. Font color of legend entries",
|
:legendtitlefontfamily => "String or Symbol. Font family of the legend title.",
|
||||||
:legend_title => "String. Legend title.",
|
:legendtitlefontsize => "Integer. Font pointsize the legend title.",
|
||||||
:legend_title_font_family => "String or Symbol. Font family of the legend title.",
|
:legendtitlefonthalign => "Symbol. Font horizontal alignment of the legend title: :hcenter, :left, :right or :center",
|
||||||
:legend_title_font_pointsize => "Integer. Font pointsize the legend title.",
|
:legendtitlefontvalign => "Symbol. Font vertical alignment of the legend title: :vcenter, :top, :bottom or :center",
|
||||||
:legend_title_font_halign => "Symbol. Font horizontal alignment of the legend title: :hcenter, :left, :right or :center",
|
:legendtitlefontrotation => "Real. Font rotation of the legend title",
|
||||||
:legend_title_font_valign => "Symbol. Font vertical alignment of the legend title: :vcenter, :top, :bottom or :center",
|
:legendtitlefontcolor => "Color Type. Font color of the legend title",
|
||||||
:legend_title_font_rotation => "Real. Font rotation of the legend title",
|
:colorbar => "Bool (show the colorbar?) or Symbol (colorbar position). Symbol values: `:none`, `:best`, `:right`, `:left`, `:top`, `:bottom`, `:legend` (matches legend value) (note: only some may be supported in each backend)",
|
||||||
:legend_title_font_color => "Color Type. Font color of the legend title",
|
:clims => "`:auto`, NTuple{2,Number}, or a function that takes series data in and returns NTuple{2,Number}. Fixes the limits of the colorbar.",
|
||||||
:colorbar => "Bool (show the colorbar?) or Symbol (colorbar position). Symbol values: `:none`, `:best`, `:right`, `:left`, `:top`, `:bottom`, `:legend` (matches legend value) (note: only some may be supported in each backend)",
|
:colorbar_fontfamily => "String or Symbol. Font family of colobar entries.",
|
||||||
:clims => "`:auto`, NTuple{2,Number}, or a function that takes series data in and returns NTuple{2,Number}. Fixes the limits of the colorbar.",
|
:colorbar_ticks => "Vector of numbers (set the tick values), Tuple of (tickvalues, ticklabels), or `:auto`",
|
||||||
:colorbar_fontfamily => "String or Symbol. Font family of colobar entries.",
|
:colorbar_tickfontfamily => "String or Symbol. Font family of colorbar tick labels.",
|
||||||
:colorbar_ticks => "Vector of numbers (set the tick values), Tuple of (tickvalues, ticklabels), or `:auto`",
|
:colorbar_tickfontsize => "Integer. Font pointsize of colorbar tick entries.",
|
||||||
:colorbar_tickfontfamily => "String or Symbol. Font family of colorbar tick labels.",
|
:colorbar_tickfontcolor => "Color Type. Font color of colorbar tick entries",
|
||||||
:colorbar_tickfontsize => "Integer. Font pointsize of colorbar tick entries.",
|
:colorbar_scale => "Symbol. Scale of the colorbar axis: `:none`, `:ln`, `:log2`, `:log10`",
|
||||||
:colorbar_tickfontcolor => "Color Type. Font color of colorbar tick entries",
|
:colorbar_formatter => "Function, :scientific, :plain or :auto. A method which converts a number to a string for tick labeling.",
|
||||||
:colorbar_scale => "Symbol. Scale of the colorbar axis: `:none`, `:ln`, `:log2`, `:log10`",
|
:legendfont => "Font. Font of legend items.",
|
||||||
:colorbar_formatter => "Function, :scientific, :plain or :auto. A method which converts a number to a string for tick labeling.",
|
:legendtitlefont => "Font. Font of the legend title.",
|
||||||
:legend_font => "Font. Font of legend items.",
|
:annotations => "(x,y,text) tuple(s). Can be a single tuple or a list of them. Text can be String, PlotText (created with `text(args...)`), or a tuple of arguments to `text` (e.g., `(\"Label\", 8, :red, :top)`). Add one-off text annotations at the x,y coordinates.",
|
||||||
:legend_titlefont => "Font. Font of the legend title.",
|
:annotationfontfamily => "String or Symbol. Font family of annotations.",
|
||||||
:annotations => "(x,y,text) tuple(s). Can be a single tuple or a list of them. Text can be String, PlotText (created with `text(args...)`), or a tuple of arguments to `text` (e.g., `(\"Label\", 8, :red, :top)`). Add one-off text annotations at the x,y coordinates.",
|
:annotationfontsize => "Integer. Font pointsize of annotations.",
|
||||||
:annotationfontfamily => "String or Symbol. Font family of annotations.",
|
:annotationhalign => "Symbol. horizontal alignment of annotations, :hcenter, :left, :right or :center.",
|
||||||
:annotationfontsize => "Integer. Font pointsize of annotations.",
|
:annotationvalign => "Symbol. Vertical alignment of annotations, :vcenter, :top, :bottom or :center.",
|
||||||
:annotationhalign => "Symbol. horizontal alignment of annotations, :hcenter, :left, :right or :center.",
|
:annotationrotation => "Float. Rotation of annotations in degrees.",
|
||||||
:annotationvalign => "Symbol. Vertical alignment of annotations, :vcenter, :top, :bottom or :center.",
|
:annotationcolor => "Colorant or :match. Color of annotations.",
|
||||||
:annotationrotation => "Float. Rotation of annotations in degrees.",
|
:projection => "Symbol or String. '3d' or 'polar'",
|
||||||
:annotationcolor => "Colorant or :match. Color of annotations.",
|
:aspect_ratio => "Symbol (:equal or :none) or Number. Plot area is resized so that 1 y-unit is the same size as `aspect_ratio` x-units. With `:none`, images inherit aspect ratio of the plot area.",
|
||||||
:projection => "Symbol or String. '3d' or 'polar'",
|
:margin => "Measure (multiply by `mm`, `px`, etc). Base for individual margins... not directly used. Specifies the extra padding around subplots.",
|
||||||
:aspect_ratio => "Symbol (:equal or :none) or Number. Plot area is resized so that 1 y-unit is the same size as `aspect_ratio` x-units. With `:none`, images inherit aspect ratio of the plot area.",
|
:left_margin => "Measure (multiply by `mm`, `px`, etc) or `:match` (matches `:margin`). Specifies the extra padding to the left of the subplot.",
|
||||||
:margin => "Measure (multiply by `mm`, `px`, etc). Base for individual margins... not directly used. Specifies the extra padding around subplots.",
|
:top_margin => "Measure (multiply by `mm`, `px`, etc) or `:match` (matches `:margin`). Specifies the extra padding on the top of the subplot.",
|
||||||
:left_margin => "Measure (multiply by `mm`, `px`, etc) or `:match` (matches `:margin`). Specifies the extra padding to the left of the subplot.",
|
:right_margin => "Measure (multiply by `mm`, `px`, etc) or `:match` (matches `:margin`). Specifies the extra padding to the right of the subplot.",
|
||||||
:top_margin => "Measure (multiply by `mm`, `px`, etc) or `:match` (matches `:margin`). Specifies the extra padding on the top of the subplot.",
|
:bottom_margin => "Measure (multiply by `mm`, `px`, etc) or `:match` (matches `:margin`). Specifies the extra padding on the bottom of the subplot.",
|
||||||
:right_margin => "Measure (multiply by `mm`, `px`, etc) or `:match` (matches `:margin`). Specifies the extra padding to the right of the subplot.",
|
:subplot_index => "Integer. Internal (not set by user). Specifies the index of this subplot in the Plot's `plt.subplot` list.",
|
||||||
:bottom_margin => "Measure (multiply by `mm`, `px`, etc) or `:match` (matches `:margin`). Specifies the extra padding on the bottom of the subplot.",
|
:colorbar_title => "String. Title of colorbar.",
|
||||||
:subplot_index => "Integer. Internal (not set by user). Specifies the index of this subplot in the Plot's `plt.subplot` list.",
|
:framestyle => "Symbol. Style of the axes frame. Choose from $(_allFramestyles)",
|
||||||
:colorbar_title => "String. Title of colorbar.",
|
:camera => "NTuple{2, Real}. Sets the view angle (azimuthal, elevation) for 3D plots",
|
||||||
:framestyle => "Symbol. Style of the axes frame. Choose from $(_allFramestyles)",
|
|
||||||
:camera => "NTuple{2, Real}. Sets the view angle (azimuthal, elevation) for 3D plots",
|
|
||||||
|
|
||||||
# axis args
|
# axis args
|
||||||
:guide => "String. Axis guide (label).",
|
:guide => "String. Axis guide (label).",
|
||||||
|
|||||||
423
src/args.jl
423
src/args.jl
@ -24,9 +24,8 @@ function add_aliases(sym::Symbol, aliases::Symbol...)
|
|||||||
return nothing
|
return nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
function add_axes_aliases(sym::Symbol, aliases::Symbol...; generic::Bool = true)
|
function add_axes_aliases(sym::Symbol, aliases::Symbol...)
|
||||||
sym in keys(_axis_defaults) || throw(ArgumentError("Invalid `$sym`"))
|
sym in keys(_axis_defaults) || throw(ArgumentError("Invalid `$sym`"))
|
||||||
generic && add_aliases(sym, aliases...)
|
|
||||||
for letter in (:x, :y, :z)
|
for letter in (:x, :y, :z)
|
||||||
add_aliases(Symbol(letter, sym), (Symbol(letter, a) for a in aliases)...)
|
add_aliases(Symbol(letter, sym), (Symbol(letter, a) for a in aliases)...)
|
||||||
end
|
end
|
||||||
@ -89,8 +88,6 @@ const _allTypes = vcat(
|
|||||||
_3dTypes,
|
_3dTypes,
|
||||||
)
|
)
|
||||||
|
|
||||||
const _z_colored_series = [:contour, :contour3d, :heatmap, :histogram2d, :surface, :hexbin]
|
|
||||||
|
|
||||||
const _typeAliases = Dict{Symbol,Symbol}(
|
const _typeAliases = Dict{Symbol,Symbol}(
|
||||||
:n => :none,
|
:n => :none,
|
||||||
:no => :none,
|
:no => :none,
|
||||||
@ -399,8 +396,6 @@ const _series_defaults = KW(
|
|||||||
:hover => nothing, # text to display when hovering over the data points
|
:hover => nothing, # text to display when hovering over the data points
|
||||||
:stride => (1, 1), # array stride for wireframe/surface, the first element is the row stride and the second is the column stride.
|
:stride => (1, 1), # array stride for wireframe/surface, the first element is the row stride and the second is the column stride.
|
||||||
:connections => nothing, # tuple of arrays to specifiy connectivity of a 3d mesh
|
:connections => nothing, # tuple of arrays to specifiy connectivity of a 3d mesh
|
||||||
:z_order => :front, # one of :front, :back or integer in 1:length(sp.series_list)
|
|
||||||
:permute => :none, # tuple of two symbols to be permuted
|
|
||||||
:extra_kwargs => Dict(),
|
:extra_kwargs => Dict(),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -449,10 +444,14 @@ const _subplot_defaults = KW(
|
|||||||
:titlefontrotation => 0.0,
|
:titlefontrotation => 0.0,
|
||||||
:titlefontcolor => :match,
|
:titlefontcolor => :match,
|
||||||
:background_color_subplot => :match, # default for other bg colors... match takes plot default
|
:background_color_subplot => :match, # default for other bg colors... match takes plot default
|
||||||
|
:background_color_legend => :match, # background of legend
|
||||||
:background_color_inside => :match, # background inside grid
|
:background_color_inside => :match, # background inside grid
|
||||||
:foreground_color_subplot => :match, # default for other fg colors... match takes plot default
|
:foreground_color_subplot => :match, # default for other fg colors... match takes plot default
|
||||||
|
:foreground_color_legend => :match, # foreground of legend
|
||||||
:foreground_color_title => :match, # title color
|
:foreground_color_title => :match, # title color
|
||||||
:color_palette => :auto,
|
:color_palette => :auto,
|
||||||
|
:legend => :best,
|
||||||
|
:legendtitle => nothing,
|
||||||
:colorbar => :legend,
|
:colorbar => :legend,
|
||||||
:clims => :auto,
|
:clims => :auto,
|
||||||
:colorbar_fontfamily => :match,
|
:colorbar_fontfamily => :match,
|
||||||
@ -467,6 +466,18 @@ const _subplot_defaults = KW(
|
|||||||
:colorbar_formatter => :auto,
|
:colorbar_formatter => :auto,
|
||||||
:colorbar_discrete_values => [],
|
:colorbar_discrete_values => [],
|
||||||
:colorbar_continuous_values => zeros(0),
|
:colorbar_continuous_values => zeros(0),
|
||||||
|
:legendfontfamily => :match,
|
||||||
|
:legendfontsize => 8,
|
||||||
|
:legendfonthalign => :hcenter,
|
||||||
|
:legendfontvalign => :vcenter,
|
||||||
|
:legendfontrotation => 0.0,
|
||||||
|
:legendfontcolor => :match,
|
||||||
|
:legendtitlefontfamily => :match,
|
||||||
|
:legendtitlefontsize => 11,
|
||||||
|
:legendtitlefonthalign => :hcenter,
|
||||||
|
:legendtitlefontvalign => :vcenter,
|
||||||
|
:legendtitlefontrotation => 0.0,
|
||||||
|
:legendtitlefontcolor => :match,
|
||||||
:annotations => [], # annotation tuples... list of (x,y,annotation)
|
:annotations => [], # annotation tuples... list of (x,y,annotation)
|
||||||
:annotationfontfamily => :match,
|
:annotationfontfamily => :match,
|
||||||
:annotationfontsize => 14,
|
:annotationfontsize => 14,
|
||||||
@ -485,7 +496,6 @@ const _subplot_defaults = KW(
|
|||||||
:colorbar_title => "",
|
:colorbar_title => "",
|
||||||
:colorbar_titlefontsize => 10,
|
:colorbar_titlefontsize => 10,
|
||||||
:colorbar_title_location => :center, # also :left or :right
|
:colorbar_title_location => :center, # also :left or :right
|
||||||
:colorbar_fontfamily => :match,
|
|
||||||
:colorbar_titlefontfamily => :match,
|
:colorbar_titlefontfamily => :match,
|
||||||
:colorbar_titlefonthalign => :hcenter,
|
:colorbar_titlefonthalign => :hcenter,
|
||||||
:colorbar_titlefontvalign => :vcenter,
|
:colorbar_titlefontvalign => :vcenter,
|
||||||
@ -555,6 +565,80 @@ const _suppress_warnings = Set{Symbol}([
|
|||||||
:relative_bbox,
|
:relative_bbox,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# add defaults for the letter versions
|
||||||
|
const _axis_defaults_byletter = KW()
|
||||||
|
|
||||||
|
function reset_axis_defaults_byletter!()
|
||||||
|
for letter in (:x, :y, :z)
|
||||||
|
_axis_defaults_byletter[letter] = KW()
|
||||||
|
for (k, v) in _axis_defaults
|
||||||
|
_axis_defaults_byletter[letter][k] = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
reset_axis_defaults_byletter!()
|
||||||
|
|
||||||
|
const _all_defaults = KW[_series_defaults, _plot_defaults, _subplot_defaults]
|
||||||
|
|
||||||
|
const _initial_defaults = deepcopy(_all_defaults)
|
||||||
|
const _initial_axis_defaults = deepcopy(_axis_defaults)
|
||||||
|
|
||||||
|
# to be able to reset font sizes to initial values
|
||||||
|
const _initial_plt_fontsizes =
|
||||||
|
Dict(:plot_titlefontsize => _plot_defaults[:plot_titlefontsize])
|
||||||
|
|
||||||
|
const _initial_sp_fontsizes = Dict(
|
||||||
|
:titlefontsize => _subplot_defaults[:titlefontsize],
|
||||||
|
:legendfontsize => _subplot_defaults[:legendfontsize],
|
||||||
|
:legendtitlefontsize => _subplot_defaults[:legendtitlefontsize],
|
||||||
|
:annotationfontsize => _subplot_defaults[:annotationfontsize],
|
||||||
|
:colorbar_tickfontsize => _subplot_defaults[:colorbar_tickfontsize],
|
||||||
|
:colorbar_titlefontsize => _subplot_defaults[:colorbar_titlefontsize],
|
||||||
|
)
|
||||||
|
|
||||||
|
const _initial_ax_fontsizes = Dict(
|
||||||
|
:tickfontsize => _axis_defaults[:tickfontsize],
|
||||||
|
:guidefontsize => _axis_defaults[:guidefontsize],
|
||||||
|
)
|
||||||
|
|
||||||
|
const _initial_fontsizes =
|
||||||
|
merge(_initial_plt_fontsizes, _initial_sp_fontsizes, _initial_ax_fontsizes)
|
||||||
|
|
||||||
|
const _internal_args =
|
||||||
|
[:plot_object, :series_plotindex, :markershape_to_add, :letter, :idxfilter]
|
||||||
|
|
||||||
|
const _axis_args = sort(union(collect(keys(_axis_defaults))))
|
||||||
|
const _series_args = sort(union(collect(keys(_series_defaults))))
|
||||||
|
const _subplot_args = sort(union(collect(keys(_subplot_defaults))))
|
||||||
|
const _plot_args = sort(union(collect(keys(_plot_defaults))))
|
||||||
|
|
||||||
|
const _magic_axis_args = [:axis, :tickfont, :guidefont, :grid, :minorgrid]
|
||||||
|
const _magic_subplot_args =
|
||||||
|
[:titlefont, :legendfont, :legendtitlefont, :plot_titlefont, :colorbar_titlefont]
|
||||||
|
const _magic_series_args = [:line, :marker, :fill]
|
||||||
|
|
||||||
|
const _all_axis_args = sort(union([_axis_args; _magic_axis_args]))
|
||||||
|
const _all_subplot_args = sort(union([_subplot_args; _magic_subplot_args]))
|
||||||
|
const _all_series_args = sort(union([_series_args; _magic_series_args]))
|
||||||
|
const _all_plot_args = _plot_args
|
||||||
|
|
||||||
|
for letter in (:x, :y, :z)
|
||||||
|
_attrsymbolcache[letter] = Dict{Symbol,Symbol}()
|
||||||
|
for k in keys(_axis_defaults)
|
||||||
|
# populate attribute cache
|
||||||
|
lk = Symbol(letter, k)
|
||||||
|
_attrsymbolcache[letter][k] = lk
|
||||||
|
# allow the underscore version too: xguide or x_guide
|
||||||
|
add_aliases(lk, Symbol(letter, "_", k))
|
||||||
|
end
|
||||||
|
for k in (_magic_axis_args..., :(_discrete_indices))
|
||||||
|
_attrsymbolcache[letter][k] = Symbol(letter, k)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
const _all_args =
|
||||||
|
sort(union([_all_axis_args; _all_subplot_args; _all_series_args; _all_plot_args]))
|
||||||
|
|
||||||
is_subplot_attr(k) = k in _all_subplot_args
|
is_subplot_attr(k) = k in _all_subplot_args
|
||||||
is_series_attr(k) = k in _all_series_args
|
is_series_attr(k) = k in _all_series_args
|
||||||
is_axis_attr(k) = Symbol(chop(string(k); head = 1, tail = 0)) in _all_axis_args
|
is_axis_attr(k) = Symbol(chop(string(k); head = 1, tail = 0)) in _all_axis_args
|
||||||
@ -586,46 +670,9 @@ aliases(aliasMap::Dict{Symbol,Symbol}, val) =
|
|||||||
sortedkeys(filter((k, v) -> v == val, aliasMap))
|
sortedkeys(filter((k, v) -> v == val, aliasMap))
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# legend
|
|
||||||
add_aliases(:legend_position, :legend, :leg, :key, :legends)
|
|
||||||
add_aliases(
|
|
||||||
:legend_background_color,
|
|
||||||
:bg_legend,
|
|
||||||
:bglegend,
|
|
||||||
:bgcolor_legend,
|
|
||||||
:bg_color_legend,
|
|
||||||
:background_legend,
|
|
||||||
:background_colour_legend,
|
|
||||||
:bgcolour_legend,
|
|
||||||
:bg_colour_legend,
|
|
||||||
:background_color_legend,
|
|
||||||
)
|
|
||||||
add_aliases(
|
|
||||||
:legend_foreground_color,
|
|
||||||
:fg_legend,
|
|
||||||
:fglegend,
|
|
||||||
:fgcolor_legend,
|
|
||||||
:fg_color_legend,
|
|
||||||
:foreground_legend,
|
|
||||||
:foreground_colour_legend,
|
|
||||||
:fgcolour_legend,
|
|
||||||
:fg_colour_legend,
|
|
||||||
:foreground_color_legend,
|
|
||||||
)
|
|
||||||
add_aliases(:legend_font_pointsize, :legendfontsize)
|
|
||||||
add_aliases(
|
|
||||||
:legend_title,
|
|
||||||
:key_title,
|
|
||||||
:keytitle,
|
|
||||||
:label_title,
|
|
||||||
:labeltitle,
|
|
||||||
:leg_title,
|
|
||||||
:legtitle,
|
|
||||||
)
|
|
||||||
add_aliases(:legend_title_font_pointsize, :legendtitlefontsize)
|
|
||||||
# margin
|
# margin
|
||||||
add_aliases(:left_margin, :leftmargin)
|
add_aliases(:left_margin, :leftmargin)
|
||||||
|
|
||||||
add_aliases(:top_margin, :topmargin)
|
add_aliases(:top_margin, :topmargin)
|
||||||
add_aliases(:bottom_margin, :bottommargin)
|
add_aliases(:bottom_margin, :bottommargin)
|
||||||
add_aliases(:right_margin, :rightmargin)
|
add_aliases(:right_margin, :rightmargin)
|
||||||
@ -648,6 +695,17 @@ add_aliases(
|
|||||||
:bgcolour,
|
:bgcolour,
|
||||||
:bg_colour,
|
:bg_colour,
|
||||||
)
|
)
|
||||||
|
add_aliases(
|
||||||
|
:background_color_legend,
|
||||||
|
:bg_legend,
|
||||||
|
:bglegend,
|
||||||
|
:bgcolor_legend,
|
||||||
|
:bg_color_legend,
|
||||||
|
:background_legend,
|
||||||
|
:background_colour_legend,
|
||||||
|
:bgcolour_legend,
|
||||||
|
:bg_colour_legend,
|
||||||
|
)
|
||||||
add_aliases(
|
add_aliases(
|
||||||
:background_color_subplot,
|
:background_color_subplot,
|
||||||
:bg_subplot,
|
:bg_subplot,
|
||||||
@ -691,7 +749,17 @@ add_aliases(
|
|||||||
:fgcolour,
|
:fgcolour,
|
||||||
:fg_colour,
|
:fg_colour,
|
||||||
)
|
)
|
||||||
|
add_aliases(
|
||||||
|
:foreground_color_legend,
|
||||||
|
:fg_legend,
|
||||||
|
:fglegend,
|
||||||
|
:fgcolor_legend,
|
||||||
|
:fg_color_legend,
|
||||||
|
:foreground_legend,
|
||||||
|
:foreground_colour_legend,
|
||||||
|
:fgcolour_legend,
|
||||||
|
:fg_colour_legend,
|
||||||
|
)
|
||||||
add_aliases(
|
add_aliases(
|
||||||
:foreground_color_subplot,
|
:foreground_color_subplot,
|
||||||
:fg_subplot,
|
:fg_subplot,
|
||||||
@ -703,90 +771,6 @@ add_aliases(
|
|||||||
:fgcolour_subplot,
|
:fgcolour_subplot,
|
||||||
:fg_colour_subplot,
|
:fg_colour_subplot,
|
||||||
)
|
)
|
||||||
add_aliases(
|
|
||||||
:foreground_color_grid,
|
|
||||||
:fg_grid,
|
|
||||||
:fggrid,
|
|
||||||
:fgcolor_grid,
|
|
||||||
:fg_color_grid,
|
|
||||||
:foreground_grid,
|
|
||||||
:foreground_colour_grid,
|
|
||||||
:fgcolour_grid,
|
|
||||||
:fg_colour_grid,
|
|
||||||
:gridcolor,
|
|
||||||
)
|
|
||||||
add_aliases(
|
|
||||||
:foreground_color_minor_grid,
|
|
||||||
:fg_minor_grid,
|
|
||||||
:fgminorgrid,
|
|
||||||
:fgcolor_minorgrid,
|
|
||||||
:fg_color_minorgrid,
|
|
||||||
:foreground_minorgrid,
|
|
||||||
:foreground_colour_minor_grid,
|
|
||||||
:fgcolour_minorgrid,
|
|
||||||
:fg_colour_minor_grid,
|
|
||||||
:minorgridcolor,
|
|
||||||
)
|
|
||||||
add_aliases(
|
|
||||||
:foreground_color_title,
|
|
||||||
:fg_title,
|
|
||||||
:fgtitle,
|
|
||||||
:fgcolor_title,
|
|
||||||
:fg_color_title,
|
|
||||||
:foreground_title,
|
|
||||||
:foreground_colour_title,
|
|
||||||
:fgcolour_title,
|
|
||||||
:fg_colour_title,
|
|
||||||
:titlecolor,
|
|
||||||
)
|
|
||||||
add_aliases(
|
|
||||||
:foreground_color_axis,
|
|
||||||
:fg_axis,
|
|
||||||
:fgaxis,
|
|
||||||
:fgcolor_axis,
|
|
||||||
:fg_color_axis,
|
|
||||||
:foreground_axis,
|
|
||||||
:foreground_colour_axis,
|
|
||||||
:fgcolour_axis,
|
|
||||||
:fg_colour_axis,
|
|
||||||
:axiscolor,
|
|
||||||
)
|
|
||||||
add_aliases(
|
|
||||||
:foreground_color_border,
|
|
||||||
:fg_border,
|
|
||||||
:fgborder,
|
|
||||||
:fgcolor_border,
|
|
||||||
:fg_color_border,
|
|
||||||
:foreground_border,
|
|
||||||
:foreground_colour_border,
|
|
||||||
:fgcolour_border,
|
|
||||||
:fg_colour_border,
|
|
||||||
:bordercolor,
|
|
||||||
)
|
|
||||||
add_aliases(
|
|
||||||
:foreground_color_text,
|
|
||||||
:fg_text,
|
|
||||||
:fgtext,
|
|
||||||
:fgcolor_text,
|
|
||||||
:fg_color_text,
|
|
||||||
:foreground_text,
|
|
||||||
:foreground_colour_text,
|
|
||||||
:fgcolour_text,
|
|
||||||
:fg_colour_text,
|
|
||||||
:textcolor,
|
|
||||||
)
|
|
||||||
add_aliases(
|
|
||||||
:foreground_color_guide,
|
|
||||||
:fg_guide,
|
|
||||||
:fgguide,
|
|
||||||
:fgcolor_guide,
|
|
||||||
:fg_color_guide,
|
|
||||||
:foreground_guide,
|
|
||||||
:foreground_colour_guide,
|
|
||||||
:fgcolour_guide,
|
|
||||||
:fg_colour_guide,
|
|
||||||
:guidecolor,
|
|
||||||
)
|
|
||||||
|
|
||||||
add_aliases(
|
add_aliases(
|
||||||
:foreground_color_title,
|
:foreground_color_title,
|
||||||
@ -857,20 +841,13 @@ add_aliases(:markerstrokealpha, :msa, :msalpha, :msα, :markerstrokeopacity, :ms
|
|||||||
add_aliases(:fillalpha, :fa, :falpha, :fα, :fillopacity, :fopacity)
|
add_aliases(:fillalpha, :fa, :falpha, :fα, :fillopacity, :fopacity)
|
||||||
|
|
||||||
# axes attributes
|
# axes attributes
|
||||||
add_axes_aliases(:guide, :label, :lab, :l; generic = false)
|
add_axes_aliases(:guide, :label, :lab, :l)
|
||||||
add_axes_aliases(:lims, :lim, :limit, :limits, :range)
|
add_axes_aliases(:lims, :lim, :limit, :limits, :range)
|
||||||
add_axes_aliases(:ticks, :tick)
|
add_axes_aliases(:ticks, :tick)
|
||||||
add_axes_aliases(:rotation, :rot, :r)
|
add_axes_aliases(:rotation, :rot, :r)
|
||||||
add_axes_aliases(:guidefontsize, :labelfontsize)
|
add_axes_aliases(:guidefontsize, :labelfontsize)
|
||||||
add_axes_aliases(:gridalpha, :ga, :galpha, :gα, :gridopacity, :gopacity)
|
add_axes_aliases(:gridalpha, :ga, :galpha, :gα, :gridopacity, :gopacity)
|
||||||
add_axes_aliases(
|
add_axes_aliases(:gridstyle, :grid_style, :gridlinestyle, :grid_linestyle, :grid_ls, :gridls)
|
||||||
:gridstyle,
|
|
||||||
:grid_style,
|
|
||||||
:gridlinestyle,
|
|
||||||
:grid_linestyle,
|
|
||||||
:grid_ls,
|
|
||||||
:gridls,
|
|
||||||
)
|
|
||||||
add_axes_aliases(
|
add_axes_aliases(
|
||||||
:foreground_color_grid,
|
:foreground_color_grid,
|
||||||
:fg_grid,
|
:fg_grid,
|
||||||
@ -895,14 +872,7 @@ add_axes_aliases(
|
|||||||
:fg_colour_minor_grid,
|
:fg_colour_minor_grid,
|
||||||
:minorgridcolor,
|
:minorgridcolor,
|
||||||
)
|
)
|
||||||
add_axes_aliases(
|
add_axes_aliases(:gridlinewidth, :gridwidth, :grid_linewidth, :grid_width, :gridlw, :grid_lw)
|
||||||
:gridlinewidth,
|
|
||||||
:gridwidth,
|
|
||||||
:grid_linewidth,
|
|
||||||
:grid_width,
|
|
||||||
:gridlw,
|
|
||||||
:grid_lw,
|
|
||||||
)
|
|
||||||
add_axes_aliases(
|
add_axes_aliases(
|
||||||
:minorgridstyle,
|
:minorgridstyle,
|
||||||
:minorgrid_style,
|
:minorgrid_style,
|
||||||
@ -947,19 +917,7 @@ add_aliases(:group, :g, :grouping)
|
|||||||
add_aliases(:bins, :bin, :nbin, :nbins, :nb)
|
add_aliases(:bins, :bin, :nbin, :nbins, :nb)
|
||||||
add_aliases(:ribbon, :rib)
|
add_aliases(:ribbon, :rib)
|
||||||
add_aliases(:annotations, :ann, :anns, :annotate, :annotation)
|
add_aliases(:annotations, :ann, :anns, :annotate, :annotation)
|
||||||
add_aliases(:xguide, :xlabel, :xlab, :xl)
|
|
||||||
add_aliases(:xlims, :xlim, :xlimit, :xlimits, :xrange)
|
|
||||||
add_aliases(:xticks, :xtick)
|
|
||||||
add_aliases(:xrotation, :xrot, :xr)
|
|
||||||
add_aliases(:yguide, :ylabel, :ylab, :yl)
|
|
||||||
add_aliases(:ylims, :ylim, :ylimit, :ylimits, :yrange)
|
|
||||||
add_aliases(:yticks, :ytick)
|
|
||||||
add_aliases(:yrotation, :yrot, :yr)
|
|
||||||
add_aliases(:zguide, :zlabel, :zlab, :zl)
|
|
||||||
add_aliases(:zlims, :zlim, :zlimit, :zlimits)
|
|
||||||
add_aliases(:zticks, :ztick)
|
|
||||||
add_aliases(:zrotation, :zrot, :zr)
|
|
||||||
add_aliases(:guidefontsize, :labelfontsize)
|
|
||||||
add_aliases(
|
add_aliases(
|
||||||
:fill_z,
|
:fill_z,
|
||||||
:fillz,
|
:fillz,
|
||||||
@ -970,6 +928,8 @@ add_aliases(
|
|||||||
:surfcolor,
|
:surfcolor,
|
||||||
:surfcolour,
|
:surfcolour,
|
||||||
)
|
)
|
||||||
|
add_aliases(:legend, :leg, :key)
|
||||||
|
add_aliases(:legendtitle, :legend_title, :labeltitle, :label_title, :leg_title, :key_title)
|
||||||
add_aliases(:colorbar, :cb, :cbar, :colorkey)
|
add_aliases(:colorbar, :cb, :cbar, :colorkey)
|
||||||
add_aliases(
|
add_aliases(
|
||||||
:colorbar_title,
|
:colorbar_title,
|
||||||
@ -1045,6 +1005,13 @@ add_aliases(:camera, :cam, :viewangle, :view_angle)
|
|||||||
add_aliases(:contour_labels, :contourlabels, :clabels, :clabs)
|
add_aliases(:contour_labels, :contourlabels, :clabels, :clabs)
|
||||||
add_aliases(:warn_on_unsupported, :warn)
|
add_aliases(:warn_on_unsupported, :warn)
|
||||||
|
|
||||||
|
# add all pluralized forms to the _keyAliases dict
|
||||||
|
for arg in _all_args
|
||||||
|
add_aliases(arg, makeplural(arg))
|
||||||
|
end
|
||||||
|
# add all non_underscored forms to the _keyAliases
|
||||||
|
add_non_underscore_aliases!(_keyAliases)
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
function parse_axis_kw(s::Symbol)
|
function parse_axis_kw(s::Symbol)
|
||||||
@ -1060,14 +1027,10 @@ end
|
|||||||
# update the defaults globally
|
# update the defaults globally
|
||||||
|
|
||||||
"""
|
"""
|
||||||
`default(key)` returns the current default value for that key.
|
`default(key)` returns the current default value for that key
|
||||||
|
`default(key, value)` sets the current default value for that key
|
||||||
`default(key, value)` sets the current default value for that key.
|
`default(; kw...)` will set the current default value for each key/value pair
|
||||||
|
`default(plotattributes, key)` returns the key from plotattributes if it exists, otherwise `default(key)`
|
||||||
`default(; kw...)` will set the current default value for each key/value pair.
|
|
||||||
|
|
||||||
`default(plotattributes, key)` returns the key from plotattributes if it exists, otherwise `default(key)`.
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
function default(k::Symbol)
|
function default(k::Symbol)
|
||||||
k = get(_keyAliases, k, k)
|
k = get(_keyAliases, k, k)
|
||||||
@ -1349,12 +1312,7 @@ function processFontArg!(plotattributes::AKW, fontname::Symbol, arg)
|
|||||||
T = typeof(arg)
|
T = typeof(arg)
|
||||||
if T <: Font
|
if T <: Font
|
||||||
plotattributes[Symbol(fontname, :family)] = arg.family
|
plotattributes[Symbol(fontname, :family)] = arg.family
|
||||||
# TODO: this is neccessary in the transition from old fontsize to new font_pointsize and should be removed when it is completed
|
plotattributes[Symbol(fontname, :size)] = arg.pointsize
|
||||||
if in(Symbol(fontname, :size), _all_args)
|
|
||||||
plotattributes[Symbol(fontname, :size)] = arg.pointsize
|
|
||||||
else
|
|
||||||
plotattributes[Symbol(fontname, :_pointsize)] = arg.pointsize
|
|
||||||
end
|
|
||||||
plotattributes[Symbol(fontname, :halign)] = arg.halign
|
plotattributes[Symbol(fontname, :halign)] = arg.halign
|
||||||
plotattributes[Symbol(fontname, :valign)] = arg.valign
|
plotattributes[Symbol(fontname, :valign)] = arg.valign
|
||||||
plotattributes[Symbol(fontname, :rotation)] = arg.rotation
|
plotattributes[Symbol(fontname, :rotation)] = arg.rotation
|
||||||
@ -1375,11 +1333,7 @@ function processFontArg!(plotattributes::AKW, fontname::Symbol, arg)
|
|||||||
plotattributes[Symbol(fontname, :family)] = string(arg)
|
plotattributes[Symbol(fontname, :family)] = string(arg)
|
||||||
end
|
end
|
||||||
elseif typeof(arg) <: Integer
|
elseif typeof(arg) <: Integer
|
||||||
if in(Symbol(fontname, :size), _all_args)
|
plotattributes[Symbol(fontname, :size)] = arg
|
||||||
plotattributes[Symbol(fontname, :size)] = arg
|
|
||||||
else
|
|
||||||
plotattributes[Symbol(fontname, :_pointsize)] = arg
|
|
||||||
end
|
|
||||||
elseif typeof(arg) <: Real
|
elseif typeof(arg) <: Real
|
||||||
plotattributes[Symbol(fontname, :rotation)] = convert(Float64, arg)
|
plotattributes[Symbol(fontname, :rotation)] = convert(Float64, arg)
|
||||||
else
|
else
|
||||||
@ -1499,7 +1453,7 @@ function RecipesPipeline.preprocess_attributes!(plotattributes::AKW)
|
|||||||
|
|
||||||
# fonts
|
# fonts
|
||||||
for fontname in
|
for fontname in
|
||||||
(:titlefont, :legend_title_font, :plot_titlefont, :colorbar_titlefont, :legend_font)
|
(:titlefont, :legendfont, :legendtitlefont, :plot_titlefont, :colorbar_titlefont)
|
||||||
args = RecipesPipeline.pop_kw!(plotattributes, fontname, ())
|
args = RecipesPipeline.pop_kw!(plotattributes, fontname, ())
|
||||||
for arg in wraptuple(args)
|
for arg in wraptuple(args)
|
||||||
processFontArg!(plotattributes, fontname, arg)
|
processFontArg!(plotattributes, fontname, arg)
|
||||||
@ -1566,9 +1520,8 @@ function RecipesPipeline.preprocess_attributes!(plotattributes::AKW)
|
|||||||
# end
|
# end
|
||||||
|
|
||||||
# legends
|
# legends
|
||||||
if haskey(plotattributes, :legend_position)
|
if haskey(plotattributes, :legend)
|
||||||
plotattributes[:legend_position] =
|
plotattributes[:legend] = convertLegendValue(plotattributes[:legend])
|
||||||
convertLegendValue(plotattributes[:legend_position])
|
|
||||||
end
|
end
|
||||||
if haskey(plotattributes, :colorbar)
|
if haskey(plotattributes, :colorbar)
|
||||||
plotattributes[:colorbar] = convertLegendValue(plotattributes[:colorbar])
|
plotattributes[:colorbar] = convertLegendValue(plotattributes[:colorbar])
|
||||||
@ -1587,11 +1540,7 @@ function RecipesPipeline.preprocess_attributes!(plotattributes::AKW)
|
|||||||
|
|
||||||
# warnings for moved recipes
|
# warnings for moved recipes
|
||||||
st = get(plotattributes, :seriestype, :path)
|
st = get(plotattributes, :seriestype, :path)
|
||||||
if st in (:boxplot, :violin, :density) &&
|
if st in (:boxplot, :violin, :density) && !isdefined(Main, :StatsPlots)
|
||||||
!haskey(
|
|
||||||
Base.loaded_modules,
|
|
||||||
Base.PkgId(Base.UUID("f3b207a7-027a-5e70-b257-86293d7955fd"), "StatsPlots"),
|
|
||||||
)
|
|
||||||
@warn(
|
@warn(
|
||||||
"seriestype $st has been moved to StatsPlots. To use: \`Pkg.add(\"StatsPlots\"); using StatsPlots\`"
|
"seriestype $st has been moved to StatsPlots. To use: \`Pkg.add(\"StatsPlots\"); using StatsPlots\`"
|
||||||
)
|
)
|
||||||
@ -1604,15 +1553,13 @@ end
|
|||||||
const _already_warned = Dict{Symbol,Set{Symbol}}()
|
const _already_warned = Dict{Symbol,Set{Symbol}}()
|
||||||
const _to_warn = Set{Symbol}()
|
const _to_warn = Set{Symbol}()
|
||||||
|
|
||||||
should_warn_on_unsupported(::AbstractBackend) = _plot_defaults[:warn_on_unsupported]
|
|
||||||
|
|
||||||
function warn_on_unsupported_args(pkg::AbstractBackend, plotattributes)
|
function warn_on_unsupported_args(pkg::AbstractBackend, plotattributes)
|
||||||
empty!(_to_warn)
|
empty!(_to_warn)
|
||||||
bend = backend_name(pkg)
|
bend = backend_name(pkg)
|
||||||
already_warned = get!(_already_warned, bend, Set{Symbol}())
|
already_warned = get!(_already_warned, bend, Set{Symbol}())
|
||||||
extra_kwargs = Dict{Symbol,Any}()
|
extra_kwargs = Dict{Symbol,Any}()
|
||||||
for k in keys(plotattributes)
|
for k in keys(plotattributes)
|
||||||
is_attr_supported(pkg, k) && !(k in keys(_deprecated_attributes)) && continue
|
is_attr_supported(pkg, k) && continue
|
||||||
k in _suppress_warnings && continue
|
k in _suppress_warnings && continue
|
||||||
default_value = default(k)
|
default_value = default(k)
|
||||||
if ismissing(default_value)
|
if ismissing(default_value)
|
||||||
@ -1623,19 +1570,12 @@ function warn_on_unsupported_args(pkg::AbstractBackend, plotattributes)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if !isempty(_to_warn) &&
|
if !isempty(_to_warn) &&
|
||||||
get(plotattributes, :warn_on_unsupported, should_warn_on_unsupported(pkg))
|
!get(plotattributes, :warn_on_unsupported, _plot_defaults[:warn_on_unsupported])
|
||||||
for k in sort(collect(_to_warn))
|
for k in sort(collect(_to_warn))
|
||||||
push!(already_warned, k)
|
push!(already_warned, k)
|
||||||
if k in keys(_deprecated_attributes)
|
@warn(
|
||||||
@warn("""
|
"Keyword argument $k not supported with $pkg. Choose from: $(supported_attrs(pkg))"
|
||||||
Keyword argument `$k` is deprecated.
|
)
|
||||||
Please use `$(_deprecated_attributes[k])` instead.
|
|
||||||
""")
|
|
||||||
else
|
|
||||||
@warn(
|
|
||||||
"Keyword argument $k not supported with $pkg. Choose from: $(join(supported_attrs(pkg), ", "))"
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return extra_kwargs
|
return extra_kwargs
|
||||||
@ -1646,7 +1586,7 @@ end
|
|||||||
# _markershape_supported(pkg::AbstractBackend, shapes::AVec) = all([_markershape_supported(pkg, shape) for shape in shapes])
|
# _markershape_supported(pkg::AbstractBackend, shapes::AVec) = all([_markershape_supported(pkg, shape) for shape in shapes])
|
||||||
|
|
||||||
function warn_on_unsupported(pkg::AbstractBackend, plotattributes)
|
function warn_on_unsupported(pkg::AbstractBackend, plotattributes)
|
||||||
if !get(plotattributes, :warn_on_unsupported, should_warn_on_unsupported(pkg))
|
if !get(plotattributes, :warn_on_unsupported, _plot_defaults[:warn_on_unsupported])
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if !is_seriestype_supported(pkg, plotattributes[:seriestype])
|
if !is_seriestype_supported(pkg, plotattributes[:seriestype])
|
||||||
@ -1667,13 +1607,13 @@ function warn_on_unsupported(pkg::AbstractBackend, plotattributes)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function warn_on_unsupported_scales(pkg::AbstractBackend, plotattributes::AKW)
|
function warn_on_unsupported_scales(pkg::AbstractBackend, plotattributes::AKW)
|
||||||
if !get(plotattributes, :warn_on_unsupported, should_warn_on_unsupported(pkg))
|
if !get(plotattributes, :warn_on_unsupported, _plot_defaults[:warn_on_unsupported])
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
for k in (:xscale, :yscale, :zscale, :scale)
|
for k in (:xscale, :yscale, :zscale, :scale)
|
||||||
if haskey(plotattributes, k)
|
if haskey(plotattributes, k)
|
||||||
v = plotattributes[k]
|
v = plotattributes[k]
|
||||||
if !all(is_scale_supported.(Ref(pkg), v))
|
if !is_scale_supported(pkg, v)
|
||||||
@warn(
|
@warn(
|
||||||
"scale $v is unsupported with $pkg. Choose from: $(supported_scales(pkg))"
|
"scale $v is unsupported with $pkg. Choose from: $(supported_scales(pkg))"
|
||||||
)
|
)
|
||||||
@ -1712,18 +1652,15 @@ function convertLegendValue(val::Symbol)
|
|||||||
:inline,
|
:inline,
|
||||||
)
|
)
|
||||||
val
|
val
|
||||||
elseif val == :horizontal
|
|
||||||
-1
|
|
||||||
else
|
else
|
||||||
error("Invalid symbol for legend: $val")
|
error("Invalid symbol for legend: $val")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
convertLegendValue(val::Real) = val
|
|
||||||
convertLegendValue(val::Bool) = val ? :best : :none
|
convertLegendValue(val::Bool) = val ? :best : :none
|
||||||
convertLegendValue(val::Nothing) = :none
|
convertLegendValue(val::Nothing) = :none
|
||||||
convertLegendValue(v::Union{Tuple,NamedTuple}) = convertLegendValue.(v)
|
|
||||||
convertLegendValue(v::Tuple{S,T}) where {S<:Real,T<:Real} = v
|
convertLegendValue(v::Tuple{S,T}) where {S<:Real,T<:Real} = v
|
||||||
convertLegendValue(v::Tuple{<:Real,Symbol}) = v
|
convertLegendValue(v::Tuple{<:Real,Symbol}) = v
|
||||||
|
convertLegendValue(v::Real) = v
|
||||||
convertLegendValue(v::AbstractArray) = map(convertLegendValue, v)
|
convertLegendValue(v::AbstractArray) = map(convertLegendValue, v)
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
@ -1771,17 +1708,12 @@ function slice_arg!(
|
|||||||
remove_pair::Bool,
|
remove_pair::Bool,
|
||||||
)
|
)
|
||||||
v = get(plotattributes_in, k, plotattributes_out[k])
|
v = get(plotattributes_in, k, plotattributes_out[k])
|
||||||
plotattributes_out[k] = if haskey(plotattributes_in, k) && !(k in _plot_args)
|
plotattributes_out[k] =
|
||||||
if typeof(v) <: AMat && !isempty(v)
|
if haskey(plotattributes_in, k) && typeof(v) <: AMat && !isempty(v)
|
||||||
slice_arg(v, idx)
|
slice_arg(v, idx)
|
||||||
elseif typeof(v) <: NTuple{2,AMat}
|
|
||||||
(slice_arg(v[1], idx), slice_arg(v[2], idx))
|
|
||||||
else
|
else
|
||||||
v
|
v
|
||||||
end
|
end
|
||||||
else
|
|
||||||
v
|
|
||||||
end
|
|
||||||
if remove_pair
|
if remove_pair
|
||||||
RecipesPipeline.reset_kw!(plotattributes_in, k)
|
RecipesPipeline.reset_kw!(plotattributes_in, k)
|
||||||
end
|
end
|
||||||
@ -1814,9 +1746,9 @@ end
|
|||||||
# when a value can be `:match`, this is the key that should be used instead for value retrieval
|
# when a value can be `:match`, this is the key that should be used instead for value retrieval
|
||||||
const _match_map = KW(
|
const _match_map = KW(
|
||||||
:background_color_outside => :background_color,
|
:background_color_outside => :background_color,
|
||||||
:legend_background_color => :background_color_subplot,
|
:background_color_legend => :background_color_subplot,
|
||||||
:background_color_inside => :background_color_subplot,
|
:background_color_inside => :background_color_subplot,
|
||||||
:legend_foreground_color => :foreground_color_subplot,
|
:foreground_color_legend => :foreground_color_subplot,
|
||||||
:foreground_color_title => :foreground_color_subplot,
|
:foreground_color_title => :foreground_color_subplot,
|
||||||
:left_margin => :margin,
|
:left_margin => :margin,
|
||||||
:top_margin => :margin,
|
:top_margin => :margin,
|
||||||
@ -1824,10 +1756,10 @@ const _match_map = KW(
|
|||||||
:bottom_margin => :margin,
|
:bottom_margin => :margin,
|
||||||
:titlefontfamily => :fontfamily_subplot,
|
:titlefontfamily => :fontfamily_subplot,
|
||||||
:titlefontcolor => :foreground_color_subplot,
|
:titlefontcolor => :foreground_color_subplot,
|
||||||
:legend_font_family => :fontfamily_subplot,
|
:legendfontfamily => :fontfamily_subplot,
|
||||||
:legend_font_color => :foreground_color_subplot,
|
:legendfontcolor => :foreground_color_subplot,
|
||||||
:legend_title_font_family => :fontfamily_subplot,
|
:legendtitlefontfamily => :fontfamily_subplot,
|
||||||
:legend_title_font_color => :foreground_color_subplot,
|
:legendtitlefontcolor => :foreground_color_subplot,
|
||||||
:colorbar_fontfamily => :fontfamily_subplot,
|
:colorbar_fontfamily => :fontfamily_subplot,
|
||||||
:colorbar_titlefontfamily => :fontfamily_subplot,
|
:colorbar_titlefontfamily => :fontfamily_subplot,
|
||||||
:colorbar_titlefontcolor => :foreground_color_subplot,
|
:colorbar_titlefontcolor => :foreground_color_subplot,
|
||||||
@ -1958,10 +1890,10 @@ function _update_subplot_periphery(sp::Subplot, anns::AVec)
|
|||||||
sp.attr[:annotations] = newanns
|
sp.attr[:annotations] = newanns
|
||||||
|
|
||||||
# handle legend/colorbar
|
# handle legend/colorbar
|
||||||
sp.attr[:legend_position] = convertLegendValue(sp.attr[:legend_position])
|
sp.attr[:legend] = convertLegendValue(sp.attr[:legend])
|
||||||
sp.attr[:colorbar] = convertLegendValue(sp.attr[:colorbar])
|
sp.attr[:colorbar] = convertLegendValue(sp.attr[:colorbar])
|
||||||
if sp.attr[:colorbar] == :legend
|
if sp.attr[:colorbar] == :legend
|
||||||
sp.attr[:colorbar] = sp.attr[:legend_position]
|
sp.attr[:colorbar] = sp.attr[:legend]
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -1970,12 +1902,12 @@ function _update_subplot_colors(sp::Subplot)
|
|||||||
# background colors
|
# background colors
|
||||||
color_or_nothing!(sp.attr, :background_color_subplot)
|
color_or_nothing!(sp.attr, :background_color_subplot)
|
||||||
sp.attr[:color_palette] = get_color_palette(sp.attr[:color_palette], 30)
|
sp.attr[:color_palette] = get_color_palette(sp.attr[:color_palette], 30)
|
||||||
color_or_nothing!(sp.attr, :legend_background_color)
|
color_or_nothing!(sp.attr, :background_color_legend)
|
||||||
color_or_nothing!(sp.attr, :background_color_inside)
|
color_or_nothing!(sp.attr, :background_color_inside)
|
||||||
|
|
||||||
# foreground colors
|
# foreground colors
|
||||||
color_or_nothing!(sp.attr, :foreground_color_subplot)
|
color_or_nothing!(sp.attr, :foreground_color_subplot)
|
||||||
color_or_nothing!(sp.attr, :legend_foreground_color)
|
color_or_nothing!(sp.attr, :foreground_color_legend)
|
||||||
color_or_nothing!(sp.attr, :foreground_color_title)
|
color_or_nothing!(sp.attr, :foreground_color_title)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -2065,7 +1997,7 @@ function _update_subplot_args(
|
|||||||
)
|
)
|
||||||
anns = RecipesPipeline.pop_kw!(sp.attr, :annotations)
|
anns = RecipesPipeline.pop_kw!(sp.attr, :annotations)
|
||||||
|
|
||||||
# grab those args which apply to this subplot
|
# # grab those args which apply to this subplot
|
||||||
for k in keys(_subplot_defaults)
|
for k in keys(_subplot_defaults)
|
||||||
slice_arg!(plotattributes_in, sp.attr, k, subplot_index, remove_pair)
|
slice_arg!(plotattributes_in, sp.attr, k, subplot_index, remove_pair)
|
||||||
end
|
end
|
||||||
@ -2086,6 +2018,7 @@ function _update_subplot_args(
|
|||||||
lims_warned = true
|
lims_warned = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
_update_subplot_colorbars(sp)
|
||||||
end
|
end
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
@ -2262,16 +2195,7 @@ end
|
|||||||
|
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
## inspired by Base.@kwdef
|
## inspired by Base.@kwdef
|
||||||
"""
|
macro add_attributes(level, expr)
|
||||||
add_attributes(level, expr, match_table)
|
|
||||||
|
|
||||||
Takes a `struct` definition and recurses into its fields to create keywords by chaining the field names with the structs' name with underscore.
|
|
||||||
Also creates pluralized and non-underscore aliases for these keywords.
|
|
||||||
- `level` indicates which group of `plot`, `subplot`, `series`, etc. the keywords belong to.
|
|
||||||
- `expr` is the struct definition with default values like `Base.@kwdef`
|
|
||||||
- `match_table` is an expression of the form `:match = (symbols)`, with symbols whose default value should be `:match`
|
|
||||||
"""
|
|
||||||
macro add_attributes(level, expr, match_table)
|
|
||||||
expr = macroexpand(__module__, expr) # to expand @static
|
expr = macroexpand(__module__, expr) # to expand @static
|
||||||
expr isa Expr && expr.head === :struct || error("Invalid usage of @add_attributes")
|
expr isa Expr && expr.head === :struct || error("Invalid usage of @add_attributes")
|
||||||
T = expr.args[2]
|
T = expr.args[2]
|
||||||
@ -2279,18 +2203,16 @@ macro add_attributes(level, expr, match_table)
|
|||||||
T = T.args[1]
|
T = T.args[1]
|
||||||
end
|
end
|
||||||
|
|
||||||
key_dict = KW()
|
key_args = Any[]
|
||||||
|
value_args = Any[]
|
||||||
|
|
||||||
_splitdef!(expr.args[3], key_dict)
|
_splitdef!(expr.args[3], value_args, key_args)
|
||||||
|
|
||||||
insert_block = Expr(:block)
|
insert_block = Expr(:block)
|
||||||
for (key, value) in key_dict
|
for (key, value) in zip(key_args, value_args)
|
||||||
# e.g. _series_defualts[key] = value
|
# e.g. _series_defualts[key] = value
|
||||||
exp_key = Symbol(lowercase(string(T)), "_", key)
|
exp_key = Symbol(lowercase(string(T)), "_", key)
|
||||||
pl_key = makeplural(exp_key)
|
pl_key = makeplural(exp_key)
|
||||||
if QuoteNode(exp_key) in match_table.args[2].args
|
|
||||||
value = QuoteNode(:match)
|
|
||||||
end
|
|
||||||
push!(
|
push!(
|
||||||
insert_block.args,
|
insert_block.args,
|
||||||
Expr(
|
Expr(
|
||||||
@ -2324,7 +2246,7 @@ macro add_attributes(level, expr, match_table)
|
|||||||
end |> esc
|
end |> esc
|
||||||
end
|
end
|
||||||
|
|
||||||
function _splitdef!(blk, key_dict)
|
function _splitdef!(blk, value_args, key_args)
|
||||||
for i in eachindex(blk.args)
|
for i in eachindex(blk.args)
|
||||||
ei = blk.args[i]
|
ei = blk.args[i]
|
||||||
if ei isa Symbol
|
if ei isa Symbol
|
||||||
@ -2339,25 +2261,20 @@ function _splitdef!(blk, key_dict)
|
|||||||
elseif lhs isa Expr && lhs.head === :(::) && lhs.args[1] isa Symbol
|
elseif lhs isa Expr && lhs.head === :(::) && lhs.args[1] isa Symbol
|
||||||
# var::T = defexpr
|
# var::T = defexpr
|
||||||
var = lhs.args[1]
|
var = lhs.args[1]
|
||||||
type = lhs.args[2]
|
|
||||||
if @isdefined type
|
|
||||||
for field in fieldnames(getproperty(Plots, type))
|
|
||||||
key_dict[Symbol(var, "_", field)] =
|
|
||||||
:(getfield($(ei.args[2]), $(QuoteNode(field))))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
# something else, e.g. inline inner constructor
|
# something else, e.g. inline inner constructor
|
||||||
# F(...) = ...
|
# F(...) = ...
|
||||||
continue
|
continue
|
||||||
end
|
end
|
||||||
defexpr = ei.args[2] # defexpr
|
defexpr = ei.args[2] # defexpr
|
||||||
key_dict[var] = defexpr
|
push!(value_args, defexpr)
|
||||||
|
push!(key_args, var)
|
||||||
blk.args[i] = lhs
|
blk.args[i] = lhs
|
||||||
elseif ei.head === :(::) && ei.args[1] isa Symbol
|
elseif ei.head === :(::) && ei.args[1] isa Symbol
|
||||||
# var::Typ
|
# var::Typ
|
||||||
var = ei.args[1]
|
var = ei.args[1]
|
||||||
key_dict[var] = defexpr
|
push!(value_args, var)
|
||||||
|
push!(key_args, var)
|
||||||
elseif ei.head === :block
|
elseif ei.head === :block
|
||||||
# can arise with use of @static inside type decl
|
# can arise with use of @static inside type decl
|
||||||
_kwdef!(ei, value_args, key_args)
|
_kwdef!(ei, value_args, key_args)
|
||||||
|
|||||||
10
src/axes.jl
10
src/axes.jl
@ -675,17 +675,9 @@ end
|
|||||||
# these methods track the discrete (categorical) values which correspond to axis continuous values (cv)
|
# these methods track the discrete (categorical) values which correspond to axis continuous values (cv)
|
||||||
# whenever we have discrete values, we automatically set the ticks to match.
|
# whenever we have discrete values, we automatically set the ticks to match.
|
||||||
# we return (continuous_value, discrete_index)
|
# we return (continuous_value, discrete_index)
|
||||||
function discrete_value!(plotattributes, letter::Symbol, dv)
|
|
||||||
l = if plotattributes[:permute] !== :none
|
|
||||||
only(filter(!=(letter), plotattributes[:permute]))
|
|
||||||
else
|
|
||||||
letter
|
|
||||||
end
|
|
||||||
discrete_value!(plotattributes[:subplot][get_attr_symbol(l, :axis)], dv)
|
|
||||||
end
|
|
||||||
|
|
||||||
function discrete_value!(axis::Axis, dv)
|
function discrete_value!(axis::Axis, dv)
|
||||||
cv_idx = get(axis[:discrete_map], dv, -1)
|
cv_idx = get(axis[:discrete_map], dv, -1)
|
||||||
|
# @show axis[:discrete_map], axis[:discrete_values], dv
|
||||||
if cv_idx == -1
|
if cv_idx == -1
|
||||||
ex = axis[:extrema]
|
ex = axis[:extrema]
|
||||||
cv = NaNMath.max(0.5, ex.emax + 1.0)
|
cv = NaNMath.max(0.5, ex.emax + 1.0)
|
||||||
|
|||||||
187
src/backends.jl
187
src/backends.jl
@ -240,8 +240,6 @@ const _base_supported_args = [
|
|||||||
:discrete_values,
|
:discrete_values,
|
||||||
:projection,
|
:projection,
|
||||||
:show_empty_bins,
|
:show_empty_bins,
|
||||||
:z_order,
|
|
||||||
:permute,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
function merge_with_base_supported(v::AVec)
|
function merge_with_base_supported(v::AVec)
|
||||||
@ -286,7 +284,7 @@ for s in (:attr, :seriestype, :marker, :style, :scale)
|
|||||||
v = Symbol("_", bend, "_", s)
|
v = Symbol("_", bend, "_", s)
|
||||||
@eval begin
|
@eval begin
|
||||||
$f(::$bend_type, $s::Symbol) = $s in $v
|
$f(::$bend_type, $s::Symbol) = $s in $v
|
||||||
$f2(::$bend_type) = sort(collect($v))
|
$f2(::$bend_type) = $v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -302,32 +300,20 @@ function _initialize_backend(pkg::AbstractBackend)
|
|||||||
@eval Main begin
|
@eval Main begin
|
||||||
import $sym
|
import $sym
|
||||||
export $sym
|
export $sym
|
||||||
$(_check_compat)($sym)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
_initialize_backend(pkg::GRBackend) = nothing
|
_initialize_backend(pkg::GRBackend) = nothing
|
||||||
|
|
||||||
function _initialize_backend(pkg::PlotlyBackend)
|
|
||||||
try
|
|
||||||
@eval Main begin
|
|
||||||
import PlotlyBase
|
|
||||||
end
|
|
||||||
_check_compat(PlotlyBase)
|
|
||||||
catch
|
|
||||||
@info "For saving to png with the Plotly backend PlotlyBase has to be installed."
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# gr
|
# gr
|
||||||
|
|
||||||
const _gr_attr = merge_with_base_supported([
|
const _gr_attr = merge_with_base_supported([
|
||||||
:annotations,
|
:annotations,
|
||||||
:legend_background_color,
|
:background_color_legend,
|
||||||
:background_color_inside,
|
:background_color_inside,
|
||||||
:background_color_outside,
|
:background_color_outside,
|
||||||
:legend_foreground_color,
|
:foreground_color_legend,
|
||||||
:foreground_color_grid,
|
:foreground_color_grid,
|
||||||
:foreground_color_axis,
|
:foreground_color_axis,
|
||||||
:foreground_color_text,
|
:foreground_color_text,
|
||||||
@ -349,7 +335,6 @@ const _gr_attr = merge_with_base_supported([
|
|||||||
:fillrange,
|
:fillrange,
|
||||||
:fillcolor,
|
:fillcolor,
|
||||||
:fillalpha,
|
:fillalpha,
|
||||||
:fillstyle,
|
|
||||||
:bins,
|
:bins,
|
||||||
:layout,
|
:layout,
|
||||||
:title,
|
:title,
|
||||||
@ -365,12 +350,12 @@ const _gr_attr = merge_with_base_supported([
|
|||||||
:titlefontvalign,
|
:titlefontvalign,
|
||||||
:titlefontrotation,
|
:titlefontrotation,
|
||||||
:titlefontcolor,
|
:titlefontcolor,
|
||||||
:legend_font_family,
|
:legendfontfamily,
|
||||||
:legend_font_pointsize,
|
:legendfontsize,
|
||||||
:legend_font_halign,
|
:legendfonthalign,
|
||||||
:legend_font_valign,
|
:legendfontvalign,
|
||||||
:legend_font_rotation,
|
:legendfontrotation,
|
||||||
:legend_font_color,
|
:legendfontcolor,
|
||||||
:tickfontfamily,
|
:tickfontfamily,
|
||||||
:tickfontsize,
|
:tickfontsize,
|
||||||
:tickfonthalign,
|
:tickfonthalign,
|
||||||
@ -387,13 +372,17 @@ const _gr_attr = merge_with_base_supported([
|
|||||||
:gridalpha,
|
:gridalpha,
|
||||||
:gridstyle,
|
:gridstyle,
|
||||||
:gridlinewidth,
|
:gridlinewidth,
|
||||||
:legend_position,
|
:legend,
|
||||||
:legend_title,
|
:legendtitle,
|
||||||
:colorbar,
|
:colorbar,
|
||||||
:colorbar_title,
|
:colorbar_title,
|
||||||
:colorbar_entry,
|
:colorbar_entry,
|
||||||
:colorbar_scale,
|
:colorbar_titlefontfamily,
|
||||||
:clims,
|
:colorbar_titlefontsize,
|
||||||
|
:colorbar_titlefontvalign,
|
||||||
|
:colorbar_titlefonthalign,
|
||||||
|
:colorbar_titlefontrotation,
|
||||||
|
:colorbar_titlefontcolor,
|
||||||
:fill_z,
|
:fill_z,
|
||||||
:line_z,
|
:line_z,
|
||||||
:marker_z,
|
:marker_z,
|
||||||
@ -413,7 +402,6 @@ const _gr_attr = merge_with_base_supported([
|
|||||||
:tick_direction,
|
:tick_direction,
|
||||||
:camera,
|
:camera,
|
||||||
:contour_labels,
|
:contour_labels,
|
||||||
:connections,
|
|
||||||
])
|
])
|
||||||
const _gr_seriestype = [
|
const _gr_seriestype = [
|
||||||
:path,
|
:path,
|
||||||
@ -438,12 +426,22 @@ is_marker_supported(::GRBackend, shape::Shape) = true
|
|||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# plotly
|
# plotly
|
||||||
|
|
||||||
|
function _initialize_backend(pkg::PlotlyBackend)
|
||||||
|
try
|
||||||
|
@eval Main begin
|
||||||
|
import PlotlyBase
|
||||||
|
end
|
||||||
|
catch
|
||||||
|
@info "For saving to png with the Plotly backend PlotlyBase has to be installed."
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
const _plotly_attr = merge_with_base_supported([
|
const _plotly_attr = merge_with_base_supported([
|
||||||
:annotations,
|
:annotations,
|
||||||
:legend_background_color,
|
:background_color_legend,
|
||||||
:background_color_inside,
|
:background_color_inside,
|
||||||
:background_color_outside,
|
:background_color_outside,
|
||||||
:legend_foreground_color,
|
:foreground_color_legend,
|
||||||
:foreground_color_guide,
|
:foreground_color_guide,
|
||||||
:foreground_color_grid,
|
:foreground_color_grid,
|
||||||
:foreground_color_axis,
|
:foreground_color_axis,
|
||||||
@ -476,9 +474,9 @@ const _plotly_attr = merge_with_base_supported([
|
|||||||
:titlefonthalign,
|
:titlefonthalign,
|
||||||
:titlefontvalign,
|
:titlefontvalign,
|
||||||
:titlefontcolor,
|
:titlefontcolor,
|
||||||
:legend_font_family,
|
:legendfontfamily,
|
||||||
:legend_font_pointsize,
|
:legendfontsize,
|
||||||
:legend_font_color,
|
:legendfontcolor,
|
||||||
:tickfontfamily,
|
:tickfontfamily,
|
||||||
:tickfontsize,
|
:tickfontsize,
|
||||||
:tickfontcolor,
|
:tickfontcolor,
|
||||||
@ -523,7 +521,6 @@ const _plotly_attr = merge_with_base_supported([
|
|||||||
:tick_direction,
|
:tick_direction,
|
||||||
:camera,
|
:camera,
|
||||||
:contour_labels,
|
:contour_labels,
|
||||||
:connections,
|
|
||||||
])
|
])
|
||||||
|
|
||||||
const _plotly_seriestype = [
|
const _plotly_seriestype = [
|
||||||
@ -566,10 +563,10 @@ defaultOutputFormat(plt::Plot{Plots.PlotlyBackend}) = "html"
|
|||||||
|
|
||||||
const _pgfplots_attr = merge_with_base_supported([
|
const _pgfplots_attr = merge_with_base_supported([
|
||||||
:annotations,
|
:annotations,
|
||||||
:legend_background_color,
|
:background_color_legend,
|
||||||
:background_color_inside,
|
:background_color_inside,
|
||||||
# :background_color_outside,
|
# :background_color_outside,
|
||||||
# :legend_foreground_color,
|
# :foreground_color_legend,
|
||||||
:foreground_color_grid,
|
:foreground_color_grid,
|
||||||
:foreground_color_axis,
|
:foreground_color_axis,
|
||||||
:foreground_color_text,
|
:foreground_color_text,
|
||||||
@ -689,11 +686,11 @@ end
|
|||||||
|
|
||||||
const _pyplot_attr = merge_with_base_supported([
|
const _pyplot_attr = merge_with_base_supported([
|
||||||
:annotations,
|
:annotations,
|
||||||
:legend_background_color,
|
:background_color_legend,
|
||||||
:background_color_inside,
|
:background_color_inside,
|
||||||
:background_color_outside,
|
:background_color_outside,
|
||||||
:foreground_color_grid,
|
:foreground_color_grid,
|
||||||
:legend_foreground_color,
|
:foreground_color_legend,
|
||||||
:foreground_color_title,
|
:foreground_color_title,
|
||||||
:foreground_color_axis,
|
:foreground_color_axis,
|
||||||
:foreground_color_border,
|
:foreground_color_border,
|
||||||
@ -732,9 +729,9 @@ const _pyplot_attr = merge_with_base_supported([
|
|||||||
:titlefontfamily,
|
:titlefontfamily,
|
||||||
:titlefontsize,
|
:titlefontsize,
|
||||||
:titlefontcolor,
|
:titlefontcolor,
|
||||||
:legend_font_family,
|
:legendfontfamily,
|
||||||
:legend_font_pointsize,
|
:legendfontsize,
|
||||||
:legend_font_color,
|
:legendfontcolor,
|
||||||
:tickfontfamily,
|
:tickfontfamily,
|
||||||
:tickfontsize,
|
:tickfontsize,
|
||||||
:tickfontcolor,
|
:tickfontcolor,
|
||||||
@ -745,8 +742,8 @@ const _pyplot_attr = merge_with_base_supported([
|
|||||||
:gridalpha,
|
:gridalpha,
|
||||||
:gridstyle,
|
:gridstyle,
|
||||||
:gridlinewidth,
|
:gridlinewidth,
|
||||||
:legend_position,
|
:legend,
|
||||||
:legend_title,
|
:legendtitle,
|
||||||
:colorbar,
|
:colorbar,
|
||||||
:colorbar_title,
|
:colorbar_title,
|
||||||
:colorbar_entry,
|
:colorbar_entry,
|
||||||
@ -780,7 +777,6 @@ const _pyplot_attr = merge_with_base_supported([
|
|||||||
:tick_direction,
|
:tick_direction,
|
||||||
:camera,
|
:camera,
|
||||||
:contour_labels,
|
:contour_labels,
|
||||||
:connections,
|
|
||||||
])
|
])
|
||||||
const _pyplot_seriestype = [
|
const _pyplot_seriestype = [
|
||||||
:path,
|
:path,
|
||||||
@ -797,7 +793,6 @@ const _pyplot_seriestype = [
|
|||||||
:contour3d,
|
:contour3d,
|
||||||
:path3d,
|
:path3d,
|
||||||
:scatter3d,
|
:scatter3d,
|
||||||
:mesh3d,
|
|
||||||
:surface,
|
:surface,
|
||||||
:wireframe,
|
:wireframe,
|
||||||
]
|
]
|
||||||
@ -865,7 +860,6 @@ const _gaston_attr = merge_with_base_supported([
|
|||||||
# :framestyle,
|
# :framestyle,
|
||||||
# :camera,
|
# :camera,
|
||||||
# :contour_labels,
|
# :contour_labels,
|
||||||
:connections,
|
|
||||||
])
|
])
|
||||||
|
|
||||||
const _gaston_seriestype = [
|
const _gaston_seriestype = [
|
||||||
@ -916,87 +910,44 @@ const _gaston_scale = [:identity, :ln, :log2, :log10]
|
|||||||
# unicodeplots
|
# unicodeplots
|
||||||
|
|
||||||
const _unicodeplots_attr = merge_with_base_supported([
|
const _unicodeplots_attr = merge_with_base_supported([
|
||||||
:annotations,
|
|
||||||
:bins,
|
|
||||||
:guide,
|
|
||||||
:grid,
|
|
||||||
:label,
|
:label,
|
||||||
:layout,
|
|
||||||
:legend,
|
:legend,
|
||||||
:lims,
|
:seriescolor,
|
||||||
:linealpha,
|
:seriesalpha,
|
||||||
:linecolor,
|
|
||||||
:linestyle,
|
:linestyle,
|
||||||
:markershape,
|
:markershape,
|
||||||
:quiver,
|
:bins,
|
||||||
:arrow,
|
|
||||||
:seriesalpha,
|
|
||||||
:seriescolor,
|
|
||||||
:scale,
|
|
||||||
:flip,
|
|
||||||
:title,
|
:title,
|
||||||
# :marker_z,
|
:guide,
|
||||||
:line_z,
|
:lims,
|
||||||
])
|
])
|
||||||
const _unicodeplots_seriestype = [
|
const _unicodeplots_seriestype = [
|
||||||
:path,
|
:path,
|
||||||
:path3d,
|
|
||||||
:scatter,
|
:scatter,
|
||||||
:scatter3d,
|
|
||||||
:straightline,
|
:straightline,
|
||||||
# :bar,
|
# :bar,
|
||||||
:shape,
|
:shape,
|
||||||
:histogram2d,
|
:histogram2d,
|
||||||
:heatmap,
|
:heatmap,
|
||||||
:contour,
|
|
||||||
# :contour3d,
|
|
||||||
:permute,
|
|
||||||
:spy,
|
:spy,
|
||||||
:surface,
|
|
||||||
:wireframe,
|
|
||||||
:mesh3d,
|
|
||||||
]
|
]
|
||||||
const _unicodeplots_style = [:auto, :solid]
|
const _unicodeplots_style = [:auto, :solid]
|
||||||
const _unicodeplots_marker = [
|
const _unicodeplots_marker = [:none, :auto, :circle]
|
||||||
:none,
|
|
||||||
:auto,
|
|
||||||
:pixel,
|
|
||||||
# vvvvvvvvvv shapes
|
|
||||||
:circle,
|
|
||||||
:rect,
|
|
||||||
:star5,
|
|
||||||
:diamond,
|
|
||||||
:hexagon,
|
|
||||||
:cross,
|
|
||||||
:xcross,
|
|
||||||
:utriangle,
|
|
||||||
:dtriangle,
|
|
||||||
:rtriangle,
|
|
||||||
:ltriangle,
|
|
||||||
:pentagon,
|
|
||||||
# :heptagon,
|
|
||||||
# :octagon,
|
|
||||||
:star4,
|
|
||||||
:star6,
|
|
||||||
# :star7,
|
|
||||||
:star8,
|
|
||||||
:vline,
|
|
||||||
:hline,
|
|
||||||
:+,
|
|
||||||
:x,
|
|
||||||
]
|
|
||||||
const _unicodeplots_scale = [:identity, :ln, :log2, :log10]
|
const _unicodeplots_scale = [:identity, :ln, :log2, :log10]
|
||||||
|
|
||||||
|
# Additional constants
|
||||||
|
const _canvas_type = Ref(:auto)
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# hdf5
|
# hdf5
|
||||||
|
|
||||||
const _hdf5_attr = merge_with_base_supported([
|
const _hdf5_attr = merge_with_base_supported([
|
||||||
:annotations,
|
:annotations,
|
||||||
:legend_background_color,
|
:background_color_legend,
|
||||||
:background_color_inside,
|
:background_color_inside,
|
||||||
:background_color_outside,
|
:background_color_outside,
|
||||||
:foreground_color_grid,
|
:foreground_color_grid,
|
||||||
:legend_foreground_color,
|
:foreground_color_legend,
|
||||||
:foreground_color_title,
|
:foreground_color_title,
|
||||||
:foreground_color_axis,
|
:foreground_color_axis,
|
||||||
:foreground_color_border,
|
:foreground_color_border,
|
||||||
@ -1094,11 +1045,11 @@ const HDF5PLOT_PLOTREF = HDF5Plot_PlotRef(nothing)
|
|||||||
|
|
||||||
const _inspectdr_attr = merge_with_base_supported([
|
const _inspectdr_attr = merge_with_base_supported([
|
||||||
:annotations,
|
:annotations,
|
||||||
:legend_background_color,
|
:background_color_legend,
|
||||||
:background_color_inside,
|
:background_color_inside,
|
||||||
:background_color_outside,
|
:background_color_outside,
|
||||||
# :foreground_color_grid,
|
# :foreground_color_grid,
|
||||||
:legend_foreground_color,
|
:foreground_color_legend,
|
||||||
:foreground_color_title,
|
:foreground_color_title,
|
||||||
:foreground_color_axis,
|
:foreground_color_axis,
|
||||||
:foreground_color_border,
|
:foreground_color_border,
|
||||||
@ -1131,9 +1082,9 @@ const _inspectdr_attr = merge_with_base_supported([
|
|||||||
:titlefontfamily,
|
:titlefontfamily,
|
||||||
:titlefontsize,
|
:titlefontsize,
|
||||||
:titlefontcolor,
|
:titlefontcolor,
|
||||||
:legend_font_family,
|
:legendfontfamily,
|
||||||
:legend_font_pointsize,
|
:legendfontsize,
|
||||||
:legend_font_color,
|
:legendfontcolor,
|
||||||
:tickfontfamily,
|
:tickfontfamily,
|
||||||
:tickfontsize,
|
:tickfontsize,
|
||||||
:tickfontcolor,
|
:tickfontcolor,
|
||||||
@ -1141,7 +1092,7 @@ const _inspectdr_attr = merge_with_base_supported([
|
|||||||
:guidefontsize,
|
:guidefontsize,
|
||||||
:guidefontcolor,
|
:guidefontcolor,
|
||||||
:grid,
|
:grid,
|
||||||
:legend_position, #:colorbar,
|
:legend, #:colorbar,
|
||||||
# :marker_z,
|
# :marker_z,
|
||||||
# :line_z,
|
# :line_z,
|
||||||
# :levels,
|
# :levels,
|
||||||
@ -1197,10 +1148,10 @@ const _inspectdr_scale = [:identity, :ln, :log2, :log10]
|
|||||||
|
|
||||||
const _pgfplotsx_attr = merge_with_base_supported([
|
const _pgfplotsx_attr = merge_with_base_supported([
|
||||||
:annotations,
|
:annotations,
|
||||||
:legend_background_color,
|
:background_color_legend,
|
||||||
:background_color_inside,
|
:background_color_inside,
|
||||||
:background_color_outside,
|
:background_color_outside,
|
||||||
:legend_foreground_color,
|
:foreground_color_legend,
|
||||||
:foreground_color_grid,
|
:foreground_color_grid,
|
||||||
:foreground_color_axis,
|
:foreground_color_axis,
|
||||||
:foreground_color_text,
|
:foreground_color_text,
|
||||||
@ -1237,12 +1188,12 @@ const _pgfplotsx_attr = merge_with_base_supported([
|
|||||||
:titlefontvalign,
|
:titlefontvalign,
|
||||||
:titlefontrotation,
|
:titlefontrotation,
|
||||||
:titlefontcolor,
|
:titlefontcolor,
|
||||||
:legend_font_family,
|
:legendfontfamily,
|
||||||
:legend_font_pointsize,
|
:legendfontsize,
|
||||||
:legend_font_halign,
|
:legendfonthalign,
|
||||||
:legend_font_valign,
|
:legendfontvalign,
|
||||||
:legend_font_rotation,
|
:legendfontrotation,
|
||||||
:legend_font_color,
|
:legendfontcolor,
|
||||||
:tickfontfamily,
|
:tickfontfamily,
|
||||||
:tickfontsize,
|
:tickfontsize,
|
||||||
:tickfonthalign,
|
:tickfonthalign,
|
||||||
@ -1259,8 +1210,8 @@ const _pgfplotsx_attr = merge_with_base_supported([
|
|||||||
:gridalpha,
|
:gridalpha,
|
||||||
:gridstyle,
|
:gridstyle,
|
||||||
:gridlinewidth,
|
:gridlinewidth,
|
||||||
:legend_position,
|
:legend,
|
||||||
:legend_title,
|
:legendtitle,
|
||||||
:colorbar,
|
:colorbar,
|
||||||
:colorbar_title,
|
:colorbar_title,
|
||||||
:colorbar_entry,
|
:colorbar_entry,
|
||||||
@ -1283,7 +1234,6 @@ const _pgfplotsx_attr = merge_with_base_supported([
|
|||||||
:tick_direction,
|
:tick_direction,
|
||||||
:camera,
|
:camera,
|
||||||
:contour_labels,
|
:contour_labels,
|
||||||
:connections,
|
|
||||||
])
|
])
|
||||||
const _pgfplotsx_seriestype = [
|
const _pgfplotsx_seriestype = [
|
||||||
:path,
|
:path,
|
||||||
@ -1323,6 +1273,7 @@ const _pgfplotsx_marker = [
|
|||||||
:pentagon,
|
:pentagon,
|
||||||
:hline,
|
:hline,
|
||||||
:vline,
|
:vline,
|
||||||
|
Shape,
|
||||||
]
|
]
|
||||||
const _pgfplotsx_scale = [:identity, :ln, :log2, :log10]
|
const _pgfplotsx_scale = [:identity, :ln, :log2, :log10]
|
||||||
is_marker_supported(::PGFPlotsXBackend, shape::Shape) = true
|
is_marker_supported(::PGFPlotsXBackend, shape::Shape) = true
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
# significant contributions by: @pkofod
|
# significant contributions by: @pkofod
|
||||||
|
|
||||||
# --------------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------------
|
||||||
# COV_EXCL_START
|
|
||||||
const _pgfplots_linestyles = KW(
|
const _pgfplots_linestyles = KW(
|
||||||
:solid => "solid",
|
:solid => "solid",
|
||||||
:dash => "dashed",
|
:dash => "dashed",
|
||||||
@ -227,7 +227,7 @@ function pgf_series(sp::Subplot, series::Series)
|
|||||||
end
|
end
|
||||||
|
|
||||||
# add to legend?
|
# add to legend?
|
||||||
if i == 1 && sp[:legend_position] != :none && should_add_to_legend(series)
|
if i == 1 && sp[:legend] != :none && should_add_to_legend(series)
|
||||||
if plotattributes[:fillrange] !== nothing
|
if plotattributes[:fillrange] !== nothing
|
||||||
push!(style, "forget plot")
|
push!(style, "forget plot")
|
||||||
push!(series_collection, pgf_fill_legend_hack(plotattributes, args))
|
push!(series_collection, pgf_fill_legend_hack(plotattributes, args))
|
||||||
@ -590,12 +590,12 @@ function _update_plot_object(plt::Plot{PGFPlotsBackend})
|
|||||||
kw[:axisEqual] = "true"
|
kw[:axisEqual] = "true"
|
||||||
end
|
end
|
||||||
|
|
||||||
legpos = sp[:legend_position]
|
legpos = sp[:legend]
|
||||||
if haskey(_pgfplots_legend_pos, legpos)
|
if haskey(_pgfplots_legend_pos, legpos)
|
||||||
kw[:legendPos] = _pgfplots_legend_pos[legpos]
|
kw[:legendPos] = _pgfplots_legend_pos[legpos]
|
||||||
end
|
end
|
||||||
cstr, bg_alpha = pgf_color(plot_color(sp[:legend_background_color]))
|
cstr, bg_alpha = pgf_color(plot_color(sp[:background_color_legend]))
|
||||||
fg_alpha = alpha(plot_color(sp[:legend_foreground_color]))
|
fg_alpha = alpha(plot_color(sp[:foreground_color_legend]))
|
||||||
|
|
||||||
push!(
|
push!(
|
||||||
style,
|
style,
|
||||||
@ -603,16 +603,16 @@ function _update_plot_object(plt::Plot{PGFPlotsBackend})
|
|||||||
"legend style = {",
|
"legend style = {",
|
||||||
pgf_linestyle(
|
pgf_linestyle(
|
||||||
pgf_thickness_scaling(sp),
|
pgf_thickness_scaling(sp),
|
||||||
sp[:legend_foreground_color],
|
sp[:foreground_color_legend],
|
||||||
fg_alpha,
|
fg_alpha,
|
||||||
"solid",
|
"solid",
|
||||||
),
|
),
|
||||||
",",
|
",",
|
||||||
"fill = $cstr,",
|
"fill = $cstr,",
|
||||||
"fill opacity = $bg_alpha,",
|
"fill opacity = $bg_alpha,",
|
||||||
"text opacity = $(alpha(plot_color(sp[:legend_font_color]))),",
|
"text opacity = $(alpha(plot_color(sp[:legendfontcolor]))),",
|
||||||
"font = ",
|
"font = ",
|
||||||
pgf_font(sp[:legend_font_pointsize], pgf_thickness_scaling(sp)),
|
pgf_font(sp[:legendfontsize], pgf_thickness_scaling(sp)),
|
||||||
"}",
|
"}",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -740,5 +740,3 @@ function _display(plt::Plot{PGFPlotsBackend})
|
|||||||
# cleanup
|
# cleanup
|
||||||
PGFPlots.cleanup(plt.o)
|
PGFPlots.cleanup(plt.o)
|
||||||
end
|
end
|
||||||
|
|
||||||
# COV_EXCL_STOP
|
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
# https://github.com/mbaz/Gaston.
|
# https://github.com/mbaz/Gaston.
|
||||||
|
|
||||||
should_warn_on_unsupported(::GastonBackend) = false
|
# --------------------------------------------
|
||||||
|
# These functions are called by Plots
|
||||||
|
# --------------------------------------------
|
||||||
|
|
||||||
# Create the window/figure for this backend.
|
# Create the window/figure for this backend.
|
||||||
function _create_backend_figure(plt::Plot{GastonBackend})
|
function _create_backend_figure(plt::Plot{GastonBackend})
|
||||||
@ -110,7 +112,7 @@ function gaston_saveopts(plt::Plot{GastonBackend})
|
|||||||
|
|
||||||
# Scale all plot elements to match Plots.jl DPI standard
|
# Scale all plot elements to match Plots.jl DPI standard
|
||||||
scaling = plt.attr[:dpi] / Plots.DPI
|
scaling = plt.attr[:dpi] / Plots.DPI
|
||||||
push!(saveopts, "fontscale $scaling lw $scaling dl $scaling") # ps $scaling
|
push!(saveopts, "fontscale $scaling lw $scaling dl $scaling ps $scaling")
|
||||||
|
|
||||||
return join(saveopts, " ")
|
return join(saveopts, " ")
|
||||||
end
|
end
|
||||||
@ -244,9 +246,10 @@ function gaston_add_series(plt::Plot{GastonBackend}, series::Series)
|
|||||||
if (lx = length(x)) == 2 && lx != nc
|
if (lx = length(x)) == 2 && lx != nc
|
||||||
x = collect(range(x[1], x[2], length = nc))
|
x = collect(range(x[1], x[2], length = nc))
|
||||||
end
|
end
|
||||||
|
elseif st == :heatmap
|
||||||
|
length(x) == size(z, 2) + 1 && (x = @view x[1:(end - 1)])
|
||||||
|
length(y) == size(z, 1) + 1 && (y = @view y[1:(end - 1)])
|
||||||
end
|
end
|
||||||
length(x) == size(z, 2) + 1 && (x = (x[1:(end - 1)] + x[2:end]) / 2)
|
|
||||||
length(y) == size(z, 1) + 1 && (y = (y[1:(end - 1)] + y[2:end]) / 2)
|
|
||||||
end
|
end
|
||||||
if st == :mesh3d
|
if st == :mesh3d
|
||||||
x, y, z = mesh3d_triangles(x, y, z, series[:connections])
|
x, y, z = mesh3d_triangles(x, y, z, series[:connections])
|
||||||
@ -502,8 +505,8 @@ function gaston_set_ticks!(axesconf, ticks, letter, maj_min, add)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function gaston_set_legend!(axesconf, sp, any_label)
|
function gaston_set_legend!(axesconf, sp, any_label)
|
||||||
leg = sp[:legend_position]
|
leg = sp[:legend]
|
||||||
if sp[:legend_position] ∉ (:none, :inline) && any_label
|
if sp[:legend] ∉ (:none, :inline) && any_label
|
||||||
leg == :best && (leg = :topright)
|
leg == :best && (leg = :topright)
|
||||||
|
|
||||||
push!(
|
push!(
|
||||||
@ -514,9 +517,9 @@ function gaston_set_legend!(axesconf, sp, any_label)
|
|||||||
occursin(position, string(leg)) && push!(axesconf, "set key $position")
|
occursin(position, string(leg)) && push!(axesconf, "set key $position")
|
||||||
end
|
end
|
||||||
push!(axesconf, "set key $(gaston_font(legendfont(sp), rot=false, align=false))")
|
push!(axesconf, "set key $(gaston_font(legendfont(sp), rot=false, align=false))")
|
||||||
if sp[:legend_title] !== nothing
|
if sp[:legendtitle] !== nothing
|
||||||
# NOTE: cannot use legendtitlefont(sp) as it will override legendfont
|
# NOTE: cannot use legendtitlefont(sp) as it will override legendfont
|
||||||
push!(axesconf, "set key title '$(sp[:legend_title])'")
|
push!(axesconf, "set key title '$(sp[:legendtitle])'")
|
||||||
end
|
end
|
||||||
push!(axesconf, "set key box lw 1 opaque")
|
push!(axesconf, "set key box lw 1 opaque")
|
||||||
push!(axesconf, "set border back")
|
push!(axesconf, "set border back")
|
||||||
|
|||||||
@ -104,9 +104,6 @@ function gr_color(c, ::Type{<:AbstractGray})
|
|||||||
end
|
end
|
||||||
gr_color(c, ::Type) = gr_color(RGBA(c), RGB)
|
gr_color(c, ::Type) = gr_color(RGBA(c), RGB)
|
||||||
|
|
||||||
set_RGBA_alpha(alpha, c::RGBA) = RGBA(red(c), green(c), blue(c), alpha)
|
|
||||||
set_RGBA_alpha(alpha::Nothing, c::RGBA) = c
|
|
||||||
|
|
||||||
function gr_getcolorind(c)
|
function gr_getcolorind(c)
|
||||||
gr_set_transparency(float(alpha(c)))
|
gr_set_transparency(float(alpha(c)))
|
||||||
convert(Int, GR.inqcolorfromrgb(red(c), green(c), blue(c)))
|
convert(Int, GR.inqcolorfromrgb(red(c), green(c), blue(c)))
|
||||||
@ -228,8 +225,9 @@ end
|
|||||||
gr_inqtext(x, y, s) = gr_inqtext(x, y, string(s))
|
gr_inqtext(x, y, s) = gr_inqtext(x, y, string(s))
|
||||||
|
|
||||||
function gr_inqtext(x, y, s::AbstractString)
|
function gr_inqtext(x, y, s::AbstractString)
|
||||||
if (occursin('\\', s) || occursin("10^{", s)) &&
|
if length(s) >= 2 && s[1] == '$' && s[end] == '$'
|
||||||
match(r".*\$[^\$]+?\$.*", String(s)) == nothing
|
GR.inqmathtex(x, y, s[2:(end - 1)])
|
||||||
|
elseif occursin('\\', s) || occursin("10^{", s)
|
||||||
GR.inqtextext(x, y, s)
|
GR.inqtextext(x, y, s)
|
||||||
else
|
else
|
||||||
GR.inqtext(x, y, s)
|
GR.inqtext(x, y, s)
|
||||||
@ -239,8 +237,9 @@ end
|
|||||||
gr_text(x, y, s) = gr_text(x, y, string(s))
|
gr_text(x, y, s) = gr_text(x, y, string(s))
|
||||||
|
|
||||||
function gr_text(x, y, s::AbstractString)
|
function gr_text(x, y, s::AbstractString)
|
||||||
if (occursin('\\', s) || occursin("10^{", s)) &&
|
if length(s) >= 2 && s[1] == '$' && s[end] == '$'
|
||||||
match(r".*\$[^\$]+?\$.*", String(s)) == nothing
|
GR.mathtex(x, y, s[2:(end - 1)])
|
||||||
|
elseif occursin('\\', s) || occursin("10^{", s)
|
||||||
GR.textext(x, y, s)
|
GR.textext(x, y, s)
|
||||||
else
|
else
|
||||||
GR.text(x, y, s)
|
GR.text(x, y, s)
|
||||||
@ -413,7 +412,7 @@ function gr_set_font(
|
|||||||
gr_font_family[family] >= 200 ? 3 : GR.TEXT_PRECISION_STRING,
|
gr_font_family[family] >= 200 ? 3 : GR.TEXT_PRECISION_STRING,
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
gr_set_textcolor(plot_color(color))
|
gr_set_textcolor(color)
|
||||||
GR.settextalign(gr_halign(halign), gr_valign(valign))
|
GR.settextalign(gr_halign(halign), gr_valign(valign))
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -571,9 +570,6 @@ function gr_draw_colorbar(cbar::GRColorbar, sp::Subplot, clims, viewport_plotare
|
|||||||
|
|
||||||
ztick = 0.5 * GR.tick(zmin, zmax)
|
ztick = 0.5 * GR.tick(zmin, zmax)
|
||||||
gr_set_line(1, :solid, plot_color(:black), sp)
|
gr_set_line(1, :solid, plot_color(:black), sp)
|
||||||
if sp[:colorbar_scale] == :log10
|
|
||||||
GR.setscale(2)
|
|
||||||
end
|
|
||||||
GR.axes(0, ztick, xmax, zmin, 0, 1, 0.005)
|
GR.axes(0, ztick, xmax, zmin, 0, 1, 0.005)
|
||||||
|
|
||||||
title = if isa(sp[:colorbar_title], PlotText)
|
title = if isa(sp[:colorbar_title], PlotText)
|
||||||
@ -675,19 +671,31 @@ end
|
|||||||
|
|
||||||
function gr_set_tickfont(sp, letter)
|
function gr_set_tickfont(sp, letter)
|
||||||
axis = sp[get_attr_symbol(letter, :axis)]
|
axis = sp[get_attr_symbol(letter, :axis)]
|
||||||
|
|
||||||
|
# invalidate alignment changes for small rotations (|θ| < 45°)
|
||||||
|
trigger(rot) = abs(sind(rot)) < abs(cosd(rot)) ? 0 : sign(rot)
|
||||||
|
|
||||||
|
rot = axis[:rotation]
|
||||||
|
if letter === :x || (RecipesPipeline.is3d(sp) && letter === :y)
|
||||||
|
halign = (:left, :hcenter, :right)[trigger(rot) + 2]
|
||||||
|
valign = (axis[:mirror] ? :bottom : :top, :vcenter)[trigger(abs(rot)) + 1]
|
||||||
|
else
|
||||||
|
halign = (axis[:mirror] ? :left : :right, :hcenter)[trigger(abs(rot)) + 1]
|
||||||
|
valign = (:top, :vcenter, :bottom)[trigger(rot) + 2]
|
||||||
|
end
|
||||||
gr_set_font(
|
gr_set_font(
|
||||||
tickfont(axis),
|
tickfont(axis),
|
||||||
sp,
|
sp,
|
||||||
|
halign = halign,
|
||||||
|
valign = valign,
|
||||||
rotation = axis[:rotation],
|
rotation = axis[:rotation],
|
||||||
color = axis[:tickfontcolor],
|
color = axis[:tickfontcolor],
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
# size of the text with no rotation
|
|
||||||
function gr_text_size(str)
|
function gr_text_size(str)
|
||||||
GR.savestate()
|
GR.savestate()
|
||||||
GR.selntran(0)
|
GR.selntran(0)
|
||||||
GR.setcharup(0, 1)
|
|
||||||
xs, ys = gr_inqtext(0, 0, string(str))
|
xs, ys = gr_inqtext(0, 0, string(str))
|
||||||
l, r = extrema(xs)
|
l, r = extrema(xs)
|
||||||
b, t = extrema(ys)
|
b, t = extrema(ys)
|
||||||
@ -697,11 +705,9 @@ function gr_text_size(str)
|
|||||||
return w, h
|
return w, h
|
||||||
end
|
end
|
||||||
|
|
||||||
# size of the text with rotation applied
|
|
||||||
function gr_text_size(str, rot)
|
function gr_text_size(str, rot)
|
||||||
GR.savestate()
|
GR.savestate()
|
||||||
GR.selntran(0)
|
GR.selntran(0)
|
||||||
GR.setcharup(0, 1)
|
|
||||||
xs, ys = gr_inqtext(0, 0, string(str))
|
xs, ys = gr_inqtext(0, 0, string(str))
|
||||||
l, r = extrema(xs)
|
l, r = extrema(xs)
|
||||||
b, t = extrema(ys)
|
b, t = extrema(ys)
|
||||||
@ -714,21 +720,12 @@ end
|
|||||||
text_box_width(w, h, rot) = abs(cosd(rot)) * w + abs(cosd(rot + 90)) * h
|
text_box_width(w, h, rot) = abs(cosd(rot)) * w + abs(cosd(rot + 90)) * h
|
||||||
text_box_height(w, h, rot) = abs(sind(rot)) * w + abs(sind(rot + 90)) * h
|
text_box_height(w, h, rot) = abs(sind(rot)) * w + abs(sind(rot + 90)) * h
|
||||||
|
|
||||||
function gr_get_3d_axis_angle(cvs, nt, ft, letter)
|
|
||||||
length(cvs) < 2 && return 0
|
|
||||||
tickpoints = [gr_w3tondc(sort_3d_axes(cv, nt, ft, letter)...) for cv in cvs]
|
|
||||||
|
|
||||||
dx = tickpoints[2][1] - tickpoints[1][1]
|
|
||||||
dy = tickpoints[2][2] - tickpoints[1][2]
|
|
||||||
return atand(dy, dx)
|
|
||||||
end
|
|
||||||
|
|
||||||
function gr_get_ticks_size(ticks, rot)
|
function gr_get_ticks_size(ticks, rot)
|
||||||
w, h = 0.0, 0.0
|
w, h = 0.0, 0.0
|
||||||
for (cv, dv) in zip(ticks...)
|
for (cv, dv) in zip(ticks...)
|
||||||
wi, hi = gr_text_size(dv, rot)
|
wi, hi = gr_text_size(dv, rot)
|
||||||
w = NaNMath.max(w, wi)
|
w = max(w, wi)
|
||||||
h = NaNMath.max(h, hi)
|
h = max(h, hi)
|
||||||
end
|
end
|
||||||
return w, h
|
return w, h
|
||||||
end
|
end
|
||||||
@ -954,9 +951,6 @@ function get_z_normalized(z, clims...)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function gr_clims(args...)
|
function gr_clims(args...)
|
||||||
if args[1][:clims] != :auto
|
|
||||||
return get_clims(args[1])
|
|
||||||
end
|
|
||||||
lo, hi = get_clims(args...)
|
lo, hi = get_clims(args...)
|
||||||
if lo == hi
|
if lo == hi
|
||||||
if lo == 0
|
if lo == 0
|
||||||
@ -1028,7 +1022,7 @@ end
|
|||||||
## Legend
|
## Legend
|
||||||
|
|
||||||
function gr_add_legend(sp, leg, viewport_plotarea)
|
function gr_add_legend(sp, leg, viewport_plotarea)
|
||||||
if !(sp[:legend_position] in (:none, :inline))
|
if sp[:legend] ∉ (:none, :inline)
|
||||||
GR.savestate()
|
GR.savestate()
|
||||||
GR.selntran(0)
|
GR.selntran(0)
|
||||||
GR.setscale(0)
|
GR.setscale(0)
|
||||||
@ -1036,14 +1030,14 @@ function gr_add_legend(sp, leg, viewport_plotarea)
|
|||||||
if leg.w > 0
|
if leg.w > 0
|
||||||
xpos, ypos = gr_legend_pos(sp, leg, viewport_plotarea)
|
xpos, ypos = gr_legend_pos(sp, leg, viewport_plotarea)
|
||||||
GR.setfillintstyle(GR.INTSTYLE_SOLID)
|
GR.setfillintstyle(GR.INTSTYLE_SOLID)
|
||||||
gr_set_fillcolor(sp[:legend_background_color])
|
gr_set_fillcolor(sp[:background_color_legend])
|
||||||
GR.fillrect(
|
GR.fillrect(
|
||||||
xpos - leg.leftw,
|
xpos - leg.leftw,
|
||||||
xpos + leg.textw + leg.rightw,
|
xpos + leg.textw + leg.rightw,
|
||||||
ypos + leg.dy,
|
ypos + leg.dy,
|
||||||
ypos - leg.h,
|
ypos - leg.h,
|
||||||
) # Allocating white space for actual legend width here
|
) # Allocating white space for actual legend width here
|
||||||
gr_set_line(1, :solid, sp[:legend_foreground_color], sp)
|
gr_set_line(1, :solid, sp[:foreground_color_legend], sp)
|
||||||
GR.drawrect(
|
GR.drawrect(
|
||||||
xpos - leg.leftw,
|
xpos - leg.leftw,
|
||||||
xpos + leg.textw + leg.rightw,
|
xpos + leg.textw + leg.rightw,
|
||||||
@ -1051,10 +1045,10 @@ function gr_add_legend(sp, leg, viewport_plotarea)
|
|||||||
ypos - leg.h,
|
ypos - leg.h,
|
||||||
) # Drawing actual legend width here
|
) # Drawing actual legend width here
|
||||||
i = 0
|
i = 0
|
||||||
if sp[:legend_title] !== nothing
|
if sp[:legendtitle] !== nothing
|
||||||
GR.settextalign(GR.TEXT_HALIGN_CENTER, GR.TEXT_VALIGN_HALF)
|
GR.settextalign(GR.TEXT_HALIGN_CENTER, GR.TEXT_VALIGN_HALF)
|
||||||
gr_set_font(legendtitlefont(sp), sp)
|
gr_set_font(legendtitlefont(sp), sp)
|
||||||
gr_text(xpos - 0.03 + 0.5 * leg.w, ypos, string(sp[:legend_title]))
|
gr_text(xpos - 0.03 + 0.5 * leg.w, ypos, string(sp[:legendtitle]))
|
||||||
ypos -= leg.dy
|
ypos -= leg.dy
|
||||||
gr_set_font(legendfont(sp), sp)
|
gr_set_font(legendfont(sp), sp)
|
||||||
end
|
end
|
||||||
@ -1063,7 +1057,7 @@ function gr_add_legend(sp, leg, viewport_plotarea)
|
|||||||
should_add_to_legend(series) || continue
|
should_add_to_legend(series) || continue
|
||||||
st = series[:seriestype]
|
st = series[:seriestype]
|
||||||
lc = get_linecolor(series, clims)
|
lc = get_linecolor(series, clims)
|
||||||
gr_set_line(sp[:legend_font_pointsize] / 8, get_linestyle(series), lc, sp)
|
gr_set_line(sp[:legendfontsize] / 8, get_linestyle(series), lc, sp)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(st == :shape || series[:fillrange] !== nothing) &&
|
(st == :shape || series[:fillrange] !== nothing) &&
|
||||||
@ -1104,17 +1098,16 @@ function gr_add_legend(sp, leg, viewport_plotarea)
|
|||||||
ms = first(series[:markersize])
|
ms = first(series[:markersize])
|
||||||
msw = first(series[:markerstrokewidth])
|
msw = first(series[:markerstrokewidth])
|
||||||
s, sw = if ms > 0
|
s, sw = if ms > 0
|
||||||
0.8 * sp[:legend_font_pointsize],
|
0.8 * sp[:legendfontsize], 0.8 * sp[:legendfontsize] * msw / ms
|
||||||
0.8 * sp[:legend_font_pointsize] * msw / ms
|
|
||||||
else
|
else
|
||||||
0, 0.8 * sp[:legend_font_pointsize] * msw / 8
|
0, 0.8 * sp[:legendfontsize] * msw / 8
|
||||||
end
|
end
|
||||||
gr_draw_markers(series, xpos - leg.width_factor * 2, ypos, clims, s, sw)
|
gr_draw_markers(series, xpos - leg.width_factor * 2, ypos, clims, s, sw)
|
||||||
end
|
end
|
||||||
|
|
||||||
lab = series[:label]
|
lab = series[:label]
|
||||||
GR.settextalign(GR.TEXT_HALIGN_LEFT, GR.TEXT_VALIGN_HALF)
|
GR.settextalign(GR.TEXT_HALIGN_LEFT, GR.TEXT_VALIGN_HALF)
|
||||||
gr_set_textcolor(plot_color(sp[:legend_font_color]))
|
gr_set_textcolor(plot_color(sp[:legendfontcolor]))
|
||||||
gr_text(xpos, ypos, string(lab))
|
gr_text(xpos, ypos, string(lab))
|
||||||
ypos -= leg.dy
|
ypos -= leg.dy
|
||||||
end
|
end
|
||||||
@ -1125,7 +1118,7 @@ function gr_add_legend(sp, leg, viewport_plotarea)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function gr_legend_pos(sp::Subplot, leg, viewport_plotarea)
|
function gr_legend_pos(sp::Subplot, leg, viewport_plotarea)
|
||||||
s = sp[:legend_position]
|
s = sp[:legend]
|
||||||
s isa Real && return gr_legend_pos(s, leg, viewport_plotarea)
|
s isa Real && return gr_legend_pos(s, leg, viewport_plotarea)
|
||||||
if s isa Tuple{<:Real,Symbol}
|
if s isa Tuple{<:Real,Symbol}
|
||||||
if s[2] !== :outer
|
if s[2] !== :outer
|
||||||
@ -1242,29 +1235,24 @@ end
|
|||||||
|
|
||||||
function gr_get_legend_geometry(viewport_plotarea, sp)
|
function gr_get_legend_geometry(viewport_plotarea, sp)
|
||||||
legendn = legendw = dy = 0
|
legendn = legendw = dy = 0
|
||||||
if sp[:legend_position] != :none
|
if sp[:legend] != :none
|
||||||
GR.savestate()
|
GR.savestate()
|
||||||
GR.selntran(0)
|
GR.selntran(0)
|
||||||
GR.setcharup(0, 1)
|
|
||||||
GR.setscale(0)
|
GR.setscale(0)
|
||||||
if sp[:legend_title] !== nothing
|
if sp[:legendtitle] !== nothing
|
||||||
gr_set_font(legendtitlefont(sp), sp)
|
gr_set_font(legendtitlefont(sp), sp)
|
||||||
legendn += 1
|
legendn += 1
|
||||||
tbx, tby = gr_inqtext(0, 0, string(sp[:legend_title]))
|
tbx, tby = gr_inqtext(0, 0, string(sp[:legendtitle]))
|
||||||
l, r = extrema(tbx)
|
legendw = tbx[3] - tbx[1]
|
||||||
b, t = extrema(tby)
|
dy = tby[3] - tby[1]
|
||||||
legendw = r - l
|
|
||||||
dy = t - b
|
|
||||||
end
|
end
|
||||||
gr_set_font(legendfont(sp), sp)
|
gr_set_font(legendfont(sp), sp)
|
||||||
for series in series_list(sp)
|
for series in series_list(sp)
|
||||||
should_add_to_legend(series) || continue
|
should_add_to_legend(series) || continue
|
||||||
legendn += 1
|
legendn += 1
|
||||||
tbx, tby = gr_inqtext(0, 0, string(series[:label]))
|
tbx, tby = gr_inqtext(0, 0, string(series[:label]))
|
||||||
l, r = extrema(tbx)
|
legendw = max(legendw, tbx[3] - tbx[1]) # Holds text width right now
|
||||||
b, t = extrema(tby)
|
dy = max(dy, tby[3] - tby[1])
|
||||||
legendw = max(legendw, r - l) # Holds text width right now
|
|
||||||
dy = max(dy, t - b)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
GR.setscale(1)
|
GR.setscale(1)
|
||||||
@ -1282,6 +1270,7 @@ function gr_get_legend_geometry(viewport_plotarea, sp)
|
|||||||
y_legend_offset = (viewport_plotarea[4] - viewport_plotarea[3]) / 30
|
y_legend_offset = (viewport_plotarea[4] - viewport_plotarea[3]) / 30
|
||||||
|
|
||||||
dy *= get(sp[:extra_kwargs], :legend_hfactor, 1)
|
dy *= get(sp[:extra_kwargs], :legend_hfactor, 1)
|
||||||
|
|
||||||
legendh = dy * legendn
|
legendh = dy * legendn
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -1300,7 +1289,7 @@ end
|
|||||||
## Viewport, window and scale
|
## Viewport, window and scale
|
||||||
|
|
||||||
function gr_update_viewport_legend!(viewport_plotarea, sp, leg)
|
function gr_update_viewport_legend!(viewport_plotarea, sp, leg)
|
||||||
s = sp[:legend_position]
|
s = sp[:legend]
|
||||||
|
|
||||||
xaxis, yaxis = sp[:xaxis], sp[:yaxis]
|
xaxis, yaxis = sp[:xaxis], sp[:yaxis]
|
||||||
xmirror =
|
xmirror =
|
||||||
@ -1349,7 +1338,7 @@ function gr_update_viewport_legend!(viewport_plotarea, sp, leg)
|
|||||||
leg.h + leg.dy + leg.yoffset + !xmirror * gr_axis_height(sp, sp[:xaxis])
|
leg.h + leg.dy + leg.yoffset + !xmirror * gr_axis_height(sp, sp[:xaxis])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if s == :inline
|
if s === :inline
|
||||||
if sp[:yaxis][:mirror]
|
if sp[:yaxis][:mirror]
|
||||||
viewport_plotarea[1] += leg.w
|
viewport_plotarea[1] += leg.w
|
||||||
else
|
else
|
||||||
@ -1571,35 +1560,13 @@ function gr_label_ticks(sp, letter, ticks)
|
|||||||
oamin, oamax = axis_limits(sp, oletter)
|
oamin, oamax = axis_limits(sp, oletter)
|
||||||
gr_set_tickfont(sp, letter)
|
gr_set_tickfont(sp, letter)
|
||||||
out_factor = ifelse(axis[:tick_direction] === :out, 1.5, 1)
|
out_factor = ifelse(axis[:tick_direction] === :out, 1.5, 1)
|
||||||
x_base_offset = isy ? -1.5e-2 * out_factor : 0
|
x_offset = isy ? -1.5e-2 * out_factor : 0
|
||||||
y_base_offset = isy ? 0 : -8e-3 * out_factor
|
y_offset = isy ? 0 : -8e-3 * out_factor
|
||||||
|
|
||||||
rot = axis[:rotation] % 360
|
|
||||||
ov = sp[:framestyle] == :origin ? 0 : xor(oaxis[:flip], axis[:mirror]) ? oamax : oamin
|
ov = sp[:framestyle] == :origin ? 0 : xor(oaxis[:flip], axis[:mirror]) ? oamax : oamin
|
||||||
sgn = axis[:mirror] ? -1 : 1
|
sgn = axis[:mirror] ? -1 : 1
|
||||||
sgn2 = iseven(Int(floor(rot / 90))) ? -1 : 1
|
|
||||||
sgn3 = if isy
|
|
||||||
-360 < rot < -180 || 0 < rot < 180 ? 1 : -1
|
|
||||||
else
|
|
||||||
rot < -270 || -90 < rot < 90 || rot > 270 ? 1 : -1
|
|
||||||
end
|
|
||||||
for (cv, dv) in zip(ticks...)
|
for (cv, dv) in zip(ticks...)
|
||||||
x, y = GR.wctondc(reverse_if((cv, ov), isy)...)
|
x, y = GR.wctondc(reverse_if((cv, ov), isy)...)
|
||||||
sz_rot = gr_text_size(dv, rot)
|
|
||||||
sz = gr_text_size(dv)
|
|
||||||
x_offset = x_base_offset
|
|
||||||
y_offset = y_base_offset
|
|
||||||
if isy
|
|
||||||
x_offset += -first(sz_rot) / 2
|
|
||||||
if rot % 90 != 0
|
|
||||||
y_offset += sgn2 * last(sz_rot) / 2 + sgn3 * last(sz) * cosd(rot) / 2
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if rot % 90 != 0
|
|
||||||
x_offset += sgn2 * first(sz_rot) / 2 + sgn3 * last(sz) * sind(rot) / 2
|
|
||||||
end
|
|
||||||
y_offset += -last(sz_rot) / 2
|
|
||||||
end
|
|
||||||
gr_text(x + sgn * x_offset, y + sgn * y_offset, dv)
|
gr_text(x + sgn * x_offset, y + sgn * y_offset, dv)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1610,9 +1577,6 @@ function gr_label_ticks_3d(sp, letter, ticks)
|
|||||||
near_letter = letter in (:x, :z) ? :y : :x
|
near_letter = letter in (:x, :z) ? :y : :x
|
||||||
far_letter = letter in (:x, :y) ? :z : :x
|
far_letter = letter in (:x, :y) ? :z : :x
|
||||||
|
|
||||||
isy = letter === :y
|
|
||||||
isz = letter === :z
|
|
||||||
|
|
||||||
ax = sp[get_attr_symbol(letter, :axis)]
|
ax = sp[get_attr_symbol(letter, :axis)]
|
||||||
nax = sp[get_attr_symbol(near_letter, :axis)]
|
nax = sp[get_attr_symbol(near_letter, :axis)]
|
||||||
fax = sp[get_attr_symbol(far_letter, :axis)]
|
fax = sp[get_attr_symbol(far_letter, :axis)]
|
||||||
@ -1620,7 +1584,7 @@ function gr_label_ticks_3d(sp, letter, ticks)
|
|||||||
amin, amax = axis_limits(sp, letter)
|
amin, amax = axis_limits(sp, letter)
|
||||||
namin, namax = axis_limits(sp, near_letter)
|
namin, namax = axis_limits(sp, near_letter)
|
||||||
famin, famax = axis_limits(sp, far_letter)
|
famin, famax = axis_limits(sp, far_letter)
|
||||||
n0, n1 = isy ? (namax, namin) : (namin, namax)
|
n0, n1 = letter === :y ? (namax, namin) : (namin, namax)
|
||||||
|
|
||||||
# find out which axes we are dealing with
|
# find out which axes we are dealing with
|
||||||
i = findfirst(==(letter), (:x, :y, :z))
|
i = findfirst(==(letter), (:x, :y, :z))
|
||||||
@ -1637,57 +1601,27 @@ function gr_label_ticks_3d(sp, letter, ticks)
|
|||||||
nt = sp[:framestyle] == :origin ? 0 : ax[:mirror] ? n1 : n0
|
nt = sp[:framestyle] == :origin ? 0 : ax[:mirror] ? n1 : n0
|
||||||
ft = sp[:framestyle] == :origin ? 0 : ax[:mirror] ? famax : famin
|
ft = sp[:framestyle] == :origin ? 0 : ax[:mirror] ? famax : famin
|
||||||
|
|
||||||
rot = mod(ax[:rotation], 360)
|
xoffset = if letter === :x
|
||||||
sgn = ax[:mirror] ? -1 : 1
|
(sp[:yaxis][:mirror] ? 1 : -1) * 1e-2 * (sp[:xaxis][:tick_direction] == :out ? 1.5 : 1)
|
||||||
|
elseif letter === :y
|
||||||
|
(sp[:yaxis][:mirror] ? -1 : 1) * 1e-2 * (sp[:yaxis][:tick_direction] == :out ? 1.5 : 1)
|
||||||
|
else
|
||||||
|
(sp[:zaxis][:mirror] ? 1 : -1) * 1e-2 * (sp[:zaxis][:tick_direction] == :out ? 1.5 : 1)
|
||||||
|
end
|
||||||
|
yoffset = if letter === :x
|
||||||
|
(sp[:xaxis][:mirror] ? 1 : -1) * 1e-2 * (sp[:xaxis][:tick_direction] == :out ? 1.5 : 1)
|
||||||
|
elseif letter === :y
|
||||||
|
(sp[:yaxis][:mirror] ? 1 : -1) * 1e-2 * (sp[:yaxis][:tick_direction] == :out ? 1.5 : 1)
|
||||||
|
else
|
||||||
|
0
|
||||||
|
end
|
||||||
|
|
||||||
cvs, dvs = ticks
|
cvs, dvs = ticks
|
||||||
ax[:flip] && reverse!(cvs)
|
ax[:flip] && reverse!(cvs)
|
||||||
|
|
||||||
axisθ = isz ? 270 : mod(gr_get_3d_axis_angle(cvs, nt, ft, letter), 360) # issue: doesn't work with 1 tick
|
|
||||||
axisϕ = mod(axisθ - 90, 360)
|
|
||||||
|
|
||||||
out_factor = ifelse(ax[:tick_direction] === :out, 1.5, 1)
|
|
||||||
axisoffset = out_factor * 1.2e-2
|
|
||||||
x_base_offset = axisoffset * cosd(axisϕ)
|
|
||||||
y_base_offset = axisoffset * sind(axisϕ)
|
|
||||||
|
|
||||||
sgn2a = sgn2b = sgn3 = 0
|
|
||||||
if axisθ != 0 || rot % 90 != 0
|
|
||||||
sgn2a =
|
|
||||||
(axisθ != 90) && (axisθ == 0 && (rot < 90 || 180 ≤ rot < 270)) ||
|
|
||||||
(axisθ == 270) ||
|
|
||||||
(axisθ < 90 && (axisθ < rot < 90 || axisθ + 180 < rot < 270)) ||
|
|
||||||
(axisθ > 270 && (rot < 90 || axisθ - 180 < rot < 270 || rot > axisθ)) ? -1 : 1
|
|
||||||
end
|
|
||||||
|
|
||||||
if (axisθ - 90) % 180 != 0 || (rot - 90) % 180 != 0
|
|
||||||
sgn2b =
|
|
||||||
axisθ == 0 ||
|
|
||||||
(axisθ == 90 && (90 ≤ rot < 180 || 270 ≤ rot < 360)) ||
|
|
||||||
(axisθ == 270 && (rot < 90 || 180 ≤ rot < 270)) ||
|
|
||||||
(axisθ < 90 && (axisθ < rot < 180 || axisθ + 180 < rot)) ||
|
|
||||||
(axisθ > 270 && (rot < axisθ - 180 || 180 ≤ rot < axisθ)) ? -1 : 1
|
|
||||||
end
|
|
||||||
|
|
||||||
if !(axisθ == 0 && rot % 180 == 0) && ((rot - 90) % 180 != 0)
|
|
||||||
sgn3 =
|
|
||||||
(axisθ == 0 && 90 < rot < 270) ||
|
|
||||||
(axisθ == 90 && rot < 180) ||
|
|
||||||
(axisθ == 270 && rot > 180) ||
|
|
||||||
(axisθ < 90 && (rot < axisθ || 90 ≤ rot < 180 || axisθ + 180 < rot < 270)) ||
|
|
||||||
(axisθ > 270 && (90 ≤ rot < axisθ - 180 || 180 ≤ rot < 270 || rot > axisθ)) ?
|
|
||||||
-1 : 1
|
|
||||||
end
|
|
||||||
|
|
||||||
for (cv, dv) in zip((cvs, dvs)...)
|
for (cv, dv) in zip((cvs, dvs)...)
|
||||||
xi, yi = gr_w3tondc(sort_3d_axes(cv, nt, ft, letter)...)
|
xi, yi = gr_w3tondc(sort_3d_axes(cv, nt, ft, letter)...)
|
||||||
sz_rot = gr_text_size(dv, rot)
|
gr_text(xi + xoffset, yi + yoffset, dv)
|
||||||
sz = gr_text_size(dv)
|
|
||||||
x_offset =
|
|
||||||
x_base_offset + sgn2a * first(sz_rot) / 2 + sgn3 * last(sz) * sind(rot) / 2
|
|
||||||
y_offset =
|
|
||||||
y_base_offset + sgn2b * last(sz_rot) / 2 + sgn3 * last(sz) * cosd(rot) / 2
|
|
||||||
gr_text(xi + sgn * x_offset, yi + sgn * y_offset, dv)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -1850,7 +1784,7 @@ function gr_add_series(sp, series)
|
|||||||
elseif st in (:surface, :wireframe, :mesh3d)
|
elseif st in (:surface, :wireframe, :mesh3d)
|
||||||
gr_draw_surface(series, x, y, z, clims)
|
gr_draw_surface(series, x, y, z, clims)
|
||||||
elseif st === :volume
|
elseif st === :volume
|
||||||
sp[:legend_position] = :none
|
sp[:legend] = :none
|
||||||
GR.gr3.clear()
|
GR.gr3.clear()
|
||||||
dmin, dmax = GR.gr3.volume(y.v, 0)
|
dmin, dmax = GR.gr3.volume(y.v, 0)
|
||||||
elseif st === :heatmap
|
elseif st === :heatmap
|
||||||
@ -1868,9 +1802,9 @@ function gr_add_series(sp, series)
|
|||||||
gr_text(GR.wctondc(xi, yi)..., str)
|
gr_text(GR.wctondc(xi, yi)..., str)
|
||||||
end
|
end
|
||||||
|
|
||||||
if sp[:legend_position] == :inline && should_add_to_legend(series)
|
if sp[:legend] == :inline && should_add_to_legend(series)
|
||||||
gr_set_font(legendfont(sp), sp)
|
gr_set_font(legendfont(sp), sp)
|
||||||
gr_set_textcolor(plot_color(sp[:legend_font_color]))
|
gr_set_textcolor(plot_color(sp[:legendfontcolor]))
|
||||||
if sp[:yaxis][:mirror]
|
if sp[:yaxis][:mirror]
|
||||||
(_, i) = sp[:xaxis][:flip] ? findmax(x) : findmin(x)
|
(_, i) = sp[:xaxis][:flip] ? findmax(x) : findmin(x)
|
||||||
GR.settextalign(GR.TEXT_HALIGN_RIGHT, GR.TEXT_VALIGN_HALF)
|
GR.settextalign(GR.TEXT_HALIGN_RIGHT, GR.TEXT_VALIGN_HALF)
|
||||||
@ -2047,42 +1981,14 @@ function gr_draw_surface(series, x, y, z, clims)
|
|||||||
GR.setfillcolorind(0)
|
GR.setfillcolorind(0)
|
||||||
GR.surface(x, y, z, get(e_kwargs, :display_option, GR.OPTION_FILLED_MESH))
|
GR.surface(x, y, z, get(e_kwargs, :display_option, GR.OPTION_FILLED_MESH))
|
||||||
elseif st === :mesh3d
|
elseif st === :mesh3d
|
||||||
if series[:connections] isa AbstractVector{<:AbstractVector{Int}}
|
@warn "GR: mesh3d is experimental (no face colors)"
|
||||||
# Combination of any polygon types
|
gr_set_line(
|
||||||
cns = [[length(polyinds), polyinds...] for polyinds in series[:connections]]
|
get_linewidth(series),
|
||||||
elseif series[:connections] isa AbstractVector{NTuple{N,Int}} where {N}
|
get_linestyle(series),
|
||||||
# Only N-gons - connections have to be 1-based (indexing)
|
get_linecolor(series),
|
||||||
N = length(series[:connections][1])
|
series,
|
||||||
cns = [[N, polyinds...] for polyinds in series[:connections]]
|
)
|
||||||
elseif series[:connections] isa NTuple{3,<:AbstractVector{Int}}
|
GR.polyline3d(mesh3d_triangles(x, y, z, series[:connections])...)
|
||||||
# Only triangles - connections have to be 0-based (indexing)
|
|
||||||
ci, cj, ck = series[:connections]
|
|
||||||
if !(length(ci) == length(cj) == length(ck))
|
|
||||||
throw(
|
|
||||||
ArgumentError(
|
|
||||||
"Argument connections must consist of equally sized arrays.",
|
|
||||||
),
|
|
||||||
)
|
|
||||||
end
|
|
||||||
cns = [([3, ci[i] + 1, cj[i] + 1, ck[i] + 1]) for i in eachindex(ci)]
|
|
||||||
else
|
|
||||||
throw(
|
|
||||||
ArgumentError(
|
|
||||||
"Unsupported `:connections` type $(typeof(series[:connections])) for seriestype=$st",
|
|
||||||
),
|
|
||||||
)
|
|
||||||
end
|
|
||||||
fillalpha = get_fillalpha(series)
|
|
||||||
n_polygons = length(cns)
|
|
||||||
facecolor = if series[:fillcolor] isa AbstractArray
|
|
||||||
series[:fillcolor]
|
|
||||||
else
|
|
||||||
fill(series[:fillcolor], n_polygons)
|
|
||||||
end
|
|
||||||
facecolor = map(fc -> set_RGBA_alpha(fillalpha, fc), facecolor)
|
|
||||||
GR.setborderwidth(get_linewidth(series))
|
|
||||||
GR.setbordercolorind(gr_getcolorind(get_linecolor(series)))
|
|
||||||
GR.polygonmesh3d(x, y, z, vcat(cns...), signed.(gr_color.(facecolor)))
|
|
||||||
else
|
else
|
||||||
throw(ArgumentError("Not handled !"))
|
throw(ArgumentError("Not handled !"))
|
||||||
end
|
end
|
||||||
@ -2098,38 +2004,15 @@ function gr_draw_heatmap(series, x, y, z, clims)
|
|||||||
# pdf output, and also supports alpha values.
|
# pdf output, and also supports alpha values.
|
||||||
# Note that drawimage draws uniformly spaced data correctly
|
# Note that drawimage draws uniformly spaced data correctly
|
||||||
# even on log scales, where it is visually non-uniform.
|
# even on log scales, where it is visually non-uniform.
|
||||||
colors, _z = if series[:subplot][:colorbar_scale] == :identity
|
colors = plot_color.(get(fillgrad, z, clims), series[:fillalpha])
|
||||||
plot_color.(get(fillgrad, z, clims), series[:fillalpha]), z
|
|
||||||
elseif series[:subplot][:colorbar_scale] == :log10
|
|
||||||
z_log = replace(x -> isinf(x) ? NaN : x, log10.(z))
|
|
||||||
z_normalized = get_z_normalized.(z_log, log10.(clims)...)
|
|
||||||
plot_color.(map(z -> get(fillgrad, z), z_normalized), series[:fillalpha]), z_log
|
|
||||||
end
|
|
||||||
for i in eachindex(colors)
|
|
||||||
if isnan(_z[i])
|
|
||||||
colors[i] = set_RGBA_alpha(0, colors[i])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
rgba = gr_color.(colors)
|
rgba = gr_color.(colors)
|
||||||
GR.drawimage(first(x), last(x), last(y), first(y), w, h, rgba)
|
GR.drawimage(first(x), last(x), last(y), first(y), w, h, rgba)
|
||||||
else
|
else
|
||||||
if something(series[:fillalpha], 1) < 1
|
if something(series[:fillalpha], 1) < 1
|
||||||
@warn "GR: transparency not supported in non-uniform heatmaps. Alpha values ignored."
|
@warn "GR: transparency not supported in non-uniform heatmaps. Alpha values ignored."
|
||||||
end
|
end
|
||||||
z_normalized, _z = if series[:subplot][:colorbar_scale] == :identity
|
z_normalized = get_z_normalized.(z, clims...)
|
||||||
get_z_normalized.(z, clims...), z
|
|
||||||
elseif series[:subplot][:colorbar_scale] == :log10
|
|
||||||
z_log = replace(x -> isinf(x) ? NaN : x, log10.(z))
|
|
||||||
get_z_normalized.(z_log, log10.(clims)...), z_log
|
|
||||||
end
|
|
||||||
rgba = Int32[round(Int32, 1000 + _i * 255) for _i in z_normalized]
|
rgba = Int32[round(Int32, 1000 + _i * 255) for _i in z_normalized]
|
||||||
background_color_ind =
|
|
||||||
gr_getcolorind(plot_color(series[:subplot][:background_color_inside]))
|
|
||||||
for i in eachindex(rgba)
|
|
||||||
if isnan(_z[i])
|
|
||||||
rgba[i] = background_color_ind
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if !ispolar(series)
|
if !ispolar(series)
|
||||||
GR.nonuniformcellarray(x, y, w, h, rgba)
|
GR.nonuniformcellarray(x, y, w, h, rgba)
|
||||||
else
|
else
|
||||||
|
|||||||
@ -13,7 +13,7 @@ Add in functionality to Plots.jl:
|
|||||||
:aspect_ratio,
|
:aspect_ratio,
|
||||||
=#
|
=#
|
||||||
|
|
||||||
should_warn_on_unsupported(::InspectDRBackend) = false
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
is_marker_supported(::InspectDRBackend, shape::Shape) = true
|
is_marker_supported(::InspectDRBackend, shape::Shape) = true
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ function _inspectdr_add_annotations(plot, x, y, val::PlotText)
|
|||||||
color = _inspectdr_mapcolor(val.font.color),
|
color = _inspectdr_mapcolor(val.font.color),
|
||||||
)
|
)
|
||||||
ann = InspectDR.atext(
|
ann = InspectDR.atext(
|
||||||
texmath2unicode(val.str),
|
val.str,
|
||||||
x = x,
|
x = x,
|
||||||
y = y,
|
y = y,
|
||||||
font = fnt,
|
font = fnt,
|
||||||
@ -384,9 +384,9 @@ function _inspectdr_setupsubplot(sp::Subplot{InspectDRBackend})
|
|||||||
_inspectdr_setticks(sp, plot, strip, xaxis, yaxis)
|
_inspectdr_setticks(sp, plot, strip, xaxis, yaxis)
|
||||||
|
|
||||||
a = plot.annotation
|
a = plot.annotation
|
||||||
a.title = texmath2unicode(sp[:title])
|
a.title = sp[:title]
|
||||||
a.xlabel = texmath2unicode(xaxis[:guide])
|
a.xlabel = xaxis[:guide]
|
||||||
a.ylabels = [texmath2unicode(yaxis[:guide])]
|
a.ylabels = [yaxis[:guide]]
|
||||||
|
|
||||||
#Modify base layout of new object:
|
#Modify base layout of new object:
|
||||||
l = plot.layout.defaults = deepcopy(InspectDR.defaults.plotlayout)
|
l = plot.layout.defaults = deepcopy(InspectDR.defaults.plotlayout)
|
||||||
@ -411,14 +411,15 @@ function _inspectdr_setupsubplot(sp::Subplot{InspectDRBackend})
|
|||||||
_inspectdr_mapptsize(xaxis[:tickfontsize]),
|
_inspectdr_mapptsize(xaxis[:tickfontsize]),
|
||||||
color = _inspectdr_mapcolor(xaxis[:tickfontcolor]),
|
color = _inspectdr_mapcolor(xaxis[:tickfontcolor]),
|
||||||
)
|
)
|
||||||
l.enable_legend = (sp[:legend_position] != :none)
|
l.enable_legend = (sp[:legend] != :none)
|
||||||
#l.halloc_legend = 150 #TODO: compute???
|
#l.halloc_legend = 150 #TODO: compute???
|
||||||
l.font_legend = InspectDR.Font(
|
l.font_legend = InspectDR.Font(
|
||||||
sp[:legend_font_family],
|
sp[:legendfontfamily],
|
||||||
_inspectdr_mapptsize(sp[:legend_font_pointsize]),
|
_inspectdr_mapptsize(sp[:legendfontsize]),
|
||||||
color = _inspectdr_mapcolor(sp[:legend_font_color]),
|
color = _inspectdr_mapcolor(sp[:legendfontcolor]),
|
||||||
)
|
)
|
||||||
l.frame_legend.fillcolor = _inspectdr_mapcolor(sp[:legend_background_color])
|
l.frame_legend.fillcolor = _inspectdr_mapcolor(sp[:background_color_legend])
|
||||||
|
|
||||||
#_round!() ensures values use integer spacings (looks better on screen):
|
#_round!() ensures values use integer spacings (looks better on screen):
|
||||||
InspectDR._round!(InspectDR.autofit2font!(l, legend_width = 10.0)) #10 "em"s wide
|
InspectDR._round!(InspectDR.autofit2font!(l, legend_width = 10.0)) #10 "em"s wide
|
||||||
return
|
return
|
||||||
|
|||||||
@ -141,12 +141,9 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
|||||||
title_loc = sp[:titlelocation]
|
title_loc = sp[:titlelocation]
|
||||||
bgc_inside = plot_color(sp[:background_color_inside])
|
bgc_inside = plot_color(sp[:background_color_inside])
|
||||||
bgc_inside_a = alpha(bgc_inside)
|
bgc_inside_a = alpha(bgc_inside)
|
||||||
update_clims(sp)
|
|
||||||
axis_opt = PGFPlotsX.Options(
|
axis_opt = PGFPlotsX.Options(
|
||||||
"point meta max" => get_clims(sp)[2],
|
"point meta max" => get_clims(sp)[2],
|
||||||
"point meta min" => get_clims(sp)[1],
|
"point meta min" => get_clims(sp)[1],
|
||||||
"legend cell align" => "left",
|
|
||||||
"legend columns" => pgfx_legend_col(sp[:legend_column]),
|
|
||||||
"title" => sp[:title],
|
"title" => sp[:title],
|
||||||
"title style" => PGFPlotsX.Options(
|
"title style" => PGFPlotsX.Options(
|
||||||
pgfx_get_title_pos(title_loc)...,
|
pgfx_get_title_pos(title_loc)...,
|
||||||
@ -206,8 +203,8 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
|||||||
|
|
||||||
if hascolorbar(sp)
|
if hascolorbar(sp)
|
||||||
cticks = get_colorbar_ticks(sp)[2]
|
cticks = get_colorbar_ticks(sp)[2]
|
||||||
|
colorbar_style = PGFPlotsX.Options("title" => sp[:colorbar_title])
|
||||||
if sp[:colorbar] === :top
|
if sp[:colorbar] === :top
|
||||||
colorbar_style = PGFPlotsX.Options("xlabel" => sp[:colorbar_title])
|
|
||||||
push!(
|
push!(
|
||||||
colorbar_style,
|
colorbar_style,
|
||||||
"at" => string((0.5, 1.05)),
|
"at" => string((0.5, 1.05)),
|
||||||
@ -217,7 +214,6 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
|||||||
"xticklabel style" => pgfx_get_colorbar_ticklabel_style(sp),
|
"xticklabel style" => pgfx_get_colorbar_ticklabel_style(sp),
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
colorbar_style = PGFPlotsX.Options("ylabel" => sp[:colorbar_title])
|
|
||||||
push!(
|
push!(
|
||||||
colorbar_style,
|
colorbar_style,
|
||||||
"ytick" => string("{", join(cticks, ","), "}"),
|
"ytick" => string("{", join(cticks, ","), "}"),
|
||||||
@ -249,18 +245,12 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
|||||||
extra_sp = wraptuple(extra_sp)
|
extra_sp = wraptuple(extra_sp)
|
||||||
push!(axis, extra_sp...)
|
push!(axis, extra_sp...)
|
||||||
end
|
end
|
||||||
if sp[:legend_title] !== nothing
|
if sp[:legendtitle] !== nothing
|
||||||
legtfont = legendtitlefont(sp)
|
|
||||||
push!(axis, PGFPlotsX.Options("\\addlegendimage{empty legend}" => nothing))
|
push!(axis, PGFPlotsX.Options("\\addlegendimage{empty legend}" => nothing))
|
||||||
push!(
|
push!(
|
||||||
axis,
|
axis,
|
||||||
PGFPlotsX.LegendEntry(
|
PGFPlotsX.LegendEntry(
|
||||||
PGFPlotsX.Options(
|
string("\\hspace{-.6cm}{\\textbf{", sp[:legendtitle], "}}"),
|
||||||
"font" =>
|
|
||||||
pgfx_font(legtfont.pointsize, pgfx_thickness_scaling(sp)),
|
|
||||||
"text" => legtfont.color,
|
|
||||||
),
|
|
||||||
string("\\hspace{-.6cm}{\\textbf{", sp[:legend_title], "}}"),
|
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -385,9 +375,11 @@ function pgfx_add_series!(::Val{:path}, axis, series_opt, series, series_func, o
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if i == 1 &&
|
if (
|
||||||
series[:subplot][:legend_position] != :none &&
|
k == 1 &&
|
||||||
pgfx_should_add_to_legend(series)
|
series[:subplot][:legend] != :none &&
|
||||||
|
pgfx_should_add_to_legend(series)
|
||||||
|
)
|
||||||
pgfx_filllegend!(series_opt, opt)
|
pgfx_filllegend!(series_opt, opt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -404,9 +396,6 @@ function pgfx_add_series!(::Val{:path}, axis, series_opt, series, series_func, o
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
if opt[:label] == ""
|
|
||||||
push!(arrow_opt, "forget plot" => nothing)
|
|
||||||
end
|
|
||||||
if arrow.side == :head
|
if arrow.side == :head
|
||||||
x_arrow = opt[:x][rng][(end - 1):end]
|
x_arrow = opt[:x][rng][(end - 1):end]
|
||||||
y_arrow = opt[:y][rng][(end - 1):end]
|
y_arrow = opt[:y][rng][(end - 1):end]
|
||||||
@ -430,7 +419,6 @@ function pgfx_add_series!(::Val{:path}, axis, series_opt, series, series_func, o
|
|||||||
:v => [y_arrow[i] - y_arrow[i - 1] for i in 2:2:lastindex(y_arrow)],
|
:v => [y_arrow[i] - y_arrow[i - 1] for i in 2:2:lastindex(y_arrow)],
|
||||||
])
|
])
|
||||||
arrow_plot = series_func(merge(series_opt, arrow_opt), coordinates)
|
arrow_plot = series_func(merge(series_opt, arrow_opt), coordinates)
|
||||||
push!(series_opt, "forget plot" => nothing)
|
|
||||||
push!(axis, arrow_plot)
|
push!(axis, arrow_plot)
|
||||||
coordinates = PGFPlotsX.Table(x_path, y_path)
|
coordinates = PGFPlotsX.Table(x_path, y_path)
|
||||||
segment_plot = series_func(merge(series_opt, segment_opt), coordinates)
|
segment_plot = series_func(merge(series_opt, segment_opt), coordinates)
|
||||||
@ -524,29 +512,10 @@ function pgfx_add_series!(::Val{:heatmap}, axis, series_opt, series, series_func
|
|||||||
end
|
end
|
||||||
|
|
||||||
function pgfx_add_series!(::Val{:mesh3d}, axis, series_opt, series, series_func, opt)
|
function pgfx_add_series!(::Val{:mesh3d}, axis, series_opt, series, series_func, opt)
|
||||||
if opt[:connections] isa Tuple{Array,Array,Array}
|
ptable = join(
|
||||||
# 0-based indexing
|
[string(i, " ", j, " ", k, "\\\\") for (i, j, k) in zip(opt[:connections]...)],
|
||||||
ptable = join(
|
"\n ",
|
||||||
[string(i, " ", j, " ", k, "\\\\") for (i, j, k) in zip(opt[:connections]...)],
|
)
|
||||||
"\n ",
|
|
||||||
)
|
|
||||||
elseif typeof(opt[:connections]) <: AbstractVector{NTuple{3,Int}}
|
|
||||||
# 1-based indexing
|
|
||||||
ptable = join(
|
|
||||||
[
|
|
||||||
string(i - 1, " ", j - 1, " ", k - 1, "\\\\") for
|
|
||||||
(i, j, k) in opt[:connections]
|
|
||||||
],
|
|
||||||
"\n ",
|
|
||||||
)
|
|
||||||
else
|
|
||||||
throw(
|
|
||||||
ArgumentError(
|
|
||||||
"Argument connections has to be either a tuple of three arrays (0-based indexing)
|
|
||||||
or an AbstractVector{NTuple{3,Int}} (1-based indexing).",
|
|
||||||
),
|
|
||||||
)
|
|
||||||
end
|
|
||||||
push!(
|
push!(
|
||||||
series_opt,
|
series_opt,
|
||||||
"patch" => nothing,
|
"patch" => nothing,
|
||||||
@ -664,7 +633,7 @@ function pgfx_add_series!(::Val{:xsticks}, axis, series_opt, series, series_func
|
|||||||
end
|
end
|
||||||
|
|
||||||
function pgfx_add_legend!(axis, series, opt, i = 1)
|
function pgfx_add_legend!(axis, series, opt, i = 1)
|
||||||
if series[:subplot][:legend_position] != :none
|
if series[:subplot][:legend] != :none
|
||||||
leg_entry = if opt[:label] isa AVec
|
leg_entry = if opt[:label] isa AVec
|
||||||
get(opt[:label], i, "")
|
get(opt[:label], i, "")
|
||||||
elseif opt[:label] isa AbstractString
|
elseif opt[:label] isa AbstractString
|
||||||
@ -811,22 +780,22 @@ function pgfx_get_legend_pos(v::Tuple{S,Symbol}) where {S<:Real}
|
|||||||
end
|
end
|
||||||
|
|
||||||
function pgfx_get_legend_style(sp)
|
function pgfx_get_legend_style(sp)
|
||||||
cstr = plot_color(sp[:legend_background_color])
|
cstr = plot_color(sp[:background_color_legend])
|
||||||
a = alpha(cstr)
|
a = alpha(cstr)
|
||||||
fg_alpha = alpha(plot_color(sp[:legend_foreground_color]))
|
fg_alpha = alpha(plot_color(sp[:foreground_color_legend]))
|
||||||
legfont = legendfont(sp)
|
legfont = legendfont(sp)
|
||||||
PGFPlotsX.Options(
|
PGFPlotsX.Options(
|
||||||
pgfx_linestyle(
|
pgfx_linestyle(
|
||||||
pgfx_thickness_scaling(sp),
|
pgfx_thickness_scaling(sp),
|
||||||
sp[:legend_foreground_color],
|
sp[:foreground_color_legend],
|
||||||
fg_alpha,
|
fg_alpha,
|
||||||
"solid",
|
"solid",
|
||||||
) => nothing,
|
) => nothing,
|
||||||
"fill" => cstr,
|
"fill" => cstr,
|
||||||
"fill opacity" => a,
|
"fill opacity" => a,
|
||||||
"text opacity" => alpha(plot_color(sp[:legend_font_color])),
|
"text opacity" => alpha(plot_color(sp[:legendfontcolor])),
|
||||||
"font" => pgfx_font(sp[:legend_font_pointsize], pgfx_thickness_scaling(sp)),
|
"font" => pgfx_font(sp[:legendfontsize], pgfx_thickness_scaling(sp)),
|
||||||
"text" => plot_color(sp[:legend_font_color]),
|
"text" => plot_color(sp[:legendfontcolor]),
|
||||||
"cells" => PGFPlotsX.Options(
|
"cells" => PGFPlotsX.Options(
|
||||||
"anchor" => get(
|
"anchor" => get(
|
||||||
(left = "west", right = "east", hcenter = "center"),
|
(left = "west", right = "east", hcenter = "center"),
|
||||||
@ -834,7 +803,7 @@ function pgfx_get_legend_style(sp)
|
|||||||
"west",
|
"west",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
pgfx_get_legend_pos(sp[:legend_position])...,
|
pgfx_get_legend_pos(sp[:legend])...,
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -960,9 +929,6 @@ function pgfx_linestyle(linewidth::Real, color, α = 1, linestyle = :solid)
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
pgfx_legend_col(s::Symbol) = s == :horizontal ? -1 : 1
|
|
||||||
pgfx_legend_col(n) = n
|
|
||||||
|
|
||||||
function pgfx_linestyle(plotattributes, i = 1)
|
function pgfx_linestyle(plotattributes, i = 1)
|
||||||
lw = pgfx_thickness_scaling(plotattributes) * get_linewidth(plotattributes, i)
|
lw = pgfx_thickness_scaling(plotattributes) * get_linewidth(plotattributes, i)
|
||||||
lc = single_color(get_linecolor(plotattributes, i))
|
lc = single_color(get_linecolor(plotattributes, i))
|
||||||
@ -984,20 +950,21 @@ function pgfx_font(fontsize::Nothing, thickness_scaling = 1, font = "\\selectfon
|
|||||||
end
|
end
|
||||||
|
|
||||||
function pgfx_should_add_to_legend(series::Series)
|
function pgfx_should_add_to_legend(series::Series)
|
||||||
series.plotattributes[:primary] && !(
|
series.plotattributes[:primary] &&
|
||||||
series.plotattributes[:seriestype] in (
|
!(
|
||||||
:hexbin,
|
series.plotattributes[:seriestype] in (
|
||||||
:bins2d,
|
:hexbin,
|
||||||
:histogram2d,
|
:bins2d,
|
||||||
:hline,
|
:histogram2d,
|
||||||
:vline,
|
:hline,
|
||||||
:contour,
|
:vline,
|
||||||
:contourf,
|
:contour,
|
||||||
:contour3d,
|
:contourf,
|
||||||
:heatmap,
|
:contour3d,
|
||||||
:image,
|
:heatmap,
|
||||||
|
:image,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function pgfx_marker(plotattributes, i = 1)
|
function pgfx_marker(plotattributes, i = 1)
|
||||||
@ -1231,18 +1198,6 @@ function pgfx_sanitize_plot!(plt)
|
|||||||
end
|
end
|
||||||
##
|
##
|
||||||
end
|
end
|
||||||
|
|
||||||
function wrap_power_labels(ticks)
|
|
||||||
# wrap the power part of label with }
|
|
||||||
tick_labels = similar(ticks)
|
|
||||||
for (i, label) in enumerate(ticks)
|
|
||||||
base, power = split(label, "^")
|
|
||||||
power = string("{", power, "}")
|
|
||||||
tick_labels[i] = string(base, "^", power)
|
|
||||||
end
|
|
||||||
tick_labels
|
|
||||||
end
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------------
|
||||||
function pgfx_axis!(opt::PGFPlotsX.Options, sp::Subplot, letter)
|
function pgfx_axis!(opt::PGFPlotsX.Options, sp::Subplot, letter)
|
||||||
axis = sp[get_attr_symbol(letter, :axis)]
|
axis = sp[get_attr_symbol(letter, :axis)]
|
||||||
@ -1301,8 +1256,7 @@ function pgfx_axis!(opt::PGFPlotsX.Options, sp::Subplot, letter)
|
|||||||
|
|
||||||
# scale
|
# scale
|
||||||
scale = axis[:scale]
|
scale = axis[:scale]
|
||||||
is_log_scale = scale in (:ln, :log2, :log10)
|
if scale in (:log2, :ln, :log10)
|
||||||
if is_log_scale
|
|
||||||
push!(opt, string(letter, :mode) => "log")
|
push!(opt, string(letter, :mode) => "log")
|
||||||
scale == :ln || push!(opt, "log basis $letter" => "$(scale == :log2 ? 2 : 10)")
|
scale == :ln || push!(opt, "log basis $letter" => "$(scale == :log2 ? 2 : 10)")
|
||||||
end
|
end
|
||||||
@ -1315,10 +1269,11 @@ function pgfx_axis!(opt::PGFPlotsX.Options, sp::Subplot, letter)
|
|||||||
end
|
end
|
||||||
|
|
||||||
# grid on or off
|
# grid on or off
|
||||||
push!(
|
if axis[:grid] && framestyle != :none
|
||||||
opt,
|
push!(opt, "$(letter)majorgrids" => "true")
|
||||||
"$(letter)majorgrids" => axis[:grid] && framestyle != :none ? "true" : "false",
|
else
|
||||||
)
|
push!(opt, "$(letter)majorgrids" => "false")
|
||||||
|
end
|
||||||
|
|
||||||
# limits
|
# limits
|
||||||
lims =
|
lims =
|
||||||
@ -1329,13 +1284,19 @@ function pgfx_axis!(opt::PGFPlotsX.Options, sp::Subplot, letter)
|
|||||||
if !(axis[:ticks] in (nothing, false, :none, :native)) && framestyle != :none
|
if !(axis[:ticks] in (nothing, false, :none, :native)) && framestyle != :none
|
||||||
# ticks
|
# ticks
|
||||||
ticks = get_ticks(sp, axis)
|
ticks = get_ticks(sp, axis)
|
||||||
# pgf plot ignores ticks with angle below 90 when xmin = 90 so shift values
|
#pgf plot ignores ticks with angle below 90 when xmin = 90 so shift values
|
||||||
tick_values =
|
tick_values =
|
||||||
ispolar(sp) && letter == :x ? [rad2deg.(ticks[1])[3:end]..., 360, 405] :
|
ispolar(sp) && letter == :x ? [rad2deg.(ticks[1])[3:end]..., 360, 405] :
|
||||||
ticks[1]
|
ticks[1]
|
||||||
push!(opt, string(letter, "tick") => string("{", join(tick_values, ","), "}"))
|
push!(opt, string(letter, "tick") => string("{", join(tick_values, ","), "}"))
|
||||||
if axis[:showaxis] && is_log_scale && axis[:ticks] == :auto
|
if axis[:showaxis] && axis[:scale] in (:ln, :log2, :log10) && axis[:ticks] == :auto
|
||||||
tick_labels = wrap_power_labels(ticks[2])
|
# wrap the power part of label with }
|
||||||
|
tick_labels = similar(ticks[2])
|
||||||
|
for (i, label) in enumerate(ticks[2])
|
||||||
|
base, power = split(label, "^")
|
||||||
|
power = string("{", power, "}")
|
||||||
|
tick_labels[i] = string(base, "^", power)
|
||||||
|
end
|
||||||
if tick_labels isa Vector{String}
|
if tick_labels isa Vector{String}
|
||||||
push!(
|
push!(
|
||||||
opt,
|
opt,
|
||||||
@ -1348,7 +1309,6 @@ function pgfx_axis!(opt::PGFPlotsX.Options, sp::Subplot, letter)
|
|||||||
elseif axis[:showaxis]
|
elseif axis[:showaxis]
|
||||||
tick_labels =
|
tick_labels =
|
||||||
ispolar(sp) && letter == :x ? [ticks[2][3:end]..., "0", "45"] : ticks[2]
|
ispolar(sp) && letter == :x ? [ticks[2][3:end]..., "0", "45"] : ticks[2]
|
||||||
is_log_scale && (tick_labels = wrap_power_labels(tick_labels))
|
|
||||||
if axis[:formatter] in (:scientific, :auto) && tick_labels isa Vector{String}
|
if axis[:formatter] in (:scientific, :auto) && tick_labels isa Vector{String}
|
||||||
tick_labels = string.("\$", convert_sci_unicode.(tick_labels), "\$")
|
tick_labels = string.("\$", convert_sci_unicode.(tick_labels), "\$")
|
||||||
tick_labels = replace.(tick_labels, Ref("×" => "\\times"))
|
tick_labels = replace.(tick_labels, Ref("×" => "\\times"))
|
||||||
@ -1465,7 +1425,7 @@ end
|
|||||||
# Set the (left, top, right, bottom) minimum padding around the plot area
|
# Set the (left, top, right, bottom) minimum padding around the plot area
|
||||||
# to fit ticks, tick labels, guides, colorbars, etc.
|
# to fit ticks, tick labels, guides, colorbars, etc.
|
||||||
function _update_min_padding!(sp::Subplot{PGFPlotsXBackend})
|
function _update_min_padding!(sp::Subplot{PGFPlotsXBackend})
|
||||||
leg = sp[:legend_position]
|
leg = sp[:legend]
|
||||||
if leg in (:best, :outertopright, :outerright, :outerbottomright) ||
|
if leg in (:best, :outertopright, :outerright, :outerbottomright) ||
|
||||||
(leg isa Tuple && leg[1] >= 1)
|
(leg isa Tuple && leg[1] >= 1)
|
||||||
sp.minpad = (0mm, 0mm, 5mm, 0mm)
|
sp.minpad = (0mm, 0mm, 5mm, 0mm)
|
||||||
|
|||||||
@ -338,12 +338,12 @@ function plotly_layout(plt::Plot)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function plotly_add_legend!(plotattributes_out::KW, sp::Subplot)
|
function plotly_add_legend!(plotattributes_out::KW, sp::Subplot)
|
||||||
plotattributes_out[:showlegend] = sp[:legend_position] != :none
|
plotattributes_out[:showlegend] = sp[:legend] != :none
|
||||||
legend_position = plotly_legend_pos(sp[:legend_position])
|
legend_position = plotly_legend_pos(sp[:legend])
|
||||||
if sp[:legend_position] != :none
|
if sp[:legend] != :none
|
||||||
plotattributes_out[:legend_position] = KW(
|
plotattributes_out[:legend] = KW(
|
||||||
:bgcolor => rgba_string(sp[:legend_background_color]),
|
:bgcolor => rgba_string(sp[:background_color_legend]),
|
||||||
:bordercolor => rgba_string(sp[:legend_foreground_color]),
|
:bordercolor => rgba_string(sp[:foreground_color_legend]),
|
||||||
:borderwidth => 1,
|
:borderwidth => 1,
|
||||||
:traceorder => "normal",
|
:traceorder => "normal",
|
||||||
:xanchor => legend_position.xanchor,
|
:xanchor => legend_position.xanchor,
|
||||||
@ -353,7 +353,7 @@ function plotly_add_legend!(plotattributes_out::KW, sp::Subplot)
|
|||||||
:x => legend_position.coords[1],
|
:x => legend_position.coords[1],
|
||||||
:y => legend_position.coords[2],
|
:y => legend_position.coords[2],
|
||||||
:title => KW(
|
:title => KW(
|
||||||
:text => sp[:legend_title] === nothing ? "" : string(sp[:legend_title]),
|
:text => sp[:legendtitle] === nothing ? "" : string(sp[:legendtitle]),
|
||||||
:font => plotly_font(legendtitlefont(sp)),
|
:font => plotly_font(legendtitlefont(sp)),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -362,7 +362,6 @@ end
|
|||||||
|
|
||||||
function plotly_legend_pos(pos::Symbol)
|
function plotly_legend_pos(pos::Symbol)
|
||||||
xleft = 0.07
|
xleft = 0.07
|
||||||
xright = 1.0
|
|
||||||
ybot = 0.07
|
ybot = 0.07
|
||||||
ytop = 1.0
|
ytop = 1.0
|
||||||
xcenter = 0.55
|
xcenter = 0.55
|
||||||
@ -373,14 +372,14 @@ function plotly_legend_pos(pos::Symbol)
|
|||||||
xouterright = 1.05
|
xouterright = 1.05
|
||||||
xouterleft = -0.15
|
xouterleft = -0.15
|
||||||
plotly_legend_position_mapping = (
|
plotly_legend_position_mapping = (
|
||||||
right = (coords = [xright, ycenter], xanchor = "right", yanchor = "middle"),
|
right = (coords = [1.0, ycenter], xanchor = "right", yanchor = "middle"),
|
||||||
left = (coords = [xleft, ycenter], xanchor = "left", yanchor = "middle"),
|
left = (coords = [xleft, ycenter], xanchor = "left", yanchor = "middle"),
|
||||||
top = (coords = [xcenter, ytop], xanchor = "center", yanchor = "top"),
|
top = (coords = [xcenter, ytop], xanchor = "center", yanchor = "top"),
|
||||||
bottom = (coords = [xcenter, ybot], xanchor = "center", yanchor = "bottom"),
|
bottom = (coords = [xcenter, ybot], xanchor = "center", yanchor = "bottom"),
|
||||||
bottomleft = (coords = [xleft, ybot], xanchor = "left", yanchor = "bottom"),
|
bottomleft = (coords = [xleft, ybot], xanchor = "left", yanchor = "bottom"),
|
||||||
bottomright = (coords = [xright, ybot], xanchor = "right", yanchor = "bottom"),
|
bottomright = (coords = [1.0, ybot], xanchor = "right", yanchor = "bottom"),
|
||||||
topright = (coords = [xright, ytop], xanchor = "right", yanchor = "top"),
|
topright = (coords = [1.0, 1.0], xanchor = "right", yanchor = "top"),
|
||||||
topleft = (coords = [xleft, ytop], xanchor = "left", yanchor = "top"),
|
topleft = (coords = [xleft, 1.0], xanchor = "left", yanchor = "top"),
|
||||||
outertop = (coords = [center, youtertop], xanchor = "upper", yanchor = "middle"),
|
outertop = (coords = [center, youtertop], xanchor = "upper", yanchor = "middle"),
|
||||||
outerbottom = (coords = [center, youterbot], xanchor = "lower", yanchor = "middle"),
|
outerbottom = (coords = [center, youterbot], xanchor = "lower", yanchor = "middle"),
|
||||||
outerleft = (coords = [xouterleft, center], xanchor = "left", yanchor = "top"),
|
outerleft = (coords = [xouterleft, center], xanchor = "left", yanchor = "top"),
|
||||||
@ -401,7 +400,7 @@ function plotly_legend_pos(pos::Symbol)
|
|||||||
xanchor = "lower",
|
xanchor = "lower",
|
||||||
yanchor = "right",
|
yanchor = "right",
|
||||||
),
|
),
|
||||||
default = (coords = [xright, ytop], xanchor = "auto", yanchor = "auto"),
|
default = (coords = [1.0, 1.0], xanchor = "auto", yanchor = "auto"),
|
||||||
)
|
)
|
||||||
|
|
||||||
legend_position =
|
legend_position =
|
||||||
@ -679,7 +678,6 @@ function plotly_series(plt::Plot, series::Series)
|
|||||||
|
|
||||||
if series[:connections] !== nothing
|
if series[:connections] !== nothing
|
||||||
if typeof(series[:connections]) <: Tuple{Array,Array,Array}
|
if typeof(series[:connections]) <: Tuple{Array,Array,Array}
|
||||||
# 0-based indexing
|
|
||||||
i, j, k = series[:connections]
|
i, j, k = series[:connections]
|
||||||
if !(length(i) == length(j) == length(k))
|
if !(length(i) == length(j) == length(k))
|
||||||
throw(
|
throw(
|
||||||
@ -691,20 +689,10 @@ function plotly_series(plt::Plot, series::Series)
|
|||||||
plotattributes_out[:i] = i
|
plotattributes_out[:i] = i
|
||||||
plotattributes_out[:j] = j
|
plotattributes_out[:j] = j
|
||||||
plotattributes_out[:k] = k
|
plotattributes_out[:k] = k
|
||||||
elseif typeof(series[:connections]) <: AbstractVector{NTuple{3,Int}}
|
|
||||||
# 1-based indexing
|
|
||||||
i, j, k = broadcast(
|
|
||||||
i -> [inds[i] - 1 for inds in series[:connections]],
|
|
||||||
(1, 2, 3),
|
|
||||||
)
|
|
||||||
plotattributes_out[:i] = i
|
|
||||||
plotattributes_out[:j] = j
|
|
||||||
plotattributes_out[:k] = k
|
|
||||||
else
|
else
|
||||||
throw(
|
throw(
|
||||||
ArgumentError(
|
ArgumentError(
|
||||||
"Argument connections has to be either a tuple of three arrays (0-based indexing)
|
"Argument connections has to be a tuple of three arrays.",
|
||||||
or an AbstractVector{NTuple{3,Int}} (1-based indexing).",
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@ -752,14 +740,14 @@ function plotly_series(plt::Plot, series::Series)
|
|||||||
end
|
end
|
||||||
|
|
||||||
plotly_polar!(plotattributes_out, series)
|
plotly_polar!(plotattributes_out, series)
|
||||||
plotly_adjust_hover_label!(plotattributes_out, series[:hover])
|
plotly_hover!(plotattributes_out, series[:hover])
|
||||||
|
|
||||||
return [merge(plotattributes_out, series[:extra_kwargs])]
|
return [plotattributes_out]
|
||||||
end
|
end
|
||||||
|
|
||||||
function plotly_series_shapes(plt::Plot, series::Series, clims)
|
function plotly_series_shapes(plt::Plot, series::Series, clims)
|
||||||
segments = series_segments(series; check = true)
|
segments = series_segments(series; check = true)
|
||||||
plotattributes_outs = [KW() for _ in 1:length(segments)]
|
plotattributes_outs = Vector{KW}(undef, length(segments))
|
||||||
|
|
||||||
# TODO: create a plotattributes_out for each polygon
|
# TODO: create a plotattributes_out for each polygon
|
||||||
# x, y = series[:x], series[:y]
|
# x, y = series[:x], series[:y]
|
||||||
@ -807,8 +795,8 @@ function plotly_series_shapes(plt::Plot, series::Series, clims)
|
|||||||
end
|
end
|
||||||
plotattributes_out[:showlegend] = k == 1 ? should_add_to_legend(series) : false
|
plotattributes_out[:showlegend] = k == 1 ? should_add_to_legend(series) : false
|
||||||
plotly_polar!(plotattributes_out, series)
|
plotly_polar!(plotattributes_out, series)
|
||||||
plotly_adjust_hover_label!(plotattributes_out, _cycle(series[:hover], i))
|
plotly_hover!(plotattributes_out, _cycle(series[:hover], i))
|
||||||
plotattributes_outs[k] = merge(plotattributes_out, series[:extra_kwargs])
|
plotattributes_outs[k] = plotattributes_out
|
||||||
end
|
end
|
||||||
if series[:fill_z] !== nothing
|
if series[:fill_z] !== nothing
|
||||||
push!(plotattributes_outs, plotly_colorbar_hack(series, plotattributes_base, :fill))
|
push!(plotattributes_outs, plotly_colorbar_hack(series, plotattributes_base, :fill))
|
||||||
@ -931,7 +919,7 @@ function plotly_series_segments(series::Series, plotattributes_base::KW, x, y, z
|
|||||||
end
|
end
|
||||||
|
|
||||||
plotly_polar!(plotattributes_out, series)
|
plotly_polar!(plotattributes_out, series)
|
||||||
plotly_adjust_hover_label!(plotattributes_out, _cycle(series[:hover], rng))
|
plotly_hover!(plotattributes_out, _cycle(series[:hover], rng))
|
||||||
|
|
||||||
if hasfillrange
|
if hasfillrange
|
||||||
# if hasfillrange is true, return two dictionaries (one for original
|
# if hasfillrange is true, return two dictionaries (one for original
|
||||||
@ -940,7 +928,7 @@ function plotly_series_segments(series::Series, plotattributes_base::KW, x, y, z
|
|||||||
plotattributes_out_fillrange[:showlegend] = false
|
plotattributes_out_fillrange[:showlegend] = false
|
||||||
# if fillrange is provided as real or tuple of real, expand to array
|
# if fillrange is provided as real or tuple of real, expand to array
|
||||||
if typeof(series[:fillrange]) <: Real
|
if typeof(series[:fillrange]) <: Real
|
||||||
plotattributes_out[:fillrange] = fill(series[:fillrange], length(rng))
|
series[:fillrange] = fill(series[:fillrange], length(rng))
|
||||||
elseif typeof(series[:fillrange]) <: Tuple
|
elseif typeof(series[:fillrange]) <: Tuple
|
||||||
f1 =
|
f1 =
|
||||||
typeof(series[:fillrange][1]) <: Real ?
|
typeof(series[:fillrange][1]) <: Real ?
|
||||||
@ -948,7 +936,7 @@ function plotly_series_segments(series::Series, plotattributes_base::KW, x, y, z
|
|||||||
f2 =
|
f2 =
|
||||||
typeof(series[:fillrange][2]) <: Real ?
|
typeof(series[:fillrange][2]) <: Real ?
|
||||||
fill(series[:fillrange][2], length(rng)) : series[:fillrange][2][rng]
|
fill(series[:fillrange][2], length(rng)) : series[:fillrange][2][rng]
|
||||||
plotattributes_out[:fillrange] = (f1, f2)
|
series[:fillrange] = (f1, f2)
|
||||||
end
|
end
|
||||||
if isa(series[:fillrange], AbstractVector)
|
if isa(series[:fillrange], AbstractVector)
|
||||||
plotattributes_out_fillrange[:y] = series[:fillrange][rng]
|
plotattributes_out_fillrange[:y] = series[:fillrange][rng]
|
||||||
@ -969,7 +957,6 @@ function plotly_series_segments(series::Series, plotattributes_base::KW, x, y, z
|
|||||||
else
|
else
|
||||||
plotattributes_outs[k] = plotattributes_out
|
plotattributes_outs[k] = plotattributes_out
|
||||||
end
|
end
|
||||||
plotattributes_outs[k] = merge(plotattributes_outs[k], series[:extra_kwargs])
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if series[:line_z] !== nothing
|
if series[:line_z] !== nothing
|
||||||
@ -1014,30 +1001,28 @@ function plotly_polar!(plotattributes_out::KW, series::Series)
|
|||||||
# convert polar plots x/y to theta/radius
|
# convert polar plots x/y to theta/radius
|
||||||
if ispolar(series[:subplot])
|
if ispolar(series[:subplot])
|
||||||
theta, r = pop!(plotattributes_out, :x), pop!(plotattributes_out, :y)
|
theta, r = pop!(plotattributes_out, :x), pop!(plotattributes_out, :y)
|
||||||
plotattributes_out[:theta] = rad2deg.(theta)
|
plotattributes_out[:t] = rad2deg.(theta)
|
||||||
plotattributes_out[:r] = r
|
plotattributes_out[:r] = r
|
||||||
plotattributes_out[:type] = :scatterpolar
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function plotly_adjust_hover_label!(plotattributes_out::KW, hover)
|
function plotly_hover!(plotattributes_out::KW, hover)
|
||||||
if hover === nothing
|
# hover text
|
||||||
return nothing
|
if hover === nothing || all(in([:none, false]), hover)
|
||||||
elseif all(in([:none, false]), hover)
|
|
||||||
plotattributes_out[:hoverinfo] = "none"
|
plotattributes_out[:hoverinfo] = "none"
|
||||||
elseif any(!isnothing, hover)
|
elseif any(!isnothing, hover)
|
||||||
plotattributes_out[:hoverinfo] = "text"
|
plotattributes_out[:hoverinfo] = "text"
|
||||||
plotattributes_out[:text] = hover
|
plotattributes_out[:text] = hover
|
||||||
end
|
end
|
||||||
return nothing
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# get a list of dictionaries, each representing the series params
|
# get a list of dictionaries, each representing the series params
|
||||||
function plotly_series(plt::Plot)
|
function plotly_series(plt::Plot)
|
||||||
if isempty(plt.series_list)
|
slist = []
|
||||||
return KW[]
|
for series in plt.series_list
|
||||||
|
append!(slist, plotly_series(plt, series))
|
||||||
end
|
end
|
||||||
reduce(vcat, plotly_series(plt, series) for series in plt.series_list)
|
slist
|
||||||
end
|
end
|
||||||
|
|
||||||
# get json string for a list of dictionaries, each representing the series params
|
# get json string for a list of dictionaries, each representing the series params
|
||||||
@ -1107,12 +1092,16 @@ end
|
|||||||
|
|
||||||
function js_body(plt::Plot, uuid)
|
function js_body(plt::Plot, uuid)
|
||||||
js = """
|
js = """
|
||||||
Plotly.newPlot('$(uuid)', $(plotly_series_json(plt)), $(plotly_layout_json(plt)));
|
var PLOT = document.getElementById('$(uuid)');
|
||||||
|
Plotly.plot(PLOT, $(plotly_series_json(plt)), $(plotly_layout_json(plt)));
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
function plotly_show_js(io::IO, plot::Plot)
|
function plotly_show_js(io::IO, plot::Plot)
|
||||||
data = plotly_series(plot)
|
data = []
|
||||||
|
for series in plot.series_list
|
||||||
|
append!(data, plotly_series(plot, series))
|
||||||
|
end
|
||||||
layout = plotly_layout(plot)
|
layout = plotly_layout(plot)
|
||||||
JSON.print(io, Dict(:data => data, :layout => layout))
|
JSON.print(io, Dict(:data => data, :layout => layout))
|
||||||
end
|
end
|
||||||
|
|||||||
@ -8,7 +8,6 @@ function plotlyjs_syncplot(plt::Plot{PlotlyJSBackend})
|
|||||||
traces = PlotlyJS.GenericTrace[]
|
traces = PlotlyJS.GenericTrace[]
|
||||||
for series_dict in plotly_series(plt)
|
for series_dict in plotly_series(plt)
|
||||||
plotly_type = pop!(series_dict, :type)
|
plotly_type = pop!(series_dict, :type)
|
||||||
series_dict[:transpose] = false
|
|
||||||
push!(traces, PlotlyJS.GenericTrace(plotly_type; series_dict...))
|
push!(traces, PlotlyJS.GenericTrace(plotly_type; series_dict...))
|
||||||
end
|
end
|
||||||
PlotlyJS.addtraces!(plt.o, traces...)
|
PlotlyJS.addtraces!(plt.o, traces...)
|
||||||
|
|||||||
@ -26,25 +26,9 @@ pyrcparams = PyPlot.PyDict(PyPlot.matplotlib."rcParams")
|
|||||||
|
|
||||||
# "support" matplotlib v3.4
|
# "support" matplotlib v3.4
|
||||||
if PyPlot.version < v"3.4"
|
if PyPlot.version < v"3.4"
|
||||||
@warn("""You are using Matplotlib $(PyPlot.version), which is no longer
|
@warn("You are using Matplotlib $(PyPlot.version), which is no longer
|
||||||
officialy supported by the Plots community. To ensure smooth Plots.jl
|
officialy supported by the Plots community. To ensure smooth Plots.jl
|
||||||
integration update your Matplotlib library to a version >= 3.4.0
|
integration update your Matplotlib library to a version >= 3.4.0")
|
||||||
|
|
||||||
If you have used Conda.jl to install PyPlot (default installation),
|
|
||||||
upgrade your matplotlib via Conda.jl and rebuild the PyPlot.
|
|
||||||
|
|
||||||
If you are not sure, here are the default instructions:
|
|
||||||
|
|
||||||
In Julia REPL:
|
|
||||||
```
|
|
||||||
import Pkg;
|
|
||||||
Pkg.add("Conda")
|
|
||||||
import Conda
|
|
||||||
Conda.update()
|
|
||||||
Pkg.build("PyPlot")
|
|
||||||
```
|
|
||||||
|
|
||||||
""")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
set_facecolor_sym = if PyPlot.version < v"2"
|
set_facecolor_sym = if PyPlot.version < v"2"
|
||||||
@ -698,50 +682,6 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if st == :mesh3d
|
|
||||||
polygons = if series[:connections] isa AbstractVector{<:AbstractVector{Int}}
|
|
||||||
# Combination of any polygon types
|
|
||||||
broadcast(inds -> broadcast(i -> [x[i], y[i], z[i]], inds), series[:connections])
|
|
||||||
elseif series[:connections] isa AbstractVector{NTuple{N,Int}} where {N}
|
|
||||||
# Only N-gons - connections have to be 1-based (indexing)
|
|
||||||
broadcast(inds -> broadcast(i -> [x[i], y[i], z[i]], inds), series[:connections])
|
|
||||||
elseif series[:connections] isa NTuple{3,<:AbstractVector{Int}}
|
|
||||||
# Only triangles - connections have to be 0-based (indexing)
|
|
||||||
ci, cj, ck = series[:connections]
|
|
||||||
if !(length(ci) == length(cj) == length(ck))
|
|
||||||
throw(
|
|
||||||
ArgumentError(
|
|
||||||
"Argument connections must consist of equally sized arrays.",
|
|
||||||
),
|
|
||||||
)
|
|
||||||
end
|
|
||||||
broadcast(
|
|
||||||
j -> broadcast(i -> [x[i], y[i], z[i]], [ci[j] + 1, cj[j] + 1, ck[j] + 1]),
|
|
||||||
eachindex(ci),
|
|
||||||
)
|
|
||||||
else
|
|
||||||
throw(
|
|
||||||
ArgumentError(
|
|
||||||
"Unsupported `:connections` type $(typeof(series[:connections])) for seriestype=$st",
|
|
||||||
),
|
|
||||||
)
|
|
||||||
end
|
|
||||||
col = mplot3d.art3d.Poly3DCollection(
|
|
||||||
polygons,
|
|
||||||
linewidths = py_thickness_scale(plt, series[:linewidth]),
|
|
||||||
edgecolor = py_color(get_linecolor(series)),
|
|
||||||
facecolor = py_color(series[:fillcolor]),
|
|
||||||
alpha = get_fillalpha(series),
|
|
||||||
zorder = series[:series_plotindex],
|
|
||||||
)
|
|
||||||
handle = ax."add_collection3d"(col)
|
|
||||||
# Fix for handle: https://stackoverflow.com/questions/54994600/pyplot-legend-poly3dcollection-object-has-no-attribute-edgecolors2d
|
|
||||||
# It seems there aren't two different alpha values for edge and face
|
|
||||||
handle._facecolors2d = py_color(series[:fillcolor])
|
|
||||||
handle._edgecolors2d = py_color(get_linecolor(series))
|
|
||||||
push!(handles, handle)
|
|
||||||
end
|
|
||||||
|
|
||||||
if st == :image
|
if st == :image
|
||||||
xmin, xmax = ignorenan_extrema(series[:x])
|
xmin, xmax = ignorenan_extrema(series[:x])
|
||||||
ymin, ymax = ignorenan_extrema(series[:y])
|
ymin, ymax = ignorenan_extrema(series[:y])
|
||||||
@ -981,7 +921,7 @@ end
|
|||||||
|
|
||||||
function py_set_spine_color(spines, color)
|
function py_set_spine_color(spines, color)
|
||||||
for loc in spines
|
for loc in spines
|
||||||
getproperty(spines, loc)."set_color"(color)
|
spines[loc]."set_color"(color)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -1206,7 +1146,7 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
|||||||
if !ispolar(sp) && !RecipesPipeline.is3d(sp)
|
if !ispolar(sp) && !RecipesPipeline.is3d(sp)
|
||||||
for pos in ("left", "right", "top", "bottom")
|
for pos in ("left", "right", "top", "bottom")
|
||||||
# Scale all axes by default first
|
# Scale all axes by default first
|
||||||
getproperty(ax.spines, pos)."set_linewidth"(py_thickness_scale(plt, 1))
|
ax.spines[pos]."set_linewidth"(py_thickness_scale(plt, 1))
|
||||||
end
|
end
|
||||||
|
|
||||||
# Then set visible some of them
|
# Then set visible some of them
|
||||||
@ -1214,32 +1154,28 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
|||||||
intensity = 0.5
|
intensity = 0.5
|
||||||
|
|
||||||
spine = sp[:yaxis][:mirror] ? "left" : "right"
|
spine = sp[:yaxis][:mirror] ? "left" : "right"
|
||||||
getproperty(ax.spines, spine)."set_alpha"(intensity)
|
ax.spines[spine]."set_alpha"(intensity)
|
||||||
getproperty(ax.spines, spine)."set_linewidth"(
|
ax.spines[spine]."set_linewidth"(py_thickness_scale(plt, intensity))
|
||||||
py_thickness_scale(plt, intensity),
|
|
||||||
)
|
|
||||||
|
|
||||||
spine = sp[:xaxis][:mirror] ? "bottom" : "top"
|
spine = sp[:xaxis][:mirror] ? "bottom" : "top"
|
||||||
getproperty(ax.spines, spine)."set_linewidth"(
|
ax.spines[spine]."set_linewidth"(py_thickness_scale(plt, intensity))
|
||||||
py_thickness_scale(plt, intensity),
|
ax.spines[spine]."set_alpha"(intensity)
|
||||||
)
|
|
||||||
getproperty(ax.spines, spine)."set_alpha"(intensity)
|
|
||||||
elseif sp[:framestyle] == :box
|
elseif sp[:framestyle] == :box
|
||||||
ax.tick_params(top = true) # Add ticks too
|
ax.tick_params(top = true) # Add ticks too
|
||||||
ax.tick_params(right = true) # Add ticks too
|
ax.tick_params(right = true) # Add ticks too
|
||||||
elseif sp[:framestyle] in (:axes, :origin)
|
elseif sp[:framestyle] in (:axes, :origin)
|
||||||
sp[:xaxis][:mirror] ? ax.spines."bottom"."set_visible"(false) :
|
sp[:xaxis][:mirror] ? ax.spines["bottom"]."set_visible"(false) :
|
||||||
ax.spines."top"."set_visible"(false)
|
ax.spines["top"]."set_visible"(false)
|
||||||
sp[:yaxis][:mirror] ? ax.spines."left"."set_visible"(false) :
|
sp[:yaxis][:mirror] ? ax.spines["left"]."set_visible"(false) :
|
||||||
ax.spines."right"."set_visible"(false)
|
ax.spines["right"]."set_visible"(false)
|
||||||
if sp[:framestyle] == :origin
|
if sp[:framestyle] == :origin
|
||||||
ax.spines."bottom"."set_position"("zero")
|
ax.spines["bottom"]."set_position"("zero")
|
||||||
ax.spines."left"."set_position"("zero")
|
ax.spines["left"]."set_position"("zero")
|
||||||
end
|
end
|
||||||
elseif sp[:framestyle] in (:grid, :none, :zerolines)
|
elseif sp[:framestyle] in (:grid, :none, :zerolines)
|
||||||
if PyPlot.version >= v"3.4.1" # that is one where it worked, the API change may have some other value
|
if PyPlot.version >= v"3.4.1" # that is one where it worked, the API change may have some other value
|
||||||
for spine in ax.spines
|
for spine in ax.spines
|
||||||
getproperty(ax.spines, string(spine))."set_visible"(false)
|
ax.spines[string(spine)]."set_visible"(false)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
for (loc, spine) in ax.spines
|
for (loc, spine) in ax.spines
|
||||||
@ -1283,7 +1219,7 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
|||||||
end
|
end
|
||||||
|
|
||||||
py_set_scale(ax, sp, axis)
|
py_set_scale(ax, sp, axis)
|
||||||
py_set_lims(ax, sp, axis)
|
axis[:ticks] == :native ? nothing : py_set_lims(ax, sp, axis)
|
||||||
if ispolar(sp) && letter == :y
|
if ispolar(sp) && letter == :y
|
||||||
ax."set_rlabel_position"(90)
|
ax."set_rlabel_position"(90)
|
||||||
end
|
end
|
||||||
@ -1297,8 +1233,8 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
|||||||
fontProperties = PyPlot.PyCall.PyDict(
|
fontProperties = PyPlot.PyCall.PyDict(
|
||||||
Dict(
|
Dict(
|
||||||
"family" => axis[:tickfontfamily],
|
"family" => axis[:tickfontfamily],
|
||||||
# "math_fontfamily" =>
|
"math_fontfamily" =>
|
||||||
# py_get_matching_math_font(axis[:tickfontfamily]),
|
py_get_matching_math_font(axis[:tickfontfamily]),
|
||||||
"size" => py_thickness_scale(plt, axis[:tickfontsize]),
|
"size" => py_thickness_scale(plt, axis[:tickfontsize]),
|
||||||
"rotation" => axis[:tickfontrotation],
|
"rotation" => axis[:tickfontrotation],
|
||||||
),
|
),
|
||||||
@ -1318,14 +1254,7 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
py_set_ticks(sp, ax, ticks, letter)
|
axis[:ticks] == :native ? nothing : py_set_ticks(sp, ax, ticks, letter)
|
||||||
|
|
||||||
if axis[:ticks] == :native # It is easier to reset than to account for this
|
|
||||||
py_set_lims(ax, sp, axis)
|
|
||||||
pyaxis.set_major_locator(pyticker.AutoLocator())
|
|
||||||
pyaxis.set_major_formatter(pyticker.ScalarFormatter())
|
|
||||||
end
|
|
||||||
|
|
||||||
# Tick marks
|
# Tick marks
|
||||||
intensity = 0.5 # This value corresponds to scaling of other grid elements
|
intensity = 0.5 # This value corresponds to scaling of other grid elements
|
||||||
pyaxis."set_tick_params"(
|
pyaxis."set_tick_params"(
|
||||||
@ -1410,11 +1339,11 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
|||||||
if !sp[:xaxis][:showaxis]
|
if !sp[:xaxis][:showaxis]
|
||||||
kw = KW()
|
kw = KW()
|
||||||
if ispolar(sp)
|
if ispolar(sp)
|
||||||
ax.spines."polar".set_visible(false)
|
ax.spines["polar"].set_visible(false)
|
||||||
end
|
end
|
||||||
for dir in (:top, :bottom)
|
for dir in (:top, :bottom)
|
||||||
if !ispolar(sp)
|
if !ispolar(sp)
|
||||||
getproperty(ax.spines, string(dir)).set_visible(false)
|
ax.spines[string(dir)].set_visible(false)
|
||||||
end
|
end
|
||||||
kw[dir] = kw[get_attr_symbol(:label, dir)] = false
|
kw[dir] = kw[get_attr_symbol(:label, dir)] = false
|
||||||
end
|
end
|
||||||
@ -1424,7 +1353,7 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
|||||||
kw = KW()
|
kw = KW()
|
||||||
for dir in (:left, :right)
|
for dir in (:left, :right)
|
||||||
if !ispolar(sp)
|
if !ispolar(sp)
|
||||||
getproperty(ax.spines, string(dir)).set_visible(false)
|
ax.spines[string(dir)].set_visible(false)
|
||||||
end
|
end
|
||||||
kw[dir] = kw[get_attr_symbol(:label, dir)] = false
|
kw[dir] = kw[get_attr_symbol(:label, dir)] = false
|
||||||
end
|
end
|
||||||
@ -1566,7 +1495,7 @@ end
|
|||||||
py_legend_bbox(pos) = pos
|
py_legend_bbox(pos) = pos
|
||||||
|
|
||||||
function py_add_legend(plt::Plot, sp::Subplot, ax)
|
function py_add_legend(plt::Plot, sp::Subplot, ax)
|
||||||
leg = sp[:legend_position]
|
leg = sp[:legend]
|
||||||
if leg != :none
|
if leg != :none
|
||||||
# gotta do this to ensure both axes are included
|
# gotta do this to ensure both axes are included
|
||||||
labels = []
|
labels = []
|
||||||
@ -1627,7 +1556,7 @@ function py_add_legend(plt::Plot, sp::Subplot, ax)
|
|||||||
),
|
),
|
||||||
linewidth = py_thickness_scale(
|
linewidth = py_thickness_scale(
|
||||||
plt,
|
plt,
|
||||||
hasline * sp[:legend_font_pointsize] / 8,
|
hasline * sp[:legendfontsize] / 8,
|
||||||
),
|
),
|
||||||
linestyle = py_linestyle(:path, get_linestyle(series)),
|
linestyle = py_linestyle(:path, get_linestyle(series)),
|
||||||
solid_capstyle = "butt",
|
solid_capstyle = "butt",
|
||||||
@ -1635,10 +1564,7 @@ function py_add_legend(plt::Plot, sp::Subplot, ax)
|
|||||||
dash_capstyle = "butt",
|
dash_capstyle = "butt",
|
||||||
dash_joinstyle = "miter",
|
dash_joinstyle = "miter",
|
||||||
marker = py_marker(_cycle(series[:markershape], 1)),
|
marker = py_marker(_cycle(series[:markershape], 1)),
|
||||||
markersize = py_thickness_scale(
|
markersize = py_thickness_scale(plt, 0.8 * sp[:legendfontsize]),
|
||||||
plt,
|
|
||||||
0.8 * sp[:legend_font_pointsize],
|
|
||||||
),
|
|
||||||
markeredgecolor = py_color(
|
markeredgecolor = py_color(
|
||||||
single_color(get_markerstrokecolor(series)),
|
single_color(get_markerstrokecolor(series)),
|
||||||
get_markerstrokealpha(series),
|
get_markerstrokealpha(series),
|
||||||
@ -1649,9 +1575,8 @@ function py_add_legend(plt::Plot, sp::Subplot, ax)
|
|||||||
),
|
),
|
||||||
markeredgewidth = py_thickness_scale(
|
markeredgewidth = py_thickness_scale(
|
||||||
plt,
|
plt,
|
||||||
0.8 *
|
0.8 * get_markerstrokewidth(series) * sp[:legendfontsize] /
|
||||||
get_markerstrokewidth(series) *
|
first(series[:markersize]),
|
||||||
sp[:legend_font_pointsize] / first(series[:markersize]),
|
|
||||||
), # retain the markersize/markerstroke ratio from the markers on the plot
|
), # retain the markersize/markerstroke ratio from the markers on the plot
|
||||||
)
|
)
|
||||||
push!(handles, handle)
|
push!(handles, handle)
|
||||||
@ -1671,32 +1596,34 @@ function py_add_legend(plt::Plot, sp::Subplot, ax)
|
|||||||
loc = py_legend_pos(leg),
|
loc = py_legend_pos(leg),
|
||||||
bbox_to_anchor = py_legend_bbox(leg),
|
bbox_to_anchor = py_legend_bbox(leg),
|
||||||
scatterpoints = 1,
|
scatterpoints = 1,
|
||||||
fontsize = py_thickness_scale(plt, sp[:legend_font_pointsize]),
|
fontsize = py_thickness_scale(plt, sp[:legendfontsize]),
|
||||||
facecolor = py_color(sp[:legend_background_color]),
|
facecolor = py_color(sp[:background_color_legend]),
|
||||||
edgecolor = py_color(sp[:legend_foreground_color]),
|
edgecolor = py_color(sp[:foreground_color_legend]),
|
||||||
framealpha = alpha(plot_color(sp[:legend_background_color])),
|
framealpha = alpha(plot_color(sp[:background_color_legend])),
|
||||||
fancybox = false, # makes the legend box square
|
fancybox = false, # makes the legend box square
|
||||||
borderpad = 0.8, # to match GR legendbox
|
borderpad = 0.8, # to match GR legendbox
|
||||||
)
|
)
|
||||||
frame = leg."get_frame"()
|
frame = leg."get_frame"()
|
||||||
frame."set_linewidth"(py_thickness_scale(plt, 1))
|
frame."set_linewidth"(py_thickness_scale(plt, 1))
|
||||||
leg."set_zorder"(1000)
|
leg."set_zorder"(1000)
|
||||||
if sp[:legend_title] !== nothing
|
if sp[:legendtitle] !== nothing
|
||||||
leg."set_title"(sp[:legend_title])
|
leg."set_title"(sp[:legendtitle])
|
||||||
PyPlot.plt."setp"(
|
PyPlot.plt."setp"(
|
||||||
leg."get_title"(),
|
leg."get_title"(),
|
||||||
color = py_color(sp[:legend_title_font_color]),
|
color = py_color(sp[:legendtitlefontcolor]),
|
||||||
family = sp[:legend_title_font_family],
|
family = sp[:legendtitlefontfamily],
|
||||||
fontsize = py_thickness_scale(plt, sp[:legend_title_font_pointsize]),
|
math_fontfamily = py_get_matching_math_font(sp[:legendtitlefontfamily]),
|
||||||
|
fontsize = py_thickness_scale(plt, sp[:legendtitlefontsize]),
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
for txt in leg."get_texts"()
|
for txt in leg."get_texts"()
|
||||||
PyPlot.plt."setp"(
|
PyPlot.plt."setp"(
|
||||||
txt,
|
txt,
|
||||||
color = py_color(sp[:legend_font_color]),
|
color = py_color(sp[:legendfontcolor]),
|
||||||
family = sp[:legend_font_family],
|
family = sp[:legendfontfamily],
|
||||||
fontsize = py_thickness_scale(plt, sp[:legend_font_pointsize]),
|
math_fontfamily = py_get_matching_math_font(sp[:legendtitlefontfamily]),
|
||||||
|
fontsize = py_thickness_scale(plt, sp[:legendfontsize]),
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1725,12 +1652,7 @@ function _update_plot_object(plt::Plot{PyPlotBackend})
|
|||||||
_cbar_width - 1mm,
|
_cbar_width - 1mm,
|
||||||
height(sp.bbox) - 4mm,
|
height(sp.bbox) - 4mm,
|
||||||
)
|
)
|
||||||
pcts = get(
|
pcts = bbox_to_pcts(cb_bbox, figw, figh)
|
||||||
sp[:extra_kwargs],
|
|
||||||
"3d_colorbar_axis",
|
|
||||||
bbox_to_pcts(cb_bbox, figw, figh),
|
|
||||||
)
|
|
||||||
|
|
||||||
sp.attr[:cbar_ax]."set_position"(pcts)
|
sp.attr[:cbar_ax]."set_position"(pcts)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,224 +1,109 @@
|
|||||||
|
|
||||||
# https://github.com/JuliaPlots/UnicodePlots.jl
|
# https://github.com/JuliaPlots/UnicodePlots.jl
|
||||||
|
|
||||||
const _canvas_map = (
|
# don't warn on unsupported... there's just too many warnings!!
|
||||||
braille = UnicodePlots.BrailleCanvas,
|
warn_on_unsupported_args(::UnicodePlotsBackend, plotattributes::KW) = nothing
|
||||||
density = UnicodePlots.DensityCanvas,
|
|
||||||
heatmap = UnicodePlots.HeatmapCanvas,
|
# --------------------------------------------------------------------------------------
|
||||||
lookup = UnicodePlots.LookupCanvas,
|
|
||||||
|
_canvas_map() = (
|
||||||
ascii = UnicodePlots.AsciiCanvas,
|
ascii = UnicodePlots.AsciiCanvas,
|
||||||
block = UnicodePlots.BlockCanvas,
|
block = UnicodePlots.BlockCanvas,
|
||||||
|
braille = UnicodePlots.BrailleCanvas,
|
||||||
|
density = UnicodePlots.DensityCanvas,
|
||||||
dot = UnicodePlots.DotCanvas,
|
dot = UnicodePlots.DotCanvas,
|
||||||
|
heatmap = UnicodePlots.HeatmapCanvas,
|
||||||
|
lookup = UnicodePlots.LookupCanvas,
|
||||||
)
|
)
|
||||||
|
|
||||||
should_warn_on_unsupported(::UnicodePlotsBackend) = false
|
# do all the magic here... build it all at once, since we need to know about all the series at the very beginning
|
||||||
|
function unicodeplots_rebuild(plt::Plot{UnicodePlotsBackend})
|
||||||
function _before_layout_calcs(plt::Plot{UnicodePlotsBackend})
|
|
||||||
plt.o = UnicodePlots.Plot[]
|
plt.o = UnicodePlots.Plot[]
|
||||||
up_width = UnicodePlots.DEFAULT_WIDTH[]
|
canvas_map = _canvas_map()
|
||||||
up_height = UnicodePlots.DEFAULT_HEIGHT[]
|
|
||||||
|
|
||||||
has_layout = prod(size(plt.layout)) > 1
|
|
||||||
for sp in plt.subplots
|
for sp in plt.subplots
|
||||||
sp_kw = sp[:extra_kwargs]
|
|
||||||
xaxis = sp[:xaxis]
|
xaxis = sp[:xaxis]
|
||||||
yaxis = sp[:yaxis]
|
yaxis = sp[:yaxis]
|
||||||
xlim = collect(axis_limits(sp, :x))
|
xlim = axis_limits(sp, :x)
|
||||||
ylim = collect(axis_limits(sp, :y))
|
ylim = axis_limits(sp, :y)
|
||||||
zlim = collect(axis_limits(sp, :z))
|
|
||||||
F = float(eltype(xlim))
|
|
||||||
|
|
||||||
# We set x/y to have a single point,
|
# make vectors
|
||||||
# since we need to create the plot with some data.
|
xlim = [xlim[1], xlim[2]]
|
||||||
# Since this point is at the bottom left corner of the plot,
|
ylim = [ylim[1], ylim[2]]
|
||||||
# it should be hidden by consecutive plotting commands.
|
|
||||||
x = Vector{F}(xlim)
|
|
||||||
y = Vector{F}(ylim)
|
|
||||||
z = Vector{F}(zlim)
|
|
||||||
|
|
||||||
# create a plot window with xlim/ylim set,
|
# we set x/y to have a single point, since we need to create the plot with some data.
|
||||||
# but the X/Y vectors are outside the bounds
|
# since this point is at the bottom left corner of the plot, it shouldn't actually be shown
|
||||||
canvas = if (up_c = get(sp_kw, :canvas, :auto)) === :auto
|
x = Float64[xlim[1]]
|
||||||
|
y = Float64[ylim[1]]
|
||||||
|
|
||||||
|
# create a plot window with xlim/ylim set, but the X/Y vectors are outside the bounds
|
||||||
|
canvas_type = if (ct = _canvas_type[]) == :auto
|
||||||
isijulia() ? :ascii : :braille
|
isijulia() ? :ascii : :braille
|
||||||
else
|
else
|
||||||
up_c
|
ct
|
||||||
end
|
end
|
||||||
|
|
||||||
border = if (up_b = get(sp_kw, :border, :auto)) === :auto
|
o = UnicodePlots.Plot(
|
||||||
isijulia() ? :ascii : :solid
|
x,
|
||||||
else
|
y,
|
||||||
up_b
|
canvas_map[canvas_type];
|
||||||
end
|
title = sp[:title],
|
||||||
|
|
||||||
# blank plots will not be shown
|
|
||||||
width = has_layout && isempty(series_list(sp)) ? 0 : get(sp_kw, :width, up_width)
|
|
||||||
height = get(sp_kw, :height, up_height)
|
|
||||||
|
|
||||||
plot_3d = is3d(sp)
|
|
||||||
blend = get(sp_kw, :blend, true)
|
|
||||||
grid = xaxis[:grid] && yaxis[:grid]
|
|
||||||
quiver = contour = false
|
|
||||||
for series in series_list(sp)
|
|
||||||
st = series[:seriestype]
|
|
||||||
blend &= get(series[:extra_kwargs], :blend, true)
|
|
||||||
quiver |= series[:arrow] isa Arrow # post-pipeline detection (:quiver -> :path)
|
|
||||||
contour |= st === :contour
|
|
||||||
if st === :histogram2d
|
|
||||||
xlim = ylim = (0, 0)
|
|
||||||
elseif st === :spy || st === :heatmap
|
|
||||||
width = height = 0
|
|
||||||
grid = false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
grid &= !(quiver || contour)
|
|
||||||
blend &= !(quiver || contour)
|
|
||||||
|
|
||||||
plot_3d && (xlim = ylim = (0, 0)) # determined using projection
|
|
||||||
azimuth, elevation = sp[:camera] # PyPlot: azimuth = -60 & elevation = 30
|
|
||||||
projection = plot_3d ? get(sp_kw, :projection, :orthographic) : nothing
|
|
||||||
|
|
||||||
kw = (
|
|
||||||
compact = true,
|
|
||||||
title = texmath2unicode(sp[:title]),
|
|
||||||
xlabel = texmath2unicode(xaxis[:guide]),
|
|
||||||
ylabel = texmath2unicode(yaxis[:guide]),
|
|
||||||
grid = grid,
|
|
||||||
blend = blend,
|
|
||||||
height = height,
|
|
||||||
width = width,
|
|
||||||
xscale = xaxis[:scale],
|
|
||||||
yscale = yaxis[:scale],
|
|
||||||
border = border,
|
|
||||||
xlim = xlim,
|
xlim = xlim,
|
||||||
ylim = ylim,
|
ylim = ylim,
|
||||||
# 3d
|
xlabel = xaxis[:guide],
|
||||||
projection = projection,
|
ylabel = yaxis[:guide],
|
||||||
elevation = elevation,
|
border = isijulia() ? :ascii : :solid,
|
||||||
azimuth = azimuth,
|
|
||||||
zoom = get(sp_kw, :zoom, 1),
|
|
||||||
up = get(sp_kw, :up, :z),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
o = UnicodePlots.Plot(x, y, plot_3d ? z : nothing, _canvas_map[canvas]; kw...)
|
|
||||||
for series in series_list(sp)
|
for series in series_list(sp)
|
||||||
o = addUnicodeSeries!(
|
o = addUnicodeSeries!(sp, o, series, sp[:legend] != :none, xlim, ylim)
|
||||||
sp,
|
|
||||||
o,
|
|
||||||
kw,
|
|
||||||
series,
|
|
||||||
sp[:legend_position] !== :none,
|
|
||||||
plot_3d,
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
for ann in sp[:annotations]
|
|
||||||
x, y, val = locate_annotation(sp, ann...)
|
|
||||||
o = UnicodePlots.annotate!(
|
|
||||||
o,
|
|
||||||
x,
|
|
||||||
y,
|
|
||||||
texmath2unicode(val.str);
|
|
||||||
color = up_color(val.font.color),
|
|
||||||
halign = val.font.halign,
|
|
||||||
valign = val.font.valign,
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
push!(plt.o, o) # save the object
|
push!(plt.o, o) # save the object
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
up_color(col::UnicodePlots.UserColorType) = col
|
|
||||||
up_color(col::RGBA) =
|
|
||||||
(c = convert(ARGB32, col); map(Int, (red(c).i, green(c).i, blue(c).i)))
|
|
||||||
up_color(col) = :auto
|
|
||||||
|
|
||||||
function up_cmap(series)
|
|
||||||
rng = range(0, 1, length = length(UnicodePlots.COLOR_MAP_DATA[:viridis]))
|
|
||||||
[(red(c), green(c), blue(c)) for c in get(get_colorgradient(series), rng)]
|
|
||||||
end
|
|
||||||
|
|
||||||
# add a single series
|
# add a single series
|
||||||
function addUnicodeSeries!(
|
function addUnicodeSeries!(
|
||||||
sp::Subplot{UnicodePlotsBackend},
|
sp::Subplot{UnicodePlotsBackend},
|
||||||
up::UnicodePlots.Plot,
|
up::UnicodePlots.Plot,
|
||||||
kw,
|
|
||||||
series,
|
series,
|
||||||
addlegend::Bool,
|
addlegend::Bool,
|
||||||
plot_3d::Bool,
|
xlim,
|
||||||
|
ylim,
|
||||||
)
|
)
|
||||||
st = series[:seriestype]
|
st = series[:seriestype]
|
||||||
se_kw = series[:extra_kwargs]
|
|
||||||
|
|
||||||
# get the series data and label
|
# get the series data and label
|
||||||
x, y = if st === :straightline
|
x, y = if st == :straightline
|
||||||
straightline_data(series)
|
straightline_data(series)
|
||||||
elseif st === :shape
|
elseif st == :shape
|
||||||
shape_data(series)
|
shape_data(series)
|
||||||
else
|
else
|
||||||
series[:x], series[:y]
|
float(series[:x]), float(series[:y])
|
||||||
end
|
|
||||||
|
|
||||||
if ispolar(sp) || ispolar(series)
|
|
||||||
return UnicodePlots.polarplot(x, y)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# special handling (src/interface)
|
# special handling (src/interface)
|
||||||
fix_ar = get(se_kw, :fix_ar, true)
|
if st == :histogram2d
|
||||||
if st === :histogram2d
|
return UnicodePlots.densityplot(x, y)
|
||||||
return UnicodePlots.densityplot(x, y; kw...)
|
elseif st == :heatmap
|
||||||
elseif st === :spy
|
rng = range(0, 1, length = length(UnicodePlots.COLOR_MAP_DATA[:viridis]))
|
||||||
return UnicodePlots.spy(Array(series[:z]); fix_ar = fix_ar, kw...)
|
cmap = [(red(c), green(c), blue(c)) for c in get(get_colorgradient(series), rng)]
|
||||||
elseif st in (:contour, :heatmap) # 2D
|
return UnicodePlots.heatmap(
|
||||||
colormap = get(se_kw, :colormap, :none)
|
series[:z].surf;
|
||||||
kw = (
|
title = sp[:title],
|
||||||
kw...,
|
|
||||||
zlabel = sp[:colorbar_title],
|
zlabel = sp[:colorbar_title],
|
||||||
colormap = colormap === :none ? up_cmap(series) : colormap,
|
colormap = cmap,
|
||||||
colorbar = hascolorbar(sp),
|
|
||||||
)
|
|
||||||
if st === :contour
|
|
||||||
isfilledcontour(series) &&
|
|
||||||
@warn "Plots(UnicodePlots): filled contour is not implemented"
|
|
||||||
return UnicodePlots.contourplot(
|
|
||||||
x,
|
|
||||||
y,
|
|
||||||
Array(series[:z]);
|
|
||||||
kw...,
|
|
||||||
levels = series[:levels],
|
|
||||||
)
|
|
||||||
elseif st === :heatmap
|
|
||||||
return UnicodePlots.heatmap(Array(series[:z]); fix_ar = fix_ar, kw...)
|
|
||||||
end
|
|
||||||
elseif st in (:surface, :wireframe) # 3D
|
|
||||||
colormap = get(se_kw, :colormap, :none)
|
|
||||||
lines = get(se_kw, :lines, st === :wireframe)
|
|
||||||
zscale = get(se_kw, :zscale, :identity)
|
|
||||||
kw = (
|
|
||||||
kw...,
|
|
||||||
zlabel = sp[:colorbar_title],
|
|
||||||
colormap = colormap === :none ? up_cmap(series) : colormap,
|
|
||||||
colorbar = hascolorbar(sp),
|
|
||||||
color = st === :wireframe ? up_color(get_linecolor(series, 1)) : nothing,
|
|
||||||
zscale = zscale,
|
|
||||||
lines = lines,
|
|
||||||
)
|
|
||||||
return UnicodePlots.surfaceplot(x, y, Array(series[:z]); kw...)
|
|
||||||
elseif st === :mesh3d
|
|
||||||
return UnicodePlots.lineplot!(
|
|
||||||
up,
|
|
||||||
mesh3d_triangles(x, y, series[:z], series[:connections])...,
|
|
||||||
)
|
)
|
||||||
|
elseif st == :spy
|
||||||
|
return UnicodePlots.spy(series[:z].surf; title = sp[:title])
|
||||||
end
|
end
|
||||||
|
|
||||||
# now use the ! functions to add to the plot
|
# now use the ! functions to add to the plot
|
||||||
if st in (:path, :path3d, :straightline, :shape, :mesh3d)
|
if st in (:path, :straightline, :shape)
|
||||||
func = UnicodePlots.lineplot!
|
func = UnicodePlots.lineplot!
|
||||||
series_kw = (; head_tail = series[:arrow] isa Arrow ? series[:arrow].side : nothing)
|
elseif st == :scatter || series[:markershape] != :none
|
||||||
elseif st in (:scatter, :scatter3d) || series[:markershape] !== :none
|
|
||||||
func = UnicodePlots.scatterplot!
|
func = UnicodePlots.scatterplot!
|
||||||
series_kw = (; marker = series[:markershape])
|
|
||||||
else
|
else
|
||||||
error("Plots(UnicodePlots): series type $st not supported")
|
error("Series type $st not supported by UnicodePlots")
|
||||||
end
|
end
|
||||||
|
|
||||||
label = addlegend ? series[:label] : ""
|
label = addlegend ? series[:label] : ""
|
||||||
@ -226,148 +111,111 @@ function addUnicodeSeries!(
|
|||||||
for (n, segment) in enumerate(series_segments(series, st; check = true))
|
for (n, segment) in enumerate(series_segments(series, st; check = true))
|
||||||
i, rng = segment.attr_index, segment.range
|
i, rng = segment.attr_index, segment.range
|
||||||
lc = get_linecolor(series, i)
|
lc = get_linecolor(series, i)
|
||||||
up = func(
|
if typeof(lc) <: UnicodePlots.UserColorType
|
||||||
up,
|
color = lc
|
||||||
x[rng],
|
elseif typeof(lc) <: RGBA
|
||||||
y[rng],
|
lc = convert(ARGB32, lc)
|
||||||
plot_3d ? series[:z][rng] : nothing;
|
color = map(Int, (red(lc).i, green(lc).i, blue(lc).i))
|
||||||
color = up_color(lc),
|
else
|
||||||
name = n == 1 ? label : "",
|
color = :auto
|
||||||
series_kw...,
|
end
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
for (xi, yi, str, fnt) in EachAnn(series[:series_annotations], x, y)
|
up = func(up, x[rng], y[rng]; color = color, name = n == 1 ? label : "")
|
||||||
up = UnicodePlots.annotate!(
|
|
||||||
up,
|
|
||||||
xi,
|
|
||||||
yi,
|
|
||||||
str;
|
|
||||||
color = up_color(fnt.color),
|
|
||||||
halign = fnt.halign,
|
|
||||||
valign = fnt.valign,
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
return up
|
||||||
up
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------------------
|
# -------------------------------
|
||||||
|
|
||||||
function _show(io::IO, ::MIME"image/png", plt::Plot{UnicodePlotsBackend})
|
# since this is such a hack, it's only callable using `png`... should error during normal `show`
|
||||||
prepare_output(plt)
|
function png(plt::Plot{UnicodePlotsBackend}, fn::AbstractString)
|
||||||
nr, nc = size(plt.layout)
|
fn = addExtension(fn, "png")
|
||||||
s1 = zeros(Int, nr, nc)
|
|
||||||
s2 = zeros(Int, nr, nc)
|
@static if Sys.isapple()
|
||||||
canvas_type = nothing
|
# make some whitespace and show the plot
|
||||||
imgs = []
|
println("\n\n\n\n\n\n")
|
||||||
sps = 0
|
gui(plt)
|
||||||
for r in 1:nr
|
|
||||||
for c in 1:nc
|
# BEGIN HACK
|
||||||
if (l = plt.layout[r, c]) isa GridLayout && size(l) != (1, 1)
|
|
||||||
error("Plots(UnicodePlots): complex nested layout is currently unsupported")
|
# wait while the plot gets drawn
|
||||||
else
|
sleep(0.5)
|
||||||
img = UnicodePlots.png_image(plt.o[sps += 1])
|
|
||||||
canvas_type = eltype(img)
|
# use osx screen capture when my terminal is maximized and cursor starts at the bottom (I know, right?)
|
||||||
h, w = size(img)
|
# TODO: compute size of plot to adjust these numbers (or maybe implement something good??)
|
||||||
s1[r, c] = h
|
run(`screencapture -R50,600,700,420 $fn`)
|
||||||
s2[r, c] = w
|
|
||||||
push!(imgs, img)
|
# END HACK (phew)
|
||||||
end
|
return
|
||||||
end
|
elseif Sys.islinux()
|
||||||
|
run(`clear`)
|
||||||
|
gui(plt)
|
||||||
|
run(`import -window $(ENV["WINDOWID"]) $fn`)
|
||||||
|
return
|
||||||
end
|
end
|
||||||
if canvas_type !== nothing
|
|
||||||
m1 = maximum(s1; dims = 2)
|
error(
|
||||||
m2 = maximum(s2; dims = 1)
|
"Can only savepng on MacOS or Linux with UnicodePlots (though even then I wouldn't do it)",
|
||||||
img = zeros(canvas_type, sum(m1), sum(m2))
|
)
|
||||||
sps = 0
|
|
||||||
n1 = 1
|
|
||||||
for r in 1:nr
|
|
||||||
n2 = 1
|
|
||||||
for c in 1:nc
|
|
||||||
sp = imgs[sps += 1]
|
|
||||||
h, w = size(sp)
|
|
||||||
img[n1:(n1 + (h - 1)), n2:(n2 + (w - 1))] = sp
|
|
||||||
n2 += m2[c]
|
|
||||||
end
|
|
||||||
n1 += m1[r]
|
|
||||||
end
|
|
||||||
stream = UnicodePlots.FileIO.Stream{UnicodePlots.FileIO.format"PNG"}(io)
|
|
||||||
UnicodePlots.FileIO.save(stream, img)
|
|
||||||
end
|
|
||||||
nothing
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Base.show(plt::Plot{UnicodePlotsBackend}) = show(stdout, plt)
|
# -------------------------------
|
||||||
Base.show(io::IO, plt::Plot{UnicodePlotsBackend}) = _show(io, MIME("text/plain"), plt)
|
Base.show(plt::Plot{UnicodePlotsBackend}) = _show(stdout, MIME("text/plain"), plt)
|
||||||
|
|
||||||
# NOTE: _show(...) must be kept for Base.showable (src/output.jl)
|
|
||||||
function _show(io::IO, ::MIME"text/plain", plt::Plot{UnicodePlotsBackend})
|
function _show(io::IO, ::MIME"text/plain", plt::Plot{UnicodePlotsBackend})
|
||||||
prepare_output(plt)
|
unicodeplots_rebuild(plt)
|
||||||
nr, nc = size(plt.layout)
|
nr, nc = size(plt.layout)
|
||||||
if nr == 1 && nc == 1 # fast path
|
lines_colored = Array{Union{Nothing,Vector{String}}}(undef, nr, nc)
|
||||||
n = length(plt.o)
|
lines_uncolored = copy(lines_colored)
|
||||||
for (i, p) in enumerate(plt.o)
|
l_max = zeros(Int, nr)
|
||||||
show(io, p)
|
buf = IOBuffer()
|
||||||
i < n && println(io)
|
cbuf = IOContext(buf, :color => true)
|
||||||
end
|
sps = wmax = 0
|
||||||
else
|
for r in 1:nr
|
||||||
have_color = Base.get_have_color()
|
lmax = 0
|
||||||
buf = IOContext(PipeBuffer(), :color => have_color)
|
for c in 1:nc
|
||||||
lines_colored = Array{Union{Nothing,Vector{String}}}(undef, nr, nc)
|
l = plt.layout[r, c]
|
||||||
lines_uncolored = have_color ? similar(lines_colored) : lines_colored
|
if l isa GridLayout && size(l) != (1, 1)
|
||||||
l_max = zeros(Int, nr)
|
@error "UnicodePlots: complex nested layout is currently unsupported !"
|
||||||
w_max = zeros(Int, nc)
|
else
|
||||||
sps = 0
|
if get(l.attr, :blank, false)
|
||||||
for r in 1:nr
|
lines_colored[r, c] = lines_uncolored[r, c] = nothing
|
||||||
lmax = 0
|
|
||||||
for c in 1:nc
|
|
||||||
if (l = plt.layout[r, c]) isa GridLayout && size(l) != (1, 1)
|
|
||||||
error(
|
|
||||||
"Plots(UnicodePlots): complex nested layout is currently unsupported",
|
|
||||||
)
|
|
||||||
else
|
else
|
||||||
if get(l.attr, :blank, false)
|
sp = plt.o[sps += 1]
|
||||||
lines_colored[r, c] = lines_uncolored[r, c] = nothing
|
show(cbuf, sp)
|
||||||
else
|
colored = String(take!(buf))
|
||||||
sp = plt.o[sps += 1]
|
uncolored = replace(colored, r"\x1B\[[0-9;]*[a-zA-Z]" => "")
|
||||||
show(buf, sp)
|
lines_colored[r, c] = lc = split(colored, "\n")
|
||||||
colored = read(buf, String)
|
lines_uncolored[r, c] = lu = split(uncolored, "\n")
|
||||||
lines_colored[r, c] = lu = lc = split(colored, '\n')
|
lmax = max(length(lc), lmax)
|
||||||
if have_color
|
wmax = max(maximum(length.(lu)), wmax)
|
||||||
uncolored = UnicodePlots.no_ansi_escape(colored)
|
|
||||||
lines_uncolored[r, c] = lu = split(uncolored, '\n')
|
|
||||||
end
|
|
||||||
lmax = max(length(lc), lmax)
|
|
||||||
w_max[c] = max(maximum(length.(lu)), w_max[c])
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
l_max[r] = lmax
|
|
||||||
end
|
end
|
||||||
empty = String[' '^w for w in w_max]
|
l_max[r] = lmax
|
||||||
for r in 1:nr
|
end
|
||||||
for n in 1:l_max[r]
|
empty = ' '^wmax
|
||||||
for c in 1:nc
|
for r in 1:nr
|
||||||
pre = c == 1 ? '\0' : ' '
|
for n in 1:l_max[r]
|
||||||
lc = lines_colored[r, c]
|
for c in 1:nc
|
||||||
if lc === nothing || length(lc) < n
|
pre = c == 1 ? '\0' : ' '
|
||||||
print(io, pre, empty[c])
|
lc = lines_colored[r, c]
|
||||||
else
|
if lc === nothing || length(lc) < n
|
||||||
lu = lines_uncolored[r, c]
|
print(io, pre, empty)
|
||||||
print(io, pre, lc[n], ' '^(w_max[c] - length(lu[n])))
|
else
|
||||||
end
|
lu = lines_uncolored[r, c]
|
||||||
|
print(io, pre, lc[n], ' '^(wmax - length(lu[n])))
|
||||||
end
|
end
|
||||||
n < l_max[r] && println(io)
|
|
||||||
end
|
end
|
||||||
r < nr && println(io)
|
println(io)
|
||||||
end
|
end
|
||||||
|
r < nr && println(io)
|
||||||
end
|
end
|
||||||
nothing
|
nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
# we only support MIME"text/plain", hence display(...) falls back to plain-text on stdout
|
|
||||||
function _display(plt::Plot{UnicodePlotsBackend})
|
function _display(plt::Plot{UnicodePlotsBackend})
|
||||||
show(stdout, plt)
|
unicodeplots_rebuild(plt)
|
||||||
println(stdout)
|
map(display, plt.o)
|
||||||
|
nothing
|
||||||
end
|
end
|
||||||
|
|||||||
@ -5,57 +5,50 @@ process_clims(s::Union{Symbol,Nothing,Missing}) = ignorenan_extrema
|
|||||||
# don't specialize on ::Function otherwise python functions won't work
|
# don't specialize on ::Function otherwise python functions won't work
|
||||||
process_clims(f) = f
|
process_clims(f) = f
|
||||||
|
|
||||||
get_clims(sp::Subplot)::Tuple{Float64,Float64} =
|
function get_clims(sp::Subplot, op = process_clims(sp[:clims]))
|
||||||
haskey(sp.attr, :clims_calculated) ? sp[:clims_calculated] : update_clims(sp)
|
|
||||||
get_clims(series::Series)::Tuple{Float64,Float64} =
|
|
||||||
haskey(series.plotattributes, :clims_calculated) ?
|
|
||||||
series[:clims_calculated]::Tuple{Float64,Float64} : update_clims(series)
|
|
||||||
get_clims(sp::Subplot, series::Series)::Tuple{Float64,Float64} =
|
|
||||||
series[:colorbar_entry] ? get_clims(sp) : get_clims(series)
|
|
||||||
|
|
||||||
function update_clims(sp::Subplot, op = process_clims(sp[:clims]))::Tuple{Float64,Float64}
|
|
||||||
zmin, zmax = Inf, -Inf
|
zmin, zmax = Inf, -Inf
|
||||||
for series in series_list(sp)
|
for series in series_list(sp)
|
||||||
if series[:colorbar_entry]::Bool
|
if series[:colorbar_entry]
|
||||||
zmin, zmax = _update_clims(zmin, zmax, update_clims(series, op)...)
|
zmin, zmax = _update_clims(zmin, zmax, get_clims(series, op)...)
|
||||||
else
|
|
||||||
update_clims(series, op)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return sp[:clims_calculated] = zmin <= zmax ? (zmin, zmax) : (NaN, NaN)
|
return zmin <= zmax ? (zmin, zmax) : (NaN, NaN)
|
||||||
|
end
|
||||||
|
|
||||||
|
function get_clims(sp::Subplot, series::Series, op = process_clims(sp[:clims]))
|
||||||
|
zmin, zmax = if series[:colorbar_entry]
|
||||||
|
get_clims(sp, op)
|
||||||
|
else
|
||||||
|
get_clims(series, op)
|
||||||
|
end
|
||||||
|
return zmin <= zmax ? (zmin, zmax) : (NaN, NaN)
|
||||||
end
|
end
|
||||||
|
|
||||||
"""
|
"""
|
||||||
update_clims(::Series, op=Plots.ignorenan_extrema)
|
get_clims(::Series, op=Plots.ignorenan_extrema)
|
||||||
|
|
||||||
Finds the limits for the colorbar by taking the "z-values" for the series and passing them into `op`,
|
Finds the limits for the colorbar by taking the "z-values" for the series and passing them into `op`,
|
||||||
which must return the tuple `(zmin, zmax)`. The default op is the extrema of the finite
|
which must return the tuple `(zmin, zmax)`. The default op is the extrema of the finite
|
||||||
values of the input. The value is stored as a series property, which is retrieved by `get_clims`.
|
values of the input.
|
||||||
"""
|
"""
|
||||||
function update_clims(series::Series, op = ignorenan_extrema)::Tuple{Float64,Float64}
|
function get_clims(series::Series, op = ignorenan_extrema)
|
||||||
zmin, zmax = Inf, -Inf
|
zmin, zmax = Inf, -Inf
|
||||||
|
z_colored_series = (:contour, :contour3d, :heatmap, :histogram2d, :surface, :hexbin)
|
||||||
# keeping this unrolled has higher performance
|
for vals in (
|
||||||
if series[:seriestype] ∈ _z_colored_series && series[:z] !== nothing
|
series[:seriestype] in z_colored_series ? series[:z] : nothing,
|
||||||
zmin, zmax = update_clims(zmin, zmax, series[:z], op)
|
series[:line_z],
|
||||||
|
series[:marker_z],
|
||||||
|
series[:fill_z],
|
||||||
|
)
|
||||||
|
if (typeof(vals) <: AbstractSurface) && (eltype(vals.surf) <: Union{Missing,Real})
|
||||||
|
zmin, zmax = _update_clims(zmin, zmax, op(vals.surf)...)
|
||||||
|
elseif (vals !== nothing) && (eltype(vals) <: Union{Missing,Real})
|
||||||
|
zmin, zmax = _update_clims(zmin, zmax, op(vals)...)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if series[:line_z] !== nothing
|
return zmin <= zmax ? (zmin, zmax) : (NaN, NaN)
|
||||||
zmin, zmax = update_clims(zmin, zmax, series[:line_z], op)
|
|
||||||
end
|
|
||||||
if series[:marker_z] !== nothing
|
|
||||||
zmin, zmax = update_clims(zmin, zmax, series[:marker_z], op)
|
|
||||||
end
|
|
||||||
if series[:fill_z] !== nothing
|
|
||||||
zmin, zmax = update_clims(zmin, zmax, series[:fill_z], op)
|
|
||||||
end
|
|
||||||
return series[:clims_calculated] = zmin <= zmax ? (zmin, zmax) : (NaN, NaN)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
update_clims(zmin, zmax, vals::AbstractSurface, op)::Tuple{Float64,Float64} =
|
|
||||||
update_clims(zmin, zmax, vals.surf, op)
|
|
||||||
update_clims(zmin, zmax, vals::Any, op)::Tuple{Float64,Float64} =
|
|
||||||
_update_clims(zmin, zmax, op(vals)...)
|
|
||||||
update_clims(zmin, zmax, ::Nothing, ::Any)::Tuple{Float64,Float64} = zmin, zmax
|
|
||||||
|
|
||||||
_update_clims(zmin, zmax, emin, emax) = NaNMath.min(zmin, emin), NaNMath.max(zmax, emax)
|
_update_clims(zmin, zmax, emin, emax) = NaNMath.min(zmin, emin), NaNMath.max(zmax, emax)
|
||||||
|
|
||||||
@enum ColorbarStyle cbar_gradient cbar_fill cbar_lines
|
@enum ColorbarStyle cbar_gradient cbar_fill cbar_lines
|
||||||
@ -101,5 +94,4 @@ end
|
|||||||
|
|
||||||
function _update_subplot_colorbars(sp::Subplot)
|
function _update_subplot_colorbars(sp::Subplot)
|
||||||
# Dynamic callback from the pipeline if needed
|
# Dynamic callback from the pipeline if needed
|
||||||
update_clims(sp)
|
|
||||||
end
|
end
|
||||||
|
|||||||
@ -43,7 +43,13 @@ vertices(shape::Shape) = collect(zip(shape.x, shape.y))
|
|||||||
"return the vertex points from a Shape or Segments object"
|
"return the vertex points from a Shape or Segments object"
|
||||||
coords(shape::Shape) = shape.x, shape.y
|
coords(shape::Shape) = shape.x, shape.y
|
||||||
|
|
||||||
coords(shapes::AVec{<:Shape}) = unzip(map(coords, shapes))
|
#coords(shapes::AVec{Shape}) = unzip(map(coords, shapes))
|
||||||
|
function coords(shapes::AVec{<:Shape})
|
||||||
|
c = map(coords, shapes)
|
||||||
|
x = [q[1] for q in c]
|
||||||
|
y = [q[2] for q in c]
|
||||||
|
x, y
|
||||||
|
end
|
||||||
|
|
||||||
"get an array of tuples of points on a circle with radius `r`"
|
"get an array of tuples of points on a circle with radius `r`"
|
||||||
partialcircle(start_θ, end_θ, n = 20, r = 1) =
|
partialcircle(start_θ, end_θ, n = 20, r = 1) =
|
||||||
@ -159,15 +165,10 @@ function scale!(shape::Shape, x::Real, y::Real = x, c = center(shape))
|
|||||||
shape
|
shape
|
||||||
end
|
end
|
||||||
|
|
||||||
"""
|
|
||||||
scale(shape, x, y = x, c = center(shape))
|
|
||||||
scale!(shape, x, y = x, c = center(shape))
|
|
||||||
|
|
||||||
Scale shape by a factor.
|
|
||||||
"""
|
|
||||||
scale(shape::Shape, x::Real, y::Real = x, c = center(shape)) =
|
scale(shape::Shape, x::Real, y::Real = x, c = center(shape)) =
|
||||||
scale!(deepcopy(shape), x, y, c)
|
scale!(deepcopy(shape), x, y, c)
|
||||||
|
|
||||||
|
"translate a Shape in space"
|
||||||
function translate!(shape::Shape, x::Real, y::Real = x)
|
function translate!(shape::Shape, x::Real, y::Real = x)
|
||||||
sx, sy = coords(shape)
|
sx, sy = coords(shape)
|
||||||
for i in eachindex(sx)
|
for i in eachindex(sx)
|
||||||
@ -177,27 +178,22 @@ function translate!(shape::Shape, x::Real, y::Real = x)
|
|||||||
shape
|
shape
|
||||||
end
|
end
|
||||||
|
|
||||||
"""
|
|
||||||
translate(shape, x, y = x)
|
|
||||||
translate!(shape, x, y = x)
|
|
||||||
|
|
||||||
Translate a Shape in space.
|
|
||||||
"""
|
|
||||||
translate(shape::Shape, x::Real, y::Real = x) = translate!(deepcopy(shape), x, y)
|
translate(shape::Shape, x::Real, y::Real = x) = translate!(deepcopy(shape), x, y)
|
||||||
|
|
||||||
rotate_x(x::Real, y::Real, θ::Real, centerx::Real, centery::Real) =
|
rotate_x(x::Real, y::Real, Θ::Real, centerx::Real, centery::Real) =
|
||||||
((x - centerx) * cos(θ) - (y - centery) * sin(θ) + centerx)
|
((x - centerx) * cos(Θ) - (y - centery) * sin(Θ) + centerx)
|
||||||
|
|
||||||
rotate_y(x::Real, y::Real, θ::Real, centerx::Real, centery::Real) =
|
rotate_y(x::Real, y::Real, Θ::Real, centerx::Real, centery::Real) =
|
||||||
((y - centery) * cos(θ) + (x - centerx) * sin(θ) + centery)
|
((y - centery) * cos(Θ) + (x - centerx) * sin(Θ) + centery)
|
||||||
|
|
||||||
rotate(x::Real, y::Real, θ::Real, c) = (rotate_x(x, y, θ, c...), rotate_y(x, y, θ, c...))
|
rotate(x::Real, y::Real, θ::Real, c = center(shape)) =
|
||||||
|
(rotate_x(x, y, Θ, c...), rotate_y(x, y, Θ, c...))
|
||||||
|
|
||||||
function rotate!(shape::Shape, θ::Real, c = center(shape))
|
function rotate!(shape::Shape, Θ::Real, c = center(shape))
|
||||||
x, y = coords(shape)
|
x, y = coords(shape)
|
||||||
for i in eachindex(x)
|
for i in eachindex(x)
|
||||||
xi = rotate_x(x[i], y[i], θ, c...)
|
xi = rotate_x(x[i], y[i], Θ, c...)
|
||||||
yi = rotate_y(x[i], y[i], θ, c...)
|
yi = rotate_y(x[i], y[i], Θ, c...)
|
||||||
x[i], y[i] = xi, yi
|
x[i], y[i] = xi, yi
|
||||||
end
|
end
|
||||||
shape
|
shape
|
||||||
@ -250,7 +246,6 @@ function font(args...; kw...)
|
|||||||
|
|
||||||
for arg in args
|
for arg in args
|
||||||
T = typeof(arg)
|
T = typeof(arg)
|
||||||
@assert arg !== :match
|
|
||||||
|
|
||||||
if T == Font
|
if T == Font
|
||||||
family = arg.family
|
family = arg.family
|
||||||
@ -274,12 +269,12 @@ function font(args...; kw...)
|
|||||||
catch
|
catch
|
||||||
family = string(arg)
|
family = string(arg)
|
||||||
end
|
end
|
||||||
elseif T <: Integer
|
elseif typeof(arg) <: Integer
|
||||||
pointsize = arg
|
pointsize = arg
|
||||||
elseif T <: Real
|
elseif typeof(arg) <: Real
|
||||||
rotation = convert(Float64, arg)
|
rotation = convert(Float64, arg)
|
||||||
else
|
else
|
||||||
@warn "Unused font arg: $arg ($T)"
|
@warn "Unused font arg: $arg ($(typeof(arg)))"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -777,20 +772,3 @@ function extrema_plus_buffer(v, buffmult = 0.2)
|
|||||||
buffer = vdiff * buffmult
|
buffer = vdiff * buffmult
|
||||||
vmin - buffer, vmax + buffer
|
vmin - buffer, vmax + buffer
|
||||||
end
|
end
|
||||||
|
|
||||||
### Legend
|
|
||||||
|
|
||||||
@add_attributes subplot struct Legend
|
|
||||||
background_color = :match
|
|
||||||
foreground_color = :match
|
|
||||||
position = :best
|
|
||||||
title = nothing
|
|
||||||
font::Font = font(8)
|
|
||||||
title_font::Font = font(11)
|
|
||||||
column = 1
|
|
||||||
end :match = (
|
|
||||||
:legend_font_family,
|
|
||||||
:legend_font_color,
|
|
||||||
:legend_title_font_family,
|
|
||||||
:legend_title_font_color,
|
|
||||||
)
|
|
||||||
|
|||||||
@ -1,88 +0,0 @@
|
|||||||
|
|
||||||
const _deprecated_attributes = Dict{Symbol,Symbol}(:orientation => :permute)
|
|
||||||
const _all_defaults = KW[_series_defaults, _plot_defaults, _subplot_defaults]
|
|
||||||
|
|
||||||
const _initial_defaults = deepcopy(_all_defaults)
|
|
||||||
const _initial_axis_defaults = deepcopy(_axis_defaults)
|
|
||||||
|
|
||||||
# add defaults for the letter versions
|
|
||||||
const _axis_defaults_byletter = KW()
|
|
||||||
|
|
||||||
function reset_axis_defaults_byletter!()
|
|
||||||
for letter in (:x, :y, :z)
|
|
||||||
_axis_defaults_byletter[letter] = KW()
|
|
||||||
for (k, v) in _axis_defaults
|
|
||||||
_axis_defaults_byletter[letter][k] = v
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
reset_axis_defaults_byletter!()
|
|
||||||
|
|
||||||
# to be able to reset font sizes to initial values
|
|
||||||
const _initial_plt_fontsizes =
|
|
||||||
Dict(:plot_titlefontsize => _plot_defaults[:plot_titlefontsize])
|
|
||||||
|
|
||||||
const _initial_sp_fontsizes = Dict(
|
|
||||||
:titlefontsize => _subplot_defaults[:titlefontsize],
|
|
||||||
:legend_font_pointsize => _subplot_defaults[:legend_font_pointsize],
|
|
||||||
:legend_title_font_pointsize => _subplot_defaults[:legend_title_font_pointsize],
|
|
||||||
:annotationfontsize => _subplot_defaults[:annotationfontsize],
|
|
||||||
:colorbar_tickfontsize => _subplot_defaults[:colorbar_tickfontsize],
|
|
||||||
:colorbar_titlefontsize => _subplot_defaults[:colorbar_titlefontsize],
|
|
||||||
)
|
|
||||||
|
|
||||||
const _initial_ax_fontsizes = Dict(
|
|
||||||
:tickfontsize => _axis_defaults[:tickfontsize],
|
|
||||||
:guidefontsize => _axis_defaults[:guidefontsize],
|
|
||||||
)
|
|
||||||
|
|
||||||
const _initial_fontsizes =
|
|
||||||
merge(_initial_plt_fontsizes, _initial_sp_fontsizes, _initial_ax_fontsizes)
|
|
||||||
|
|
||||||
const _internal_args =
|
|
||||||
[:plot_object, :series_plotindex, :markershape_to_add, :letter, :idxfilter]
|
|
||||||
|
|
||||||
const _axis_args = Set(keys(_axis_defaults))
|
|
||||||
const _series_args = Set(keys(_series_defaults))
|
|
||||||
const _subplot_args = Set(keys(_subplot_defaults))
|
|
||||||
const _plot_args = Set(keys(_plot_defaults))
|
|
||||||
|
|
||||||
const _magic_axis_args = [:axis, :tickfont, :guidefont, :grid, :minorgrid]
|
|
||||||
const _magic_subplot_args =
|
|
||||||
[:title_font, :legend_font, :legend_title_font, :plot_title_font, :colorbar_titlefont]
|
|
||||||
const _magic_series_args = [:line, :marker, :fill]
|
|
||||||
const _all_magic_args =
|
|
||||||
Set(union(_magic_axis_args, _magic_series_args, _magic_subplot_args))
|
|
||||||
|
|
||||||
const _all_axis_args = union(_axis_args, _magic_axis_args)
|
|
||||||
const _lettered_all_axis_args =
|
|
||||||
Set([Symbol(letter, kw) for letter in (:x, :y, :z) for kw in _all_axis_args])
|
|
||||||
const _all_subplot_args = union(_subplot_args, _magic_subplot_args)
|
|
||||||
const _all_series_args = union(_series_args, _magic_series_args)
|
|
||||||
const _all_plot_args = _plot_args
|
|
||||||
|
|
||||||
const _all_args =
|
|
||||||
union(_lettered_all_axis_args, _all_subplot_args, _all_series_args, _all_plot_args)
|
|
||||||
|
|
||||||
# add all pluralized forms to the _keyAliases dict
|
|
||||||
for arg in _all_args
|
|
||||||
add_aliases(arg, makeplural(arg))
|
|
||||||
end
|
|
||||||
|
|
||||||
# fill symbol cache
|
|
||||||
for letter in (:x, :y, :z)
|
|
||||||
_attrsymbolcache[letter] = Dict{Symbol,Symbol}()
|
|
||||||
for k in _axis_args
|
|
||||||
# populate attribute cache
|
|
||||||
lk = Symbol(letter, k)
|
|
||||||
_attrsymbolcache[letter][k] = lk
|
|
||||||
# allow the underscore version too: xguide or x_guide
|
|
||||||
add_aliases(lk, Symbol(letter, "_", k))
|
|
||||||
end
|
|
||||||
for k in (_magic_axis_args..., :(_discrete_indices))
|
|
||||||
_attrsymbolcache[letter][k] = Symbol(letter, k)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# add all non_underscored forms to the _keyAliases
|
|
||||||
add_non_underscore_aliases!(_keyAliases)
|
|
||||||
107
src/examples.jl
107
src/examples.jl
@ -849,6 +849,7 @@ const _examples = PlotExample[
|
|||||||
[
|
[
|
||||||
quote
|
quote
|
||||||
begin
|
begin
|
||||||
|
using Plots
|
||||||
default(
|
default(
|
||||||
titlefont = (20, "times"),
|
titlefont = (20, "times"),
|
||||||
legendfontsize = 18,
|
legendfontsize = 18,
|
||||||
@ -961,10 +962,8 @@ const _examples = PlotExample[
|
|||||||
"""
|
"""
|
||||||
Allows to plot arbitrary 3d meshes. If only x,y,z are given the mesh is generated automatically.
|
Allows to plot arbitrary 3d meshes. If only x,y,z are given the mesh is generated automatically.
|
||||||
You can also specify the connections using the connections keyword.
|
You can also specify the connections using the connections keyword.
|
||||||
The connections can be specified in two ways: Either as a tuple of vectors where each vector
|
The connections are specified using a tuple of vectors. Each vector contains the 0-based indices of one point of a triangle,
|
||||||
contains the 0-based indices of one point of a triangle, such that elements at the same
|
such that elements at the same position of these vectors form a triangle.
|
||||||
position of these vectors form a triangle. Or as a vector of NTuple{3,Ints} where each element
|
|
||||||
contains the 1-based indices of the three points of a triangle.
|
|
||||||
""",
|
""",
|
||||||
[
|
[
|
||||||
:(
|
:(
|
||||||
@ -980,14 +979,13 @@ const _examples = PlotExample[
|
|||||||
i = [0, 0, 0, 1]
|
i = [0, 0, 0, 1]
|
||||||
j = [1, 2, 3, 2]
|
j = [1, 2, 3, 2]
|
||||||
k = [2, 3, 1, 3]
|
k = [2, 3, 1, 3]
|
||||||
# Or: cns = [(1, 2, 3), (1, 3, 4), (1, 4, 2), (2, 3, 4)] (1-based indexing)
|
|
||||||
|
|
||||||
# the four triangles gives above give a tetrahedron
|
# the four triangles gives above give a tetrahedron
|
||||||
mesh3d(
|
mesh3d(
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
z;
|
z;
|
||||||
connections = (i, j, k), # connections = cns
|
connections = (i, j, k),
|
||||||
title = "triangles",
|
title = "triangles",
|
||||||
xlabel = "x",
|
xlabel = "x",
|
||||||
ylabel = "y",
|
ylabel = "y",
|
||||||
@ -1070,6 +1068,7 @@ const _examples = PlotExample[
|
|||||||
"",
|
"",
|
||||||
[
|
[
|
||||||
quote
|
quote
|
||||||
|
using Plots
|
||||||
using TestImages
|
using TestImages
|
||||||
img = testimage("lighthouse")
|
img = testimage("lighthouse")
|
||||||
|
|
||||||
@ -1090,6 +1089,8 @@ const _examples = PlotExample[
|
|||||||
"3d quiver",
|
"3d quiver",
|
||||||
"",
|
"",
|
||||||
[quote
|
[quote
|
||||||
|
using Plots
|
||||||
|
|
||||||
ϕs = range(-π, π, length = 50)
|
ϕs = range(-π, π, length = 50)
|
||||||
θs = range(0, π, length = 25)
|
θs = range(0, π, length = 25)
|
||||||
θqs = range(1, π - 1, length = 25)
|
θqs = range(1, π - 1, length = 25)
|
||||||
@ -1228,77 +1229,15 @@ const _examples = PlotExample[
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
PlotExample( # 56
|
|
||||||
"Bar plot customizations",
|
|
||||||
"""
|
|
||||||
Width of bars may be specified as `bar_width`.
|
|
||||||
The bars' baseline may be specified as `fillto`.
|
|
||||||
Each may be scalar, or a vector spcifying one value per bar.
|
|
||||||
""",
|
|
||||||
[
|
|
||||||
:(
|
|
||||||
begin
|
|
||||||
plot(
|
|
||||||
bar(
|
|
||||||
[-1, 0, 2, 3],
|
|
||||||
[1, 3, 6, 2],
|
|
||||||
fill_z = 4:-1:1,
|
|
||||||
alpha = [1, 0.2, 0.8, 0.5],
|
|
||||||
label = "",
|
|
||||||
bar_width = 1:4,
|
|
||||||
),
|
|
||||||
bar(
|
|
||||||
rand(5),
|
|
||||||
bar_width = 1.2,
|
|
||||||
alpha = 0.8,
|
|
||||||
color = [:lightsalmon, :tomato, :crimson, :firebrick, :darkred],
|
|
||||||
fillto = 0:-0.1:-0.4,
|
|
||||||
label = "reds",
|
|
||||||
),
|
|
||||||
)
|
|
||||||
end
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
PlotExample( # 57
|
|
||||||
"Vertical and horizonal spans",
|
|
||||||
"""
|
|
||||||
`vspan` and `hspan` can be used to shade horizontal and vertical ranges.
|
|
||||||
""",
|
|
||||||
[:(
|
|
||||||
begin
|
|
||||||
hspan([1, 2, 3, 4]; label = "hspan", legend = :topleft)
|
|
||||||
vspan!([2, 3]; alpha = 0.5, label = "vspan")
|
|
||||||
plot!([0, 2, 3, 5], [-1, 3, 2, 6]; c = :black, lw = 2, label = "line")
|
|
||||||
end
|
|
||||||
)],
|
|
||||||
),
|
|
||||||
PlotExample( # 58
|
|
||||||
"Stacked area chart",
|
|
||||||
"""
|
|
||||||
`areaplot` draws stacked area plots.
|
|
||||||
""",
|
|
||||||
[
|
|
||||||
:(
|
|
||||||
begin
|
|
||||||
areaplot(
|
|
||||||
1:3,
|
|
||||||
[1 2 3; 7 8 9; 4 5 6],
|
|
||||||
seriescolor = [:red :green :blue],
|
|
||||||
fillalpha = [0.2 0.3 0.4],
|
|
||||||
)
|
|
||||||
end
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# Some constants for PlotDocs and PlotReferenceImages
|
# Some constants for PlotDocs and PlotReferenceImages
|
||||||
_animation_examples = [2, 31]
|
_animation_examples = [2, 31]
|
||||||
_backend_skips = Dict(
|
_backend_skips = Dict(
|
||||||
:gr => [30],
|
:gr => [25, 30],
|
||||||
:pyplot => [2, 25, 30, 31, 49, 55, 56],
|
:pyplot => [2, 25, 30, 31, 47, 49, 55],
|
||||||
:plotlyjs => [2, 21, 24, 25, 30, 31, 49, 50, 51, 55, 56],
|
:plotlyjs => [2, 21, 24, 25, 30, 31, 49, 51, 55],
|
||||||
|
:plotly => [2, 21, 24, 25, 30, 31, 49, 50, 51, 55],
|
||||||
:pgfplotsx => [
|
:pgfplotsx => [
|
||||||
2, # animation
|
2, # animation
|
||||||
6, # images
|
6, # images
|
||||||
@ -1308,26 +1247,30 @@ _backend_skips = Dict(
|
|||||||
32, # spy
|
32, # spy
|
||||||
49, # polar heatmap
|
49, # polar heatmap
|
||||||
51, # image with custom axes
|
51, # image with custom axes
|
||||||
56, # custom bar plot
|
|
||||||
],
|
],
|
||||||
:inspectdr => [4, 6, 10, 22, 24, 28, 30, 38, 43, 45, 47, 48, 49, 50, 51, 55, 56],
|
:inspectdr => [4, 6, 10, 22, 24, 28, 30, 38, 43, 45, 47, 48, 49, 50, 51, 55],
|
||||||
:unicodeplots => [
|
:unicodeplots => [
|
||||||
5, # limits issue
|
|
||||||
6, # embedded images unsupported
|
6, # embedded images unsupported
|
||||||
|
13, # markers unsupported
|
||||||
16, # nested layout unsupported
|
16, # nested layout unsupported
|
||||||
|
20, # annotations unsupported
|
||||||
21, # custom markers unsupported
|
21, # custom markers unsupported
|
||||||
|
22, # contours unsupported
|
||||||
|
24, # 3D unsupported
|
||||||
26, # nested layout unsupported
|
26, # nested layout unsupported
|
||||||
29, # nested layout unsupported
|
29, # nested layout unsupported
|
||||||
31, # nested layout unsupported
|
|
||||||
33, # grid lines unsupported
|
33, # grid lines unsupported
|
||||||
34, # framestyle unsupported
|
34, # framestyle unsupported
|
||||||
37, # ribbons / filled unsupported
|
37, # ribbons / filled unsupported
|
||||||
43, # heatmap with DateTime
|
43, # heatmap with DateTime
|
||||||
45, # error bars
|
45, # error bars
|
||||||
|
47, # mesh3D unsupported
|
||||||
|
48, # markershapes unsupported
|
||||||
49, # polar heatmap
|
49, # polar heatmap
|
||||||
|
50, # 3D surface unsupported
|
||||||
51, # embedded images unsupported
|
51, # embedded images unsupported
|
||||||
55, # mirror unsupported, resolution too low
|
52, # 3D quiver unsupported
|
||||||
56, # barplots
|
55, # 3D unsupported
|
||||||
],
|
],
|
||||||
:gaston => [
|
:gaston => [
|
||||||
2, # animations
|
2, # animations
|
||||||
@ -1336,7 +1279,6 @@ _backend_skips = Dict(
|
|||||||
50, # TODO: 1D data not supported for pm3d
|
50, # TODO: 1D data not supported for pm3d
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
_backend_skips[:plotly] = _backend_skips[:plotlyjs]
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -1352,8 +1294,11 @@ function test_examples(pkgname::Symbol, idx::Int; debug = false, disp = true)
|
|||||||
Base.eval(m, :(using Plots))
|
Base.eval(m, :(using Plots))
|
||||||
map(exprs -> Base.eval(m, exprs), _examples[idx].exprs)
|
map(exprs -> Base.eval(m, exprs), _examples[idx].exprs)
|
||||||
|
|
||||||
disp && Base.eval(m, :(gui(current())))
|
plt = current()
|
||||||
current()
|
if disp
|
||||||
|
gui(plt)
|
||||||
|
end
|
||||||
|
plt
|
||||||
end
|
end
|
||||||
|
|
||||||
# generate all plots and create a dict mapping idx --> plt
|
# generate all plots and create a dict mapping idx --> plt
|
||||||
|
|||||||
@ -49,9 +49,6 @@ function _ijulia_display_dict(plt::Plot)
|
|||||||
mime = "text/html"
|
mime = "text/html"
|
||||||
out[mime] = sprint(show, MIME(mime), plt)
|
out[mime] = sprint(show, MIME(mime), plt)
|
||||||
_ijulia__extra_mime_info!(plt, out)
|
_ijulia__extra_mime_info!(plt, out)
|
||||||
elseif output_type == :pdf
|
|
||||||
mime = "application/pdf"
|
|
||||||
out[mime] = base64encode(show, MIME(mime), plt)
|
|
||||||
else
|
else
|
||||||
error("Unsupported output type $output_type")
|
error("Unsupported output type $output_type")
|
||||||
end
|
end
|
||||||
|
|||||||
@ -89,6 +89,7 @@ function __init__()
|
|||||||
@require IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a" begin
|
@require IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a" begin
|
||||||
if IJulia.inited
|
if IJulia.inited
|
||||||
_init_ijulia_plotting()
|
_init_ijulia_plotting()
|
||||||
|
|
||||||
IJulia.display_dict(plt::Plot) = _ijulia_display_dict(plt)
|
IJulia.display_dict(plt::Plot) = _ijulia_display_dict(plt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
151
src/layouts.jl
151
src/layouts.jl
@ -269,9 +269,6 @@ Base.getindex(layout::GridLayout, r::Int, c::Int) = layout.grid[r, c]
|
|||||||
function Base.setindex!(layout::GridLayout, v, r::Int, c::Int)
|
function Base.setindex!(layout::GridLayout, v, r::Int, c::Int)
|
||||||
layout.grid[r, c] = v
|
layout.grid[r, c] = v
|
||||||
end
|
end
|
||||||
function Base.setindex!(layout::GridLayout, v, ci::CartesianIndex)
|
|
||||||
layout.grid[ci] = v
|
|
||||||
end
|
|
||||||
|
|
||||||
leftpad(layout::GridLayout) = layout.minpad[1]
|
leftpad(layout::GridLayout) = layout.minpad[1]
|
||||||
toppad(layout::GridLayout) = layout.minpad[2]
|
toppad(layout::GridLayout) = layout.minpad[2]
|
||||||
@ -494,19 +491,6 @@ function layout_args(sztup::NTuple{3,Integer})
|
|||||||
GridLayout(nr, nc), n
|
GridLayout(nr, nc), n
|
||||||
end
|
end
|
||||||
|
|
||||||
layout_args(nt::NamedTuple) = EmptyLayout(; nt...), 1
|
|
||||||
|
|
||||||
function layout_args(m::AbstractVecOrMat)
|
|
||||||
sz = size(m)
|
|
||||||
nr = sz[1]
|
|
||||||
nc = get(sz, 2, 1)
|
|
||||||
gl = GridLayout(nr, nc)
|
|
||||||
for ci in CartesianIndices(m)
|
|
||||||
gl[ci] = layout_args(m[ci])[1]
|
|
||||||
end
|
|
||||||
layout_args(gl)
|
|
||||||
end
|
|
||||||
|
|
||||||
# compute number of subplots
|
# compute number of subplots
|
||||||
function layout_args(layout::GridLayout)
|
function layout_args(layout::GridLayout)
|
||||||
# recursively get the size of the grid
|
# recursively get the size of the grid
|
||||||
@ -514,8 +498,7 @@ function layout_args(layout::GridLayout)
|
|||||||
layout, n
|
layout, n
|
||||||
end
|
end
|
||||||
|
|
||||||
layout_args(n_override::Integer, layout::Union{AbstractVecOrMat,GridLayout}) =
|
layout_args(n_override::Integer, layout::GridLayout) = layout_args(layout)
|
||||||
layout_args(layout)
|
|
||||||
|
|
||||||
layout_args(huh) = error("unhandled layout type $(typeof(huh)): $huh")
|
layout_args(huh) = error("unhandled layout type $(typeof(huh)): $huh")
|
||||||
|
|
||||||
@ -579,6 +562,138 @@ function build_layout(layout::GridLayout, n::Integer, plts::AVec{Plot})
|
|||||||
layout, subplots, spmap
|
layout, subplots, spmap
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# @layout macro
|
||||||
|
|
||||||
|
function add_layout_pct!(kw::AKW, v::Expr, idx::Integer, nidx::Integer)
|
||||||
|
# dump(v)
|
||||||
|
# something like {0.2w}?
|
||||||
|
if v.head == :call && v.args[1] == :*
|
||||||
|
num = v.args[2]
|
||||||
|
if length(v.args) == 3 && isa(num, Number)
|
||||||
|
units = v.args[3]
|
||||||
|
if units == :h
|
||||||
|
return kw[:h] = num * pct
|
||||||
|
elseif units == :w
|
||||||
|
return kw[:w] = num * pct
|
||||||
|
elseif units in (:pct, :px, :mm, :cm, :inch)
|
||||||
|
idx == 1 && (kw[:w] = v)
|
||||||
|
(idx == 2 || nidx == 1) && (kw[:h] = v)
|
||||||
|
# return kw[idx == 1 ? :w : :h] = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
error("Couldn't match layout curly (idx=$idx): $v")
|
||||||
|
end
|
||||||
|
|
||||||
|
function add_layout_pct!(kw::AKW, v::Number, idx::Integer)
|
||||||
|
# kw[idx == 1 ? :w : :h] = v*pct
|
||||||
|
idx == 1 && (kw[:w] = v * pct)
|
||||||
|
(idx == 2 || nidx == 1) && (kw[:h] = v * pct)
|
||||||
|
end
|
||||||
|
|
||||||
|
isrow(v) = isa(v, Expr) && v.head in (:hcat, :row)
|
||||||
|
iscol(v) = isa(v, Expr) && v.head == :vcat
|
||||||
|
rowsize(v) = isrow(v) ? length(v.args) : 1
|
||||||
|
|
||||||
|
function create_grid(expr::Expr)
|
||||||
|
if iscol(expr)
|
||||||
|
create_grid_vcat(expr)
|
||||||
|
elseif isrow(expr)
|
||||||
|
:(
|
||||||
|
let cell = GridLayout(1, $(length(expr.args)))
|
||||||
|
$(
|
||||||
|
[
|
||||||
|
:(cell[1, $i] = $(create_grid(v))) for
|
||||||
|
(i, v) in enumerate(expr.args)
|
||||||
|
]...
|
||||||
|
)
|
||||||
|
cell
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
elseif expr.head == :curly
|
||||||
|
create_grid_curly(expr)
|
||||||
|
else
|
||||||
|
# if it's something else, just return that (might be an existing layout?)
|
||||||
|
esc(expr)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function create_grid_vcat(expr::Expr)
|
||||||
|
rowsizes = map(rowsize, expr.args)
|
||||||
|
rmin, rmax = extrema(rowsizes)
|
||||||
|
if rmin > 0 && rmin == rmax
|
||||||
|
# we have a grid... build the whole thing
|
||||||
|
# note: rmin is the number of columns
|
||||||
|
nr = length(expr.args)
|
||||||
|
nc = rmin
|
||||||
|
body = Expr(:block)
|
||||||
|
for r in 1:nr
|
||||||
|
arg = expr.args[r]
|
||||||
|
if isrow(arg)
|
||||||
|
for (c, item) in enumerate(arg.args)
|
||||||
|
push!(body.args, :(cell[$r, $c] = $(create_grid(item))))
|
||||||
|
end
|
||||||
|
else
|
||||||
|
push!(body.args, :(cell[$r, 1] = $(create_grid(arg))))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
:(
|
||||||
|
let cell = GridLayout($nr, $nc)
|
||||||
|
$body
|
||||||
|
cell
|
||||||
|
end
|
||||||
|
)
|
||||||
|
else
|
||||||
|
# otherwise just build one row at a time
|
||||||
|
:(
|
||||||
|
let cell = GridLayout($(length(expr.args)), 1)
|
||||||
|
$(
|
||||||
|
[
|
||||||
|
:(cell[$i, 1] = $(create_grid(v))) for
|
||||||
|
(i, v) in enumerate(expr.args)
|
||||||
|
]...
|
||||||
|
)
|
||||||
|
cell
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function create_grid_curly(expr::Expr)
|
||||||
|
kw = KW()
|
||||||
|
for (i, arg) in enumerate(expr.args[2:end])
|
||||||
|
add_layout_pct!(kw, arg, i, length(expr.args) - 1)
|
||||||
|
end
|
||||||
|
s = expr.args[1]
|
||||||
|
if isa(s, Expr) && s.head == :call && s.args[1] == :grid
|
||||||
|
create_grid(
|
||||||
|
:(grid(
|
||||||
|
$(s.args[2:end]...),
|
||||||
|
width = $(get(kw, :w, QuoteNode(:auto))),
|
||||||
|
height = $(get(kw, :h, QuoteNode(:auto))),
|
||||||
|
)),
|
||||||
|
)
|
||||||
|
elseif isa(s, Symbol)
|
||||||
|
:(EmptyLayout(
|
||||||
|
label = $(QuoteNode(s)),
|
||||||
|
width = $(get(kw, :w, QuoteNode(:auto))),
|
||||||
|
height = $(get(kw, :h, QuoteNode(:auto))),
|
||||||
|
))
|
||||||
|
else
|
||||||
|
error("Unknown use of curly brackets: $expr")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function create_grid(s::Symbol)
|
||||||
|
:(EmptyLayout(label = $(QuoteNode(s)), blank = $(s == :_)))
|
||||||
|
end
|
||||||
|
|
||||||
|
macro layout(mat::Expr)
|
||||||
|
create_grid(mat)
|
||||||
|
end
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
|
|
||||||
# make all reference the same axis extrema/values.
|
# make all reference the same axis extrema/values.
|
||||||
|
|||||||
@ -4,7 +4,8 @@ legend_pos_from_angle(theta, xmin, xcenter, xmax, ymin, ycenter, ymax, inout)
|
|||||||
```
|
```
|
||||||
|
|
||||||
Return `(x,y)` at an angle `theta` degrees from
|
Return `(x,y)` at an angle `theta` degrees from
|
||||||
`(xcenter,ycenter)` on a rectangle defined by (`xmin`, `xmax`, `ymin`, `ymax`).
|
`(xcenter,ycenter)` on a rectangle defined by (`xmin`,
|
||||||
|
`xmax`, `ymin`, `ymax`).
|
||||||
"""
|
"""
|
||||||
function legend_pos_from_angle(theta, xmin, xcenter, xmax, ymin, ycenter, ymax)
|
function legend_pos_from_angle(theta, xmin, xcenter, xmax, ymin, ycenter, ymax)
|
||||||
(s, c) = sincosd(theta)
|
(s, c) = sincosd(theta)
|
||||||
|
|||||||
@ -2,65 +2,74 @@
|
|||||||
defaultOutputFormat(plt::Plot) = "png"
|
defaultOutputFormat(plt::Plot) = "png"
|
||||||
|
|
||||||
function png(plt::Plot, fn::AbstractString)
|
function png(plt::Plot, fn::AbstractString)
|
||||||
open(addExtension(fn, "png"), "w") do io
|
fn = addExtension(fn, "png")
|
||||||
show(io, MIME("image/png"), plt)
|
io = open(fn, "w")
|
||||||
end
|
show(io, MIME("image/png"), plt)
|
||||||
|
close(io)
|
||||||
end
|
end
|
||||||
png(fn::AbstractString) = png(current(), fn)
|
png(fn::AbstractString) = png(current(), fn)
|
||||||
|
|
||||||
function svg(plt::Plot, fn::AbstractString)
|
function svg(plt::Plot, fn::AbstractString)
|
||||||
open(addExtension(fn, "svg"), "w") do io
|
fn = addExtension(fn, "svg")
|
||||||
show(io, MIME("image/svg+xml"), plt)
|
io = open(fn, "w")
|
||||||
end
|
show(io, MIME("image/svg+xml"), plt)
|
||||||
|
close(io)
|
||||||
end
|
end
|
||||||
svg(fn::AbstractString) = svg(current(), fn)
|
svg(fn::AbstractString) = svg(current(), fn)
|
||||||
|
|
||||||
function pdf(plt::Plot, fn::AbstractString)
|
function pdf(plt::Plot, fn::AbstractString)
|
||||||
open(addExtension(fn, "pdf"), "w") do io
|
fn = addExtension(fn, "pdf")
|
||||||
show(io, MIME("application/pdf"), plt)
|
io = open(fn, "w")
|
||||||
end
|
show(io, MIME("application/pdf"), plt)
|
||||||
|
close(io)
|
||||||
end
|
end
|
||||||
pdf(fn::AbstractString) = pdf(current(), fn)
|
pdf(fn::AbstractString) = pdf(current(), fn)
|
||||||
|
|
||||||
function ps(plt::Plot, fn::AbstractString)
|
function ps(plt::Plot, fn::AbstractString)
|
||||||
open(addExtension(fn, "ps"), "w") do io
|
fn = addExtension(fn, "ps")
|
||||||
show(io, MIME("application/postscript"), plt)
|
io = open(fn, "w")
|
||||||
end
|
show(io, MIME("application/postscript"), plt)
|
||||||
|
close(io)
|
||||||
end
|
end
|
||||||
ps(fn::AbstractString) = ps(current(), fn)
|
ps(fn::AbstractString) = ps(current(), fn)
|
||||||
|
|
||||||
function eps(plt::Plot, fn::AbstractString)
|
function eps(plt::Plot, fn::AbstractString)
|
||||||
open(addExtension(fn, "eps"), "w") do io
|
fn = addExtension(fn, "eps")
|
||||||
show(io, MIME("image/eps"), plt)
|
io = open(fn, "w")
|
||||||
end
|
show(io, MIME("image/eps"), plt)
|
||||||
|
close(io)
|
||||||
end
|
end
|
||||||
eps(fn::AbstractString) = eps(current(), fn)
|
eps(fn::AbstractString) = eps(current(), fn)
|
||||||
|
|
||||||
function tex(plt::Plot, fn::AbstractString)
|
function tex(plt::Plot, fn::AbstractString)
|
||||||
open(addExtension(fn, "tex"), "w") do io
|
fn = addExtension(fn, "tex")
|
||||||
show(io, MIME("application/x-tex"), plt)
|
io = open(fn, "w")
|
||||||
end
|
show(io, MIME("application/x-tex"), plt)
|
||||||
|
close(io)
|
||||||
end
|
end
|
||||||
tex(fn::AbstractString) = tex(current(), fn)
|
tex(fn::AbstractString) = tex(current(), fn)
|
||||||
|
|
||||||
function json(plt::Plot, fn::AbstractString)
|
function json(plt::Plot, fn::AbstractString)
|
||||||
open(addExtension(fn, "json"), "w") do io
|
fn = addExtension(fn, "json")
|
||||||
show(io, MIME("application/vnd.plotly.v1+json"), plt)
|
io = open(fn, "w")
|
||||||
end
|
show(io, MIME("application/vnd.plotly.v1+json"), plt)
|
||||||
|
close(io)
|
||||||
end
|
end
|
||||||
json(fn::AbstractString) = json(current(), fn)
|
json(fn::AbstractString) = json(current(), fn)
|
||||||
|
|
||||||
function html(plt::Plot, fn::AbstractString)
|
function html(plt::Plot, fn::AbstractString)
|
||||||
open(addExtension(fn, "html"), "w") do io
|
fn = addExtension(fn, "html")
|
||||||
show(io, MIME("text/html"), plt)
|
io = open(fn, "w")
|
||||||
end
|
show(io, MIME("text/html"), plt)
|
||||||
|
close(io)
|
||||||
end
|
end
|
||||||
html(fn::AbstractString) = html(current(), fn)
|
html(fn::AbstractString) = html(current(), fn)
|
||||||
|
|
||||||
function txt(plt::Plot, fn::AbstractString; color::Bool = true)
|
function txt(plt::Plot, fn::AbstractString)
|
||||||
open(addExtension(fn, "txt"), "w") do io
|
fn = addExtension(fn, "txt")
|
||||||
show(IOContext(io, :color => color), MIME("text/plain"), plt)
|
io = open(fn, "w")
|
||||||
end
|
show(io, MIME("text/plain"), plt)
|
||||||
|
close(io)
|
||||||
end
|
end
|
||||||
txt(fn::AbstractString) = txt(current(), fn)
|
txt(fn::AbstractString) = txt(current(), fn)
|
||||||
|
|
||||||
@ -79,13 +88,6 @@ const _savemap = Dict(
|
|||||||
"txt" => txt,
|
"txt" => txt,
|
||||||
)
|
)
|
||||||
|
|
||||||
for out in Symbol.(unique(values(_savemap)))
|
|
||||||
@eval @doc """
|
|
||||||
$($out)([plot,], filename)
|
|
||||||
Save plot as $($out)-file.
|
|
||||||
""" $out
|
|
||||||
end
|
|
||||||
|
|
||||||
const _extension_map = Dict("tikz" => "tex")
|
const _extension_map = Dict("tikz" => "tex")
|
||||||
|
|
||||||
function addExtension(fn::AbstractString, ext::AbstractString)
|
function addExtension(fn::AbstractString, ext::AbstractString)
|
||||||
@ -194,7 +196,6 @@ Base.show(io::IO, m::MIME"text/plain", plt::Plot) = show(io, plt)
|
|||||||
# for writing to io streams... first prepare, then callback
|
# for writing to io streams... first prepare, then callback
|
||||||
for mime in (
|
for mime in (
|
||||||
"text/html",
|
"text/html",
|
||||||
"text/latex",
|
|
||||||
"image/png",
|
"image/png",
|
||||||
"image/eps",
|
"image/eps",
|
||||||
"image/svg+xml",
|
"image/svg+xml",
|
||||||
@ -215,8 +216,6 @@ for mime in (
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Base.showable(::MIME"text/html", plt::Plot{UnicodePlotsBackend}) = false # Pluto
|
|
||||||
|
|
||||||
Base.show(io::IO, m::MIME"application/prs.juno.plotpane+html", plt::Plot) =
|
Base.show(io::IO, m::MIME"application/prs.juno.plotpane+html", plt::Plot) =
|
||||||
showjuno(io, MIME("text/html"), plt)
|
showjuno(io, MIME("text/html"), plt)
|
||||||
|
|
||||||
|
|||||||
137
src/pipeline.jl
137
src/pipeline.jl
@ -8,14 +8,24 @@ function RecipesPipeline.warn_on_recipe_aliases!(
|
|||||||
recipe_type::Symbol,
|
recipe_type::Symbol,
|
||||||
@nospecialize(args)
|
@nospecialize(args)
|
||||||
)
|
)
|
||||||
pkeys = keys(plotattributes)
|
for k in keys(plotattributes)
|
||||||
for k in pkeys
|
if !is_default_attribute(k)
|
||||||
dk = get(_keyAliases, k, nothing)
|
dk = get(_keyAliases, k, k)
|
||||||
if dk !== nothing
|
if k !== dk
|
||||||
kv = RecipesPipeline.pop_kw!(plotattributes, k)
|
if recipe_type == :user
|
||||||
if dk ∉ pkeys
|
signature_string = RecipesPipeline.userrecipe_signature_string(args)
|
||||||
plotattributes[dk] = kv
|
elseif recipe_type == :type
|
||||||
|
signature_string = RecipesPipeline.typerecipe_signature_string(args)
|
||||||
|
elseif recipe_type == :plot
|
||||||
|
signature_string = RecipesPipeline.plotrecipe_signature_string(args)
|
||||||
|
elseif recipe_type == :series
|
||||||
|
signature_string = RecipesPipeline.seriesrecipe_signature_string(args)
|
||||||
|
else
|
||||||
|
throw(ArgumentError("Invalid recipe type `$recipe_type`"))
|
||||||
|
end
|
||||||
|
@warn "Attribute alias `$k` detected in the $recipe_type recipe defined for the signature $signature_string. To ensure expected behavior it is recommended to use the default attribute `$dk`."
|
||||||
end
|
end
|
||||||
|
plotattributes[dk] = RecipesPipeline.pop_kw!(plotattributes, k)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -68,19 +78,8 @@ end
|
|||||||
function _preprocess_userrecipe(kw::AKW)
|
function _preprocess_userrecipe(kw::AKW)
|
||||||
_add_markershape(kw)
|
_add_markershape(kw)
|
||||||
|
|
||||||
if get(kw, :permute, default(:permute)) != :none
|
|
||||||
l1, l2 = kw[:permute]
|
|
||||||
for k in _axis_args
|
|
||||||
k1 = _attrsymbolcache[l1][k]
|
|
||||||
k2 = _attrsymbolcache[l2][k]
|
|
||||||
kwk = keys(kw)
|
|
||||||
if k1 in kwk || k2 in kwk
|
|
||||||
kw[k1], kw[k2] = get(kw, k2, default(k2)), get(kw, k1, default(k1))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
# map marker_z if it's a Function
|
# map marker_z if it's a Function
|
||||||
if isa(get(kw, :marker_z, default(:marker_z)), Function)
|
if isa(get(kw, :marker_z, nothing), Function)
|
||||||
# TODO: should this take y and/or z as arguments?
|
# TODO: should this take y and/or z as arguments?
|
||||||
kw[:marker_z] =
|
kw[:marker_z] =
|
||||||
isa(kw[:z], Nothing) ? map(kw[:marker_z], kw[:x], kw[:y]) :
|
isa(kw[:z], Nothing) ? map(kw[:marker_z], kw[:x], kw[:y]) :
|
||||||
@ -88,12 +87,16 @@ function _preprocess_userrecipe(kw::AKW)
|
|||||||
end
|
end
|
||||||
|
|
||||||
# map line_z if it's a Function
|
# map line_z if it's a Function
|
||||||
if isa(get(kw, :line_z, default(:line_z)), Function)
|
if isa(get(kw, :line_z, nothing), Function)
|
||||||
kw[:line_z] =
|
kw[:line_z] =
|
||||||
isa(kw[:z], Nothing) ? map(kw[:line_z], kw[:x], kw[:y]) :
|
isa(kw[:z], Nothing) ? map(kw[:line_z], kw[:x], kw[:y]) :
|
||||||
map(kw[:line_z], kw[:x], kw[:y], kw[:z])
|
map(kw[:line_z], kw[:x], kw[:y], kw[:z])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# convert a ribbon into a fillrange
|
||||||
|
if get(kw, :ribbon, nothing) !== nothing
|
||||||
|
make_fillrange_from_ribbon(kw)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -161,22 +164,6 @@ function RecipesPipeline.process_sliced_series_attributes!(plt::Plots.Plot, kw_l
|
|||||||
kw_list[ind - 1] = tmp
|
kw_list[ind - 1] = tmp
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for kw in kw_list
|
|
||||||
rib = get(kw, :ribbon, default(:ribbon))
|
|
||||||
fr = get(kw, :fillrange, default(:fillrange))
|
|
||||||
# map ribbon if it's a Function
|
|
||||||
if rib isa Function
|
|
||||||
kw[:ribbon] = map(rib, kw[:x])
|
|
||||||
end
|
|
||||||
# convert a ribbon into a fillrange
|
|
||||||
if rib !== nothing
|
|
||||||
make_fillrange_from_ribbon(kw)
|
|
||||||
# map fillrange if it's a Function
|
|
||||||
elseif fr !== nothing && fr isa Function
|
|
||||||
kw[:fillrange] = map(fr, kw[:x])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return nothing
|
return nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -266,12 +253,12 @@ function _subplot_setup(plt::Plot, plotattributes::AKW, kw_list::Vector{KW})
|
|||||||
attr[get_attr_symbol(letter, k)] = v
|
attr[get_attr_symbol(letter, k)] = v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
for k in (:scale,), letter in (:x, :y, :z)
|
||||||
for k in (:scale,), letter in (:x, :y, :z)
|
# Series recipes may need access to this information
|
||||||
# Series recipes may need access to this information
|
lk = get_attr_symbol(letter, k)
|
||||||
lk = get_attr_symbol(letter, k)
|
if haskey(attr, lk)
|
||||||
if haskey(attr, lk)
|
kw[lk] = attr[lk]
|
||||||
kw[lk] = attr[lk]
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
sp_attrs[sp] = attr
|
sp_attrs[sp] = attr
|
||||||
@ -299,38 +286,27 @@ end
|
|||||||
|
|
||||||
function _add_plot_title!(plt)
|
function _add_plot_title!(plt)
|
||||||
plot_title = plt[:plot_title]
|
plot_title = plt[:plot_title]
|
||||||
plot_titleindex = nothing
|
|
||||||
|
|
||||||
if plot_title != ""
|
if plot_title != ""
|
||||||
# make new subplot for plot title
|
the_layout = plt.layout
|
||||||
if plt[:plot_titleindex] == 0
|
vspan = plt[:plot_titlevspan]
|
||||||
the_layout = plt.layout
|
plt.layout = grid(2, 1, heights = (vspan, 1 - vspan))
|
||||||
vspan = plt[:plot_titlevspan]
|
plt.layout.grid[1, 1] = subplot = Subplot(plt.backend, parent = plt.layout[1, 1])
|
||||||
plt.layout = grid(2, 1, heights = (vspan, 1 - vspan))
|
plt.layout.grid[2, 1] = the_layout
|
||||||
plt.layout.grid[1, 1] =
|
subplot.plt = plt
|
||||||
subplot = Subplot(plt.backend, parent = plt.layout[1, 1])
|
|
||||||
plt.layout.grid[2, 1] = the_layout
|
|
||||||
subplot.plt = plt
|
|
||||||
|
|
||||||
top = plt.backend isa PyPlotBackend ? nothing : 0mm
|
|
||||||
bot = 0mm
|
|
||||||
plt[:force_minpad] = nothing, top, nothing, bot
|
|
||||||
subplot[:subplot_index] = last(plt.subplots)[:subplot_index] + 1
|
|
||||||
plt[:plot_titleindex] = subplot[:subplot_index]
|
|
||||||
subplot[:framestyle] = :none
|
|
||||||
subplot[:margin] = 0px
|
|
||||||
push!(plt.subplots, subplot)
|
|
||||||
end
|
|
||||||
|
|
||||||
# propagate arguments plt[:plot_titleXXX] --> subplot[:titleXXX]
|
# propagate arguments plt[:plot_titleXXX] --> subplot[:titleXXX]
|
||||||
plot_titleindex = plt[:plot_titleindex]
|
|
||||||
subplot = plt.subplots[plot_titleindex]
|
|
||||||
for sym in filter(x -> startswith(string(x), "plot_title"), keys(_plot_defaults))
|
for sym in filter(x -> startswith(string(x), "plot_title"), keys(_plot_defaults))
|
||||||
subplot[Symbol(string(sym)[(length("plot_") + 1):end])] = plt[sym]
|
subplot[Symbol(string(sym)[(length("plot_") + 1):end])] = plt[sym]
|
||||||
end
|
end
|
||||||
|
top = plt.backend isa PyPlotBackend ? nothing : 0mm
|
||||||
|
bot = 0mm
|
||||||
|
plt[:force_minpad] = nothing, top, nothing, bot
|
||||||
|
subplot[:subplot_index] = last(plt.subplots)[:subplot_index] + 1
|
||||||
|
plt[:plot_titleindex] = subplot[:subplot_index]
|
||||||
|
subplot[:framestyle] = :none
|
||||||
|
subplot[:margin] = 0px
|
||||||
|
push!(plt.subplots, subplot)
|
||||||
end
|
end
|
||||||
|
return nothing
|
||||||
return plot_titleindex
|
|
||||||
end
|
end
|
||||||
|
|
||||||
## Series recipes
|
## Series recipes
|
||||||
@ -349,19 +325,6 @@ RecipesPipeline.is_seriestype_supported(plt::Plot, st) = is_seriestype_supported
|
|||||||
|
|
||||||
function RecipesPipeline.add_series!(plt::Plot, plotattributes)
|
function RecipesPipeline.add_series!(plt::Plot, plotattributes)
|
||||||
sp = _prepare_subplot(plt, plotattributes)
|
sp = _prepare_subplot(plt, plotattributes)
|
||||||
if plotattributes[:permute] != :none
|
|
||||||
letter1, letter2 = plotattributes[:permute]
|
|
||||||
if plotattributes[:markershape] == :hline &&
|
|
||||||
(plotattributes[:permute] == (:x, :y) || plotattributes[:permute] == (:y, :x))
|
|
||||||
plotattributes[:markershape] = :vline
|
|
||||||
elseif plotattributes[:markershape] == :vline && (
|
|
||||||
plotattributes[:permute] == (:x, :y) || plotattributes[:permute] == (:y, :x)
|
|
||||||
)
|
|
||||||
plotattributes[:markershape] = :hline
|
|
||||||
end
|
|
||||||
plotattributes[letter1], plotattributes[letter2] =
|
|
||||||
plotattributes[letter2], plotattributes[letter1]
|
|
||||||
end
|
|
||||||
_expand_subplot_extrema(sp, plotattributes, plotattributes[:seriestype])
|
_expand_subplot_extrema(sp, plotattributes, plotattributes[:seriestype])
|
||||||
_update_series_attributes!(plotattributes, plt, sp)
|
_update_series_attributes!(plotattributes, plt, sp)
|
||||||
_add_the_series(plt, sp, plotattributes)
|
_add_the_series(plt, sp, plotattributes)
|
||||||
@ -451,16 +414,6 @@ function _add_the_series(plt, sp, plotattributes)
|
|||||||
warn_on_unsupported(plt.backend, plotattributes)
|
warn_on_unsupported(plt.backend, plotattributes)
|
||||||
series = Series(plotattributes)
|
series = Series(plotattributes)
|
||||||
push!(plt.series_list, series)
|
push!(plt.series_list, series)
|
||||||
z_order = plotattributes[:z_order]
|
push!(sp.series_list, series)
|
||||||
if z_order == :front
|
|
||||||
push!(sp.series_list, series)
|
|
||||||
elseif z_order == :back
|
|
||||||
pushfirst!(sp.series_list, series)
|
|
||||||
elseif z_order isa Integer
|
|
||||||
insert!(sp.series_list, z_order, series)
|
|
||||||
else
|
|
||||||
@error "Wrong type $(typeof(z_order)) for attribute z_order"
|
|
||||||
end
|
|
||||||
_series_added(plt, series)
|
_series_added(plt, series)
|
||||||
_update_subplot_colorbars(sp)
|
|
||||||
end
|
end
|
||||||
|
|||||||
10
src/plot.jl
10
src/plot.jl
@ -163,11 +163,11 @@ function plot!(plt1::Plot, plt2::Plot, plts_tail::Plot...; kw...)
|
|||||||
cmdidx += 1
|
cmdidx += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
ttl_idx = _add_plot_title!(plt)
|
_add_plot_title!(plt)
|
||||||
|
|
||||||
# first apply any args for the subplots
|
# first apply any args for the subplots
|
||||||
for (idx, sp) in enumerate(plt.subplots)
|
for (idx, sp) in enumerate(plt.subplots)
|
||||||
_update_subplot_args(plt, sp, idx == ttl_idx ? KW() : plotattributes, idx, false)
|
_update_subplot_args(plt, sp, plotattributes, idx, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
# finish up
|
# finish up
|
||||||
@ -247,12 +247,6 @@ function prepare_output(plt::Plot)
|
|||||||
_update_plot_object(plt)
|
_update_plot_object(plt)
|
||||||
end
|
end
|
||||||
|
|
||||||
"""
|
|
||||||
backend_object(plot)
|
|
||||||
|
|
||||||
Returns the backend representation of a Plot object.
|
|
||||||
Returns `nothing` if the backend does not support this.
|
|
||||||
"""
|
|
||||||
function backend_object(plt::Plot)
|
function backend_object(plt::Plot)
|
||||||
prepare_output(plt)
|
prepare_output(plt)
|
||||||
plt.o
|
plt.o
|
||||||
|
|||||||
@ -1,40 +1,17 @@
|
|||||||
#! format: off
|
should_precompile = true
|
||||||
should_precompile = true
|
|
||||||
|
|
||||||
|
|
||||||
# Don't edit the following! Instead change the script for `snoop_bot`.
|
# Don't edit the following! Instead change the script for `snoop_bot`.
|
||||||
ismultios = false
|
ismultios = false
|
||||||
ismultiversion = true
|
ismultiversion = false
|
||||||
# precompile_enclosure
|
# precompile_enclosure
|
||||||
@static if !should_precompile
|
@static if !should_precompile
|
||||||
# nothing
|
# nothing
|
||||||
elseif !ismultios && !ismultiversion
|
elseif !ismultios && !ismultiversion
|
||||||
@static if isfile(joinpath(@__DIR__, "../deps/SnoopCompile/precompile/precompile_Plots.jl"))
|
@static if isfile(
|
||||||
|
joinpath(@__DIR__, "../deps/SnoopCompile/precompile/precompile_Plots.jl"),
|
||||||
|
)
|
||||||
include("../deps/SnoopCompile/precompile/precompile_Plots.jl")
|
include("../deps/SnoopCompile/precompile/precompile_Plots.jl")
|
||||||
_precompile_()
|
_precompile_()
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@static if v"1.6.0-DEV" <= VERSION <= v"1.6.9"
|
|
||||||
@static if isfile(joinpath(@__DIR__, "../deps/SnoopCompile/precompile//1.6/precompile_Plots.jl"))
|
|
||||||
include("../deps/SnoopCompile/precompile//1.6/precompile_Plots.jl")
|
|
||||||
_precompile_()
|
|
||||||
end
|
|
||||||
elseif v"1.7.0-DEV" <= VERSION <= v"1.7.9"
|
|
||||||
@static if isfile(joinpath(@__DIR__, "../deps/SnoopCompile/precompile//1.7/precompile_Plots.jl"))
|
|
||||||
include("../deps/SnoopCompile/precompile//1.7/precompile_Plots.jl")
|
|
||||||
_precompile_()
|
|
||||||
end
|
|
||||||
elseif v"1.8.0-DEV" <= VERSION <= v"1.8.9"
|
|
||||||
@static if isfile(joinpath(@__DIR__, "../deps/SnoopCompile/precompile//1.8/precompile_Plots.jl"))
|
|
||||||
include("../deps/SnoopCompile/precompile//1.8/precompile_Plots.jl")
|
|
||||||
_precompile_()
|
|
||||||
end
|
|
||||||
elseif v"1.9.0-DEV" <= VERSION <= v"1.9.9"
|
|
||||||
@static if isfile(joinpath(@__DIR__, "../deps/SnoopCompile/precompile//1.9/precompile_Plots.jl"))
|
|
||||||
include("../deps/SnoopCompile/precompile//1.9/precompile_Plots.jl")
|
|
||||||
_precompile_()
|
|
||||||
end
|
|
||||||
else
|
|
||||||
end
|
|
||||||
|
|
||||||
end # precompile_enclosure
|
end # precompile_enclosure
|
||||||
|
|||||||
@ -438,7 +438,7 @@ end
|
|||||||
procx, procy, xscale, yscale, baseline = _preprocess_barlike(plotattributes, x, y)
|
procx, procy, xscale, yscale, baseline = _preprocess_barlike(plotattributes, x, y)
|
||||||
nx, ny = length(procx), length(procy)
|
nx, ny = length(procx), length(procy)
|
||||||
axis = plotattributes[:subplot][isvertical(plotattributes) ? :xaxis : :yaxis]
|
axis = plotattributes[:subplot][isvertical(plotattributes) ? :xaxis : :yaxis]
|
||||||
cv = [discrete_value!(plotattributes, :x, xi)[1] for xi in procx]
|
cv = [discrete_value!(axis, xi)[1] for xi in procx]
|
||||||
procx = if nx == ny
|
procx = if nx == ny
|
||||||
cv
|
cv
|
||||||
elseif nx == ny + 1
|
elseif nx == ny + 1
|
||||||
@ -508,18 +508,6 @@ end
|
|||||||
primary := true
|
primary := true
|
||||||
x := xseg.pts
|
x := xseg.pts
|
||||||
y := yseg.pts
|
y := yseg.pts
|
||||||
# expand attributes to match indices in new series data
|
|
||||||
for k in _segmenting_vector_attributes ∪ _segmenting_array_attributes
|
|
||||||
v = get(plotattributes, k, nothing)
|
|
||||||
if v isa AVec
|
|
||||||
if eachindex(v) != eachindex(y)
|
|
||||||
@warn "Indices $(eachindex(v)) of attribute `$k` do not match data indices $(eachindex(y))."
|
|
||||||
end
|
|
||||||
# Each segment is 6 elements long, including the NaN separator.
|
|
||||||
# There is no trailing NaN, so the last repetition is dropped.
|
|
||||||
plotattributes[k] = @view repeat(v; inner = 6)[1:(end - 1)]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
()
|
()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -795,7 +783,7 @@ function _auto_binning_nbins(
|
|||||||
elseif mode == :fd # Freedman–Diaconis rule
|
elseif mode == :fd # Freedman–Diaconis rule
|
||||||
_cl(_span(v) / (2 * _iqr(v) / nd))
|
_cl(_span(v) / (2 * _iqr(v) / nd))
|
||||||
elseif mode == :wand
|
elseif mode == :wand
|
||||||
wand_edges(v) # this makes this function not type stable, but the type instability does not propagate
|
_cl(wand_edges(v)) # this makes this function not type stable, but the type instability does not propagate
|
||||||
else
|
else
|
||||||
error("Unknown auto-binning mode $mode")
|
error("Unknown auto-binning mode $mode")
|
||||||
end
|
end
|
||||||
@ -1037,32 +1025,24 @@ export lens!
|
|||||||
throw(ArgumentError("Inset bounding box needs to in relative coordinates."))
|
throw(ArgumentError("Inset bounding box needs to in relative coordinates."))
|
||||||
end
|
end
|
||||||
sp = plt.subplots[sp_index]
|
sp = plt.subplots[sp_index]
|
||||||
xscale = sp[:xaxis][:scale]
|
xl1, xl2 = xlims(plt.subplots[sp_index])
|
||||||
yscale = sp[:yaxis][:scale]
|
|
||||||
xl1, xl2 = xlims(sp)
|
|
||||||
bbx1 = xl1 + left(inset_bbox).value * (xl2 - xl1)
|
bbx1 = xl1 + left(inset_bbox).value * (xl2 - xl1)
|
||||||
bbx2 = bbx1 + width(inset_bbox).value * (xl2 - xl1)
|
bbx2 = bbx1 + width(inset_bbox).value * (xl2 - xl1)
|
||||||
yl1, yl2 = ylims(sp)
|
yl1, yl2 = ylims(plt.subplots[sp_index])
|
||||||
bby1 = yl1 + (1 - bottom(inset_bbox).value) * (yl2 - yl1)
|
bby1 = yl1 + (1 - bottom(inset_bbox).value) * (yl2 - yl1)
|
||||||
bby2 = bby1 + height(inset_bbox).value * (yl2 - yl1)
|
bby2 = bby1 + height(inset_bbox).value * (yl2 - yl1)
|
||||||
bbx = bbx1 + width(inset_bbox).value * (xl2 - xl1) / 2 * (sp[:xaxis][:flip] ? -1 : 1)
|
bbx = bbx1 + width(inset_bbox).value * (xl2 - xl1) / 2
|
||||||
bby = bby1 + height(inset_bbox).value * (yl2 - yl1) / 2 * (sp[:yaxis][:flip] ? -1 : 1)
|
bby = bby1 + height(inset_bbox).value * (yl2 - yl1) / 2
|
||||||
lens_index = last(plt.subplots)[:subplot_index] + 1
|
lens_index = last(plt.subplots)[:subplot_index] + 1
|
||||||
x1, x2 = RecipesPipeline.inverse_scale_func(xscale).(plotattributes[:x])
|
x1, x2 = plotattributes[:x]
|
||||||
y1, y2 = RecipesPipeline.inverse_scale_func(yscale).(plotattributes[:y])
|
y1, y2 = plotattributes[:y]
|
||||||
backup = copy(plotattributes)
|
backup = copy(plotattributes)
|
||||||
empty!(plotattributes)
|
empty!(plotattributes)
|
||||||
|
|
||||||
series_plotindex := backup[:series_plotindex]
|
series_plotindex := backup[:series_plotindex]
|
||||||
seriestype := :path
|
seriestype := :path
|
||||||
primary := false
|
primary := false
|
||||||
linecolor := get(backup, :linecolor, :lightgray)
|
linecolor := :lightgray
|
||||||
if haskey(backup, :linestyle)
|
|
||||||
linestyle := backup[:linestyle]
|
|
||||||
end
|
|
||||||
if haskey(backup, :linewidth)
|
|
||||||
linewidth := backup[:linewidth]
|
|
||||||
end
|
|
||||||
bbx_mag = (x1 + x2) / 2
|
bbx_mag = (x1 + x2) / 2
|
||||||
bby_mag = (y1 + y2) / 2
|
bby_mag = (y1 + y2) / 2
|
||||||
xi_lens, yi_lens =
|
xi_lens, yi_lens =
|
||||||
@ -1074,8 +1054,8 @@ export lens!
|
|||||||
@series begin
|
@series begin
|
||||||
primary := false
|
primary := false
|
||||||
subplot := sp_index
|
subplot := sp_index
|
||||||
x := RecipesPipeline.scale_func(xscale).([xi_mag, xi_lens])
|
x := [xi_mag, xi_lens]
|
||||||
y := RecipesPipeline.scale_func(yscale).([yi_mag, yi_lens])
|
y := [yi_mag, yi_lens]
|
||||||
()
|
()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1083,8 +1063,8 @@ export lens!
|
|||||||
@series begin
|
@series begin
|
||||||
primary := false
|
primary := false
|
||||||
subplot := sp_index
|
subplot := sp_index
|
||||||
x := RecipesPipeline.scale_func(xscale).([x1, x1, x2, x2, x1])
|
x := [x1, x1, x2, x2, x1]
|
||||||
y := RecipesPipeline.scale_func(yscale).([y1, y2, y2, y1, y1])
|
y := [y1, y2, y2, y1, y1]
|
||||||
()
|
()
|
||||||
end
|
end
|
||||||
# add subplot
|
# add subplot
|
||||||
@ -1093,8 +1073,8 @@ export lens!
|
|||||||
plotattributes = merge(backup, copy(series.plotattributes))
|
plotattributes = merge(backup, copy(series.plotattributes))
|
||||||
subplot := lens_index
|
subplot := lens_index
|
||||||
primary := false
|
primary := false
|
||||||
xlims := RecipesPipeline.scale_func(xscale).((x1, x2))
|
xlims := (x1, x2)
|
||||||
ylims := RecipesPipeline.scale_func(yscale).((y1, y2))
|
ylims := (y1, y2)
|
||||||
()
|
()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1140,13 +1120,6 @@ end
|
|||||||
# Error Bars
|
# Error Bars
|
||||||
|
|
||||||
function error_style!(plotattributes::AKW)
|
function error_style!(plotattributes::AKW)
|
||||||
# errorbar color should soley determined by markerstrokecolor
|
|
||||||
if haskey(plotattributes, :marker_z)
|
|
||||||
reset_kw!(plotattributes, :marker_z)
|
|
||||||
end
|
|
||||||
if haskey(plotattributes, :line_z)
|
|
||||||
reset_kw!(plotattributes, :line_z)
|
|
||||||
end
|
|
||||||
msc = plotattributes[:markerstrokecolor]
|
msc = plotattributes[:markerstrokecolor]
|
||||||
msc = if msc === :match
|
msc = if msc === :match
|
||||||
plotattributes[:subplot][:foreground_color_subplot]
|
plotattributes[:subplot][:foreground_color_subplot]
|
||||||
@ -1389,8 +1362,7 @@ function clamp_greys!(mat::AMat{<:Gray})
|
|||||||
end
|
end
|
||||||
|
|
||||||
@recipe function f(mat::AMat{<:Gray})
|
@recipe function f(mat::AMat{<:Gray})
|
||||||
n, m = map(a -> range(0.5, stop = a.stop + 0.5), axes(mat))
|
n, m = axes(mat)
|
||||||
|
|
||||||
if is_seriestype_supported(:image)
|
if is_seriestype_supported(:image)
|
||||||
seriestype := :image
|
seriestype := :image
|
||||||
yflip --> true
|
yflip --> true
|
||||||
@ -1408,7 +1380,7 @@ end
|
|||||||
|
|
||||||
# images - colors
|
# images - colors
|
||||||
@recipe function f(mat::AMat{T}) where {T<:Colorant}
|
@recipe function f(mat::AMat{T}) where {T<:Colorant}
|
||||||
n, m = map(a -> range(0.5, stop = a.stop + 0.5), axes(mat))
|
n, m = axes(mat)
|
||||||
|
|
||||||
if is_seriestype_supported(:image)
|
if is_seriestype_supported(:image)
|
||||||
seriestype := :image
|
seriestype := :image
|
||||||
@ -1632,6 +1604,7 @@ end
|
|||||||
|
|
||||||
@nospecialize
|
@nospecialize
|
||||||
|
|
||||||
|
"Adds ax+b... straight line over the current plot, without changing the axis limits"
|
||||||
abline!(plt::Plot, a, b; kw...) =
|
abline!(plt::Plot, a, b; kw...) =
|
||||||
plot!(plt, [0, 1], [b, b + a]; seriestype = :straightline, kw...)
|
plot!(plt, [0, 1], [b, b + a]; seriestype = :straightline, kw...)
|
||||||
|
|
||||||
@ -1676,6 +1649,16 @@ end
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
"""
|
||||||
|
areaplot([x,] y)
|
||||||
|
areaplot!([x,] y)
|
||||||
|
|
||||||
|
Draw a stacked area plot of the matrix y.
|
||||||
|
# Examples
|
||||||
|
```julia-repl
|
||||||
|
julia> areaplot(1:3, [1 2 3; 7 8 9; 4 5 6], seriescolor = [:red :green :blue], fillalpha = [0.2 0.3 0.4])
|
||||||
|
```
|
||||||
|
"""
|
||||||
@userplot AreaPlot
|
@userplot AreaPlot
|
||||||
|
|
||||||
@recipe function f(a::AreaPlot)
|
@recipe function f(a::AreaPlot)
|
||||||
|
|||||||
@ -348,10 +348,10 @@ Make a box and whisker plot.
|
|||||||
|
|
||||||
# Keyword arguments
|
# Keyword arguments
|
||||||
- `notch`: Bool. Notch the box plot? (false)
|
- `notch`: Bool. Notch the box plot? (false)
|
||||||
- `whisker_range`: Real. Whiskers extend `whisker_range`*IQR below the first quartile
|
- `range`: Real. Values more than range*IQR below the first quartile
|
||||||
and above the third quartile. Values outside this range are shown as outliers (1.5)
|
or above the third quartile are shown as outliers (1.5)
|
||||||
- `outliers`: Bool. Show outliers? (true)
|
- `outliers`: Bool. Show outliers? (true)
|
||||||
- `whisker_width`: Real or Symbol. Length of whiskers; the options are `:match` to match the box width, `:half`, or a number to indicate the total length. (:half)
|
- `whisker_width`: Real or Symbol. Length of whiskers (:match)
|
||||||
|
|
||||||
# Example
|
# Example
|
||||||
```julia-repl
|
```julia-repl
|
||||||
@ -472,33 +472,10 @@ yflip!(flip::Bool = true; kw...) = plot!(; yflip = flip, kw...)
|
|||||||
|
|
||||||
"Specify x axis attributes for an existing plot"
|
"Specify x axis attributes for an existing plot"
|
||||||
xaxis!(args...; kw...) = plot!(; xaxis = args, kw...)
|
xaxis!(args...; kw...) = plot!(; xaxis = args, kw...)
|
||||||
xgrid!(args...; kw...) = plot!(; xgrid = args, kw...)
|
|
||||||
|
|
||||||
"Specify y axis attributes for an existing plot"
|
"Specify y axis attributes for an existing plot"
|
||||||
yaxis!(args...; kw...) = plot!(; yaxis = args, kw...)
|
yaxis!(args...; kw...) = plot!(; yaxis = args, kw...)
|
||||||
|
xgrid!(args...; kw...) = plot!(; xgrid = args, kw...)
|
||||||
ygrid!(args...; kw...) = plot!(; ygrid = args, kw...)
|
ygrid!(args...; kw...) = plot!(; ygrid = args, kw...)
|
||||||
|
|
||||||
@doc """
|
|
||||||
abline!([plot,] a, b; kwargs...)
|
|
||||||
|
|
||||||
Adds ax+b... straight line over the current plot, without changing the axis limits
|
|
||||||
""" abline!
|
|
||||||
|
|
||||||
@doc """
|
|
||||||
areaplot([x,] y)
|
|
||||||
areaplot!([x,] y)
|
|
||||||
|
|
||||||
Draw a stacked area plot of the matrix y.
|
|
||||||
# Examples
|
|
||||||
```julia-repl
|
|
||||||
julia> areaplot(1:3, [1 2 3; 7 8 9; 4 5 6], seriescolor = [:red :green :blue], fillalpha = [0.2 0.3 0.4])
|
|
||||||
```
|
|
||||||
""" areaplot
|
|
||||||
|
|
||||||
@doc """
|
|
||||||
lens!([plot,] x, y, inset = (sp_index, bbox(x1, x2, y1, y2)))
|
|
||||||
|
|
||||||
Magnify a region of a plot given by `x` and `y`.
|
|
||||||
`sp_index` is the index of the subplot and `x1`, `x2`, `y1` and `y2` should be between `0` and `1`.
|
|
||||||
""" lens!
|
|
||||||
@specialize
|
@specialize
|
||||||
|
|||||||
109
src/utils.jl
109
src/utils.jl
@ -103,10 +103,7 @@ function series_segments(series::Series, seriestype::Symbol = :path; check = fal
|
|||||||
|
|
||||||
segments = if has_attribute_segments(series)
|
segments = if has_attribute_segments(series)
|
||||||
Iterators.flatten(map(nan_segments) do r
|
Iterators.flatten(map(nan_segments) do r
|
||||||
if seriestype == :shape
|
if seriestype in (:scatter, :scatter3d)
|
||||||
warn_on_inconsistent_shape_attr(series, x, y, z, r)
|
|
||||||
(SeriesSegment(r, first(r)),)
|
|
||||||
elseif seriestype in (:scatter, :scatter3d)
|
|
||||||
(SeriesSegment(i:i, i) for i in r)
|
(SeriesSegment(i:i, i) for i in r)
|
||||||
else
|
else
|
||||||
(SeriesSegment(i:(i + 1), i) for i in first(r):(last(r) - 1))
|
(SeriesSegment(i:(i + 1), i) for i in first(r):(last(r) - 1))
|
||||||
@ -143,16 +140,6 @@ function warn_on_attr_dim_mismatch(series, x, y, z, segments)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function warn_on_inconsistent_shape_attr(series, x, y, z, r)
|
|
||||||
for attr in _segmenting_vector_attributes
|
|
||||||
v = get(series, attr, nothing)
|
|
||||||
if v isa AVec && length(unique(v[r])) > 1
|
|
||||||
@warn "Different values of `$attr` specified for different shape vertices. Only first one will be used."
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# helpers to figure out if there are NaN values in a list of array types
|
# helpers to figure out if there are NaN values in a list of array types
|
||||||
anynan(i::Int, args::Tuple) = any(a -> try
|
anynan(i::Int, args::Tuple) = any(a -> try
|
||||||
isnan(_cycle(a, i))
|
isnan(_cycle(a, i))
|
||||||
@ -215,12 +202,14 @@ makevec(v::T) where {T} = T[v]
|
|||||||
maketuple(x::Real) = (x, x)
|
maketuple(x::Real) = (x, x)
|
||||||
maketuple(x::Tuple{T,S}) where {T,S} = x
|
maketuple(x::Tuple{T,S}) where {T,S} = x
|
||||||
|
|
||||||
RecipesPipeline.unzip(v) = unzip(v)
|
RecipesPipeline.unzip(v::Union{AVec{<:Tuple},AVec{<:GeometryBasics.Point}) = tuple((([t[j] for t in v]) for j in 1:length(v[1]))...)
|
||||||
RecipesPipeline.unzip(points::AbstractVector{<:GeometryBasics.Point}) =
|
|
||||||
unzip(Tuple.(points))
|
RecipesPipeline.unzip(
|
||||||
RecipesPipeline.unzip(points::AbstractVector{GeometryBasics.Point{N,T}}) where {N,T} =
|
::Union{AVec{<:GeometryBasics.Point{N}},AVec{<:Tuple}},
|
||||||
isbitstype(T) && sizeof(T) > 0 ? unzip(reinterpret(NTuple{N,T}, points)) :
|
) where {N} = error("$N-dimensional unzip not implemented.")
|
||||||
unzip(Tuple.(points))
|
|
||||||
|
RecipesPipeline.unzip(::Union{AVec{<:GeometryBasics.Point},AVec{<:Tuple}}) =
|
||||||
|
error("Can't unzip points of different dimensions.")
|
||||||
|
|
||||||
# given 2-element lims and a vector of data x, widen lims to account for the extrema of x
|
# given 2-element lims and a vector of data x, widen lims to account for the extrema of x
|
||||||
function _expand_limits(lims, x)
|
function _expand_limits(lims, x)
|
||||||
@ -377,7 +366,8 @@ nanappend!(a::AbstractVector, b) = (push!(a, NaN); append!(a, b))
|
|||||||
function nansplit(v::AVec)
|
function nansplit(v::AVec)
|
||||||
vs = Vector{eltype(v)}[]
|
vs = Vector{eltype(v)}[]
|
||||||
while true
|
while true
|
||||||
if (idx = findfirst(isnan, v)) === nothing
|
idx = findfirst(isnan, v)
|
||||||
|
if idx <= 0
|
||||||
# no nans
|
# no nans
|
||||||
push!(vs, v)
|
push!(vs, v)
|
||||||
break
|
break
|
||||||
@ -433,9 +423,9 @@ end
|
|||||||
|
|
||||||
#turn tuple of fillranges to one path
|
#turn tuple of fillranges to one path
|
||||||
function concatenate_fillrange(x, y::Tuple)
|
function concatenate_fillrange(x, y::Tuple)
|
||||||
rib1, rib2 = collect(first(y)), collect(last(y)) # collect needed until https://github.com/JuliaLang/julia/pull/37629 is merged
|
rib1, rib2 = first(y), last(y)
|
||||||
yline = vcat(rib1, reverse(rib2))
|
yline = vcat(rib1, (rib2)[end:-1:1])
|
||||||
xline = vcat(x, reverse(x))
|
xline = vcat(x, x[end:-1:1])
|
||||||
return xline, yline
|
return xline, yline
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -504,7 +494,7 @@ for comp in (:line, :fill, :marker)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
$get_compcolor(series, clims::Tuple{<:Number,<:Number}, i::Int = 1) =
|
$get_compcolor(series, clims, i::Int = 1) =
|
||||||
$get_compcolor(series, clims[1], clims[2], i)
|
$get_compcolor(series, clims[1], clims[2], i)
|
||||||
|
|
||||||
function $get_compcolor(series, i::Int = 1)
|
function $get_compcolor(series, i::Int = 1)
|
||||||
@ -577,6 +567,7 @@ const _segmenting_array_attributes = :line_z, :fill_z, :marker_z
|
|||||||
function has_attribute_segments(series::Series)
|
function has_attribute_segments(series::Series)
|
||||||
# we want to check if a series needs to be split into segments just because
|
# we want to check if a series needs to be split into segments just because
|
||||||
# of its attributes
|
# of its attributes
|
||||||
|
series[:seriestype] == :shape && return false
|
||||||
# check relevant attributes if they have multiple inputs
|
# check relevant attributes if they have multiple inputs
|
||||||
return any(
|
return any(
|
||||||
series[attr] isa AbstractVector && length(series[attr]) > 1 for
|
series[attr] isa AbstractVector && length(series[attr]) > 1 for
|
||||||
@ -651,7 +642,7 @@ function with(f::Function, args...; kw...)
|
|||||||
newdefs[:xticks] = nothing
|
newdefs[:xticks] = nothing
|
||||||
newdefs[:yticks] = nothing
|
newdefs[:yticks] = nothing
|
||||||
newdefs[:grid] = false
|
newdefs[:grid] = false
|
||||||
newdefs[:legend_position] = false
|
newdefs[:legend] = false
|
||||||
end
|
end
|
||||||
|
|
||||||
# dict to store old and new keyword args for anything that changes
|
# dict to store old and new keyword args for anything that changes
|
||||||
@ -986,21 +977,21 @@ titlefont(sp::Subplot) = font(;
|
|||||||
)
|
)
|
||||||
|
|
||||||
legendfont(sp::Subplot) = font(;
|
legendfont(sp::Subplot) = font(;
|
||||||
family = sp[:legend_font_family],
|
family = sp[:legendfontfamily],
|
||||||
pointsize = sp[:legend_font_pointsize],
|
pointsize = sp[:legendfontsize],
|
||||||
valign = sp[:legend_font_valign],
|
valign = sp[:legendfontvalign],
|
||||||
halign = sp[:legend_font_halign],
|
halign = sp[:legendfonthalign],
|
||||||
rotation = sp[:legend_font_rotation],
|
rotation = sp[:legendfontrotation],
|
||||||
color = sp[:legend_font_color],
|
color = sp[:legendfontcolor],
|
||||||
)
|
)
|
||||||
|
|
||||||
legendtitlefont(sp::Subplot) = font(;
|
legendtitlefont(sp::Subplot) = font(;
|
||||||
family = sp[:legend_title_font_family],
|
family = sp[:legendtitlefontfamily],
|
||||||
pointsize = sp[:legend_title_font_pointsize],
|
pointsize = sp[:legendtitlefontsize],
|
||||||
valign = sp[:legend_title_font_valign],
|
valign = sp[:legendtitlefontvalign],
|
||||||
halign = sp[:legend_title_font_halign],
|
halign = sp[:legendtitlefonthalign],
|
||||||
rotation = sp[:legend_title_font_rotation],
|
rotation = sp[:legendtitlefontrotation],
|
||||||
color = sp[:legend_title_font_color],
|
color = sp[:legendtitlefontcolor],
|
||||||
)
|
)
|
||||||
|
|
||||||
tickfont(ax::Axis) = font(;
|
tickfont(ax::Axis) = font(;
|
||||||
@ -1184,10 +1175,16 @@ end
|
|||||||
_document_argument(S::AbstractString) =
|
_document_argument(S::AbstractString) =
|
||||||
_fmt_paragraph("`$S`: " * _arg_desc[Symbol(S)], leadingspaces = 6 + length(S))
|
_fmt_paragraph("`$S`: " * _arg_desc[Symbol(S)], leadingspaces = 6 + length(S))
|
||||||
|
|
||||||
function mesh3d_triangles(x, y, z, cns::Tuple{Array,Array,Array})
|
function mesh3d_triangles(x, y, z, cns)
|
||||||
ci, cj, ck = cns
|
if typeof(cns) <: Tuple{Array,Array,Array}
|
||||||
if !(length(ci) == length(cj) == length(ck))
|
ci, cj, ck = cns
|
||||||
throw(ArgumentError("Argument connections must consist of equally sized arrays."))
|
if !(length(ci) == length(cj) == length(ck))
|
||||||
|
throw(
|
||||||
|
ArgumentError("Argument connections must consist of equally sized arrays."),
|
||||||
|
)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
throw(ArgumentError("Argument connections has to be a tuple of three arrays."))
|
||||||
end
|
end
|
||||||
X = zeros(eltype(x), 4length(ci))
|
X = zeros(eltype(x), 4length(ci))
|
||||||
Y = zeros(eltype(y), 4length(cj))
|
Y = zeros(eltype(y), 4length(cj))
|
||||||
@ -1213,36 +1210,8 @@ function mesh3d_triangles(x, y, z, cns::Tuple{Array,Array,Array})
|
|||||||
return X, Y, Z
|
return X, Y, Z
|
||||||
end
|
end
|
||||||
|
|
||||||
function mesh3d_triangles(x, y, z, cns::AbstractVector{NTuple{3,Int}})
|
|
||||||
X = zeros(eltype(x), 4length(cns))
|
|
||||||
Y = zeros(eltype(y), 4length(cns))
|
|
||||||
Z = zeros(eltype(z), 4length(cns))
|
|
||||||
@inbounds for I in 1:length(cns)
|
|
||||||
i = cns[I][1] # connections are 1-based
|
|
||||||
j = cns[I][2]
|
|
||||||
k = cns[I][3]
|
|
||||||
m = 4(I - 1) + 1
|
|
||||||
n = m + 1
|
|
||||||
o = m + 2
|
|
||||||
p = m + 3
|
|
||||||
X[m] = X[p] = x[i]
|
|
||||||
Y[m] = Y[p] = y[i]
|
|
||||||
Z[m] = Z[p] = z[i]
|
|
||||||
X[n] = x[j]
|
|
||||||
Y[n] = y[j]
|
|
||||||
Z[n] = z[j]
|
|
||||||
X[o] = x[k]
|
|
||||||
Y[o] = y[k]
|
|
||||||
Z[o] = z[k]
|
|
||||||
end
|
|
||||||
return X, Y, Z
|
|
||||||
end
|
|
||||||
|
|
||||||
# cache joined symbols so they can be looked up instead of constructed each time
|
# cache joined symbols so they can be looked up instead of constructed each time
|
||||||
const _attrsymbolcache = Dict{Symbol,Dict{Symbol,Symbol}}()
|
const _attrsymbolcache = Dict{Symbol,Dict{Symbol,Symbol}}()
|
||||||
|
|
||||||
get_attr_symbol(letter::Symbol, keyword::String) = get_attr_symbol(letter, Symbol(keyword))
|
get_attr_symbol(letter::Symbol, keyword::String) = get_attr_symbol(letter, Symbol(keyword))
|
||||||
get_attr_symbol(letter::Symbol, keyword::Symbol) = _attrsymbolcache[letter][keyword]
|
get_attr_symbol(letter::Symbol, keyword::Symbol) = _attrsymbolcache[letter][keyword]
|
||||||
|
|
||||||
texmath2unicode(s::AbstractString, pat = r"\$([^$]+)\$") =
|
|
||||||
replace(s, pat => m -> UnicodeFun.to_latex(m[2:(length(m) - 1)]))
|
|
||||||
|
|||||||
@ -13,6 +13,7 @@ function replace_rand!(ex::Expr)
|
|||||||
end
|
end
|
||||||
function fix_rand!(ex)
|
function fix_rand!(ex)
|
||||||
replace_rand!(ex)
|
replace_rand!(ex)
|
||||||
|
pushfirst!(ex.args[1].args, :(rng = StableRNG(PLOTS_SEED)))
|
||||||
end
|
end
|
||||||
|
|
||||||
function image_comparison_tests(
|
function image_comparison_tests(
|
||||||
@ -38,13 +39,10 @@ function image_comparison_tests(
|
|||||||
|
|
||||||
# test function
|
# test function
|
||||||
func = (fn, idx) -> begin
|
func = (fn, idx) -> begin
|
||||||
eval(:(rng = StableRNG(PLOTS_SEED)))
|
expr = Expr(:block)
|
||||||
for the_expr in example.exprs
|
append!(expr.args, example.exprs)
|
||||||
expr = Expr(:block)
|
fix_rand!(expr)
|
||||||
push!(expr.args, the_expr)
|
eval(expr)
|
||||||
fix_rand!(expr)
|
|
||||||
eval(expr)
|
|
||||||
end
|
|
||||||
png(fn)
|
png(fn)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
532
test/runtests.jl
532
test/runtests.jl
@ -1,20 +1,18 @@
|
|||||||
using Plots: guidefont, series_annotations, PLOTS_SEED
|
using Plots: guidefont, series_annotations, PLOTS_SEED
|
||||||
|
|
||||||
using VisualRegressionTests
|
|
||||||
using RecipesBase
|
|
||||||
using StableRNGs
|
|
||||||
using TestImages
|
|
||||||
using LibGit2
|
|
||||||
using Random
|
|
||||||
using FileIO
|
|
||||||
using Plots
|
|
||||||
using Dates
|
|
||||||
using JSON
|
|
||||||
using Test
|
|
||||||
using Gtk
|
|
||||||
|
|
||||||
import GeometryBasics
|
|
||||||
import ImageMagick
|
import ImageMagick
|
||||||
|
using VisualRegressionTests
|
||||||
|
using Plots
|
||||||
|
using Random
|
||||||
|
using StableRNGs
|
||||||
|
using Test
|
||||||
|
using TestImages
|
||||||
|
using FileIO
|
||||||
|
using Gtk
|
||||||
|
using LibGit2
|
||||||
|
import GeometryBasics
|
||||||
|
using Dates
|
||||||
|
using RecipesBase
|
||||||
|
using JSON
|
||||||
|
|
||||||
@testset "Infrastructure" begin
|
@testset "Infrastructure" begin
|
||||||
@test_nowarn JSON.Parser.parse(
|
@test_nowarn JSON.Parser.parse(
|
||||||
@ -35,299 +33,20 @@ end
|
|||||||
end
|
end
|
||||||
Plots.plotly_local_file_path[] = nothing
|
Plots.plotly_local_file_path[] = nothing
|
||||||
Plots.use_local_dependencies[] = temp
|
Plots.use_local_dependencies[] = temp
|
||||||
end
|
end # testset
|
||||||
|
|
||||||
@testset "Utils" begin
|
include("test_defaults.jl")
|
||||||
zipped = (
|
include("test_pipeline.jl")
|
||||||
[(1, 2)],
|
include("test_axes.jl")
|
||||||
[("a", "b")],
|
include("test_contours.jl")
|
||||||
[(1, "a"), (2, "b")],
|
include("test_axis_letter.jl")
|
||||||
[(1, 2), (3, 4)],
|
include("test_components.jl")
|
||||||
[(1, 2, 3), (3, 4, 5)],
|
include("test_shorthands.jl")
|
||||||
[(1, 2, 3, 4), (3, 4, 5, 6)],
|
include("integration_dates.jl")
|
||||||
[(1, 2.0), (missing, missing)],
|
include("test_recipes.jl")
|
||||||
[(1, missing), (missing, "a")],
|
include("test_hdf5plots.jl")
|
||||||
[(missing, missing)],
|
include("test_pgfplotsx.jl")
|
||||||
[(missing, missing, missing), ("a", "b", "c")],
|
include("test_plotly.jl")
|
||||||
)
|
|
||||||
for z in zipped
|
|
||||||
@test isequal(collect(zip(Plots.RecipesPipeline.unzip(z)...)), z)
|
|
||||||
@test isequal(
|
|
||||||
collect(zip(Plots.RecipesPipeline.unzip(GeometryBasics.Point.(z))...)),
|
|
||||||
z,
|
|
||||||
)
|
|
||||||
end
|
|
||||||
op1 = Plots.process_clims((1.0, 2.0))
|
|
||||||
op2 = Plots.process_clims((1, 2.0))
|
|
||||||
data = randn(100, 100)
|
|
||||||
@test op1(data) == op2(data)
|
|
||||||
@test Plots.process_clims(nothing) ==
|
|
||||||
Plots.process_clims(missing) ==
|
|
||||||
Plots.process_clims(:auto)
|
|
||||||
|
|
||||||
@test (==)(
|
|
||||||
Plots.texmath2unicode(
|
|
||||||
raw"Equation $y = \alpha \cdot x + \beta$ and eqn $y = \sin(x)^2$",
|
|
||||||
),
|
|
||||||
raw"Equation y = α ⋅ x + β and eqn y = sin(x)²",
|
|
||||||
)
|
|
||||||
|
|
||||||
@test Plots.isvector([1, 2])
|
|
||||||
@test !Plots.isvector(nothing)
|
|
||||||
@test Plots.ismatrix([1 2; 3 4])
|
|
||||||
@test !Plots.ismatrix(nothing)
|
|
||||||
@test Plots.isscalar(1.0)
|
|
||||||
@test !Plots.isscalar(nothing)
|
|
||||||
@test Plots.tovec([]) isa AbstractVector
|
|
||||||
@test Plots.tovec(nothing) isa AbstractVector
|
|
||||||
@test Plots.anynan(1, 3, (1, NaN, 3))
|
|
||||||
@test Plots.allnan(1, 2, (NaN, NaN, 1))
|
|
||||||
@test Plots.makevec([]) isa AbstractVector
|
|
||||||
@test Plots.makevec(1) isa AbstractVector
|
|
||||||
@test Plots.maketuple(1) == (1, 1)
|
|
||||||
@test Plots.maketuple((1, 1)) == (1, 1)
|
|
||||||
@test Plots.ok(1, 2)
|
|
||||||
@test !Plots.ok(1, 2, NaN)
|
|
||||||
@test Plots.ok((1, 2, 3))
|
|
||||||
@test !Plots.ok((1, 2, NaN))
|
|
||||||
@test Plots.nansplit([1, 2, NaN, 3, 4]) == [[1.0, 2.0], [3.0, 4.0]]
|
|
||||||
@test Plots.nanvcat([1, NaN]) |> length == 4
|
|
||||||
|
|
||||||
@test Plots.nop() === nothing
|
|
||||||
@test_throws ErrorException Plots.notimpl()
|
|
||||||
|
|
||||||
@test Plots.inch2px(1) isa AbstractFloat
|
|
||||||
@test Plots.px2inch(1) isa AbstractFloat
|
|
||||||
@test Plots.inch2mm(1) isa AbstractFloat
|
|
||||||
@test Plots.mm2inch(1) isa AbstractFloat
|
|
||||||
@test Plots.px2mm(1) isa AbstractFloat
|
|
||||||
@test Plots.mm2px(1) isa AbstractFloat
|
|
||||||
|
|
||||||
p = plot()
|
|
||||||
@test xlims() isa Tuple
|
|
||||||
@test ylims() isa Tuple
|
|
||||||
@test zlims() isa Tuple
|
|
||||||
|
|
||||||
Plots.makekw(foo = 1, bar = 2) isa Dict
|
|
||||||
|
|
||||||
@test_throws ErrorException Plots.inline()
|
|
||||||
@test_throws ErrorException Plots._do_plot_show(plot(), :inline)
|
|
||||||
@test_throws ErrorException Plots.dumpcallstack()
|
|
||||||
|
|
||||||
Plots.debugplots(true)
|
|
||||||
Plots.debugplots(false)
|
|
||||||
Plots.debugshow(devnull, nothing)
|
|
||||||
Plots.debugshow(devnull, [1])
|
|
||||||
|
|
||||||
p = plot(1)
|
|
||||||
push!(p, 1.5)
|
|
||||||
push!(p, 1, 1.5)
|
|
||||||
# append!(p, [1., 2.])
|
|
||||||
append!(p, 1, 2.5, 2.5)
|
|
||||||
push!(p, (1.5, 2.5))
|
|
||||||
push!(p, 1, (1.5, 2.5))
|
|
||||||
append!(p, (1.5, 2.5))
|
|
||||||
append!(p, 1, (1.5, 2.5))
|
|
||||||
|
|
||||||
p = plot([1, 2, 3], [4, 5, 6])
|
|
||||||
@test Plots.xmin(p) == 1
|
|
||||||
@test Plots.xmax(p) == 3
|
|
||||||
@test Plots.ignorenan_extrema(p) == (1, 3)
|
|
||||||
|
|
||||||
@test Plots.get_attr_symbol(:x, "lims") == :xlims
|
|
||||||
@test Plots.get_attr_symbol(:x, :lims) == :xlims
|
|
||||||
|
|
||||||
@testset "NaN-separated Segments" begin
|
|
||||||
segments(args...) = collect(iter_segments(args...))
|
|
||||||
|
|
||||||
nan10 = fill(NaN, 10)
|
|
||||||
@test segments(11:20) == [1:10]
|
|
||||||
@test segments([NaN]) == []
|
|
||||||
@test segments(nan10) == []
|
|
||||||
@test segments([nan10; 1:5]) == [11:15]
|
|
||||||
@test segments([1:5; nan10]) == [1:5]
|
|
||||||
@test segments([nan10; 1:5; nan10; 1:5; nan10]) == [11:15, 26:30]
|
|
||||||
@test segments([NaN; 1], 1:10) == [2:2, 4:4, 6:6, 8:8, 10:10]
|
|
||||||
@test segments([nan10; 1:15], [1:15; nan10]) == [11:15]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "Axes" begin
|
|
||||||
p = plot()
|
|
||||||
axis = p.subplots[1][:xaxis]
|
|
||||||
@test typeof(axis) == Plots.Axis
|
|
||||||
@test Plots.discrete_value!(axis, "HI") == (0.5, 1)
|
|
||||||
@test Plots.discrete_value!(axis, :yo) == (1.5, 2)
|
|
||||||
@test Plots.ignorenan_extrema(axis) == (0.5, 1.5)
|
|
||||||
@test axis[:discrete_map] == Dict{Any,Any}(:yo => 2, "HI" => 1)
|
|
||||||
|
|
||||||
Plots.discrete_value!(axis, ["x$i" for i in 1:5])
|
|
||||||
Plots.discrete_value!(axis, ["x$i" for i in 0:2])
|
|
||||||
@test Plots.ignorenan_extrema(axis) == (0.5, 7.5)
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "NoFail" begin
|
|
||||||
# ensure backend with tested display
|
|
||||||
@test unicodeplots() == Plots.UnicodePlotsBackend()
|
|
||||||
@test backend() == Plots.UnicodePlotsBackend()
|
|
||||||
|
|
||||||
dsp = TextDisplay(IOContext(IOBuffer(), :color => true))
|
|
||||||
|
|
||||||
@testset "plot" begin
|
|
||||||
for plt in [
|
|
||||||
histogram([1, 0, 0, 0, 0, 0]),
|
|
||||||
plot([missing]),
|
|
||||||
plot([missing, missing]),
|
|
||||||
plot(fill(missing, 10)),
|
|
||||||
plot([missing; 1:4]),
|
|
||||||
plot([fill(missing, 10); 1:4]),
|
|
||||||
plot([1 1; 1 missing]),
|
|
||||||
plot(["a" "b"; missing "d"], [1 2; 3 4]),
|
|
||||||
]
|
|
||||||
display(dsp, plt)
|
|
||||||
end
|
|
||||||
@test_nowarn plot(x -> x^2, 0, 2)
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "bar" begin
|
|
||||||
p = bar([3, 2, 1], [1, 2, 3])
|
|
||||||
@test p isa Plots.Plot
|
|
||||||
@test display(dsp, p) isa Nothing
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "gui" begin
|
|
||||||
open(tempname(), "w") do io
|
|
||||||
redirect_stdout(io) do
|
|
||||||
gui(plot())
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "Coverage" begin
|
|
||||||
@testset "themes" begin
|
|
||||||
p = showtheme(:dark)
|
|
||||||
@test p isa Plots.Plot
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "plotattr" begin
|
|
||||||
tmp = tempname()
|
|
||||||
open(tmp, "w") do io
|
|
||||||
redirect_stdout(io) do
|
|
||||||
plotattr("seriestype")
|
|
||||||
plotattr(:Plot)
|
|
||||||
plotattr()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
str = join(readlines(tmp), "")
|
|
||||||
@test occursin("seriestype", str)
|
|
||||||
@test occursin("Plot attributes", str)
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "legend" begin
|
|
||||||
@test isa(
|
|
||||||
Plots.legend_pos_from_angle(20, 0.0, 0.5, 1.0, 0.0, 0.5, 1.0),
|
|
||||||
NTuple{2,<:AbstractFloat},
|
|
||||||
)
|
|
||||||
@test Plots.legend_anchor_index(-1) == 1
|
|
||||||
@test Plots.legend_anchor_index(+0) == 2
|
|
||||||
@test Plots.legend_anchor_index(+1) == 3
|
|
||||||
|
|
||||||
@test Plots.legend_angle(:foo_bar) == (45, :inner)
|
|
||||||
@test Plots.legend_angle(20.0) ==
|
|
||||||
Plots.legend_angle((20.0, :inner)) ==
|
|
||||||
(20.0, :inner)
|
|
||||||
@test Plots.legend_angle((20.0, 10.0)) == (20.0, 10.0)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "Output" begin
|
|
||||||
@test Plots.defaultOutputFormat(plot()) == "png"
|
|
||||||
@test Plots.addExtension("foo", "bar") == "foo.bar"
|
|
||||||
|
|
||||||
fn = tempname()
|
|
||||||
gr()
|
|
||||||
let p = plot()
|
|
||||||
Plots.png(p, fn)
|
|
||||||
Plots.png(fn)
|
|
||||||
savefig(p, "$fn.png")
|
|
||||||
savefig("$fn.png")
|
|
||||||
|
|
||||||
Plots.pdf(p, fn)
|
|
||||||
Plots.pdf(fn)
|
|
||||||
savefig(p, "$fn.pdf")
|
|
||||||
savefig("$fn.pdf")
|
|
||||||
|
|
||||||
Plots.ps(p, fn)
|
|
||||||
Plots.ps(fn)
|
|
||||||
savefig(p, "$fn.ps")
|
|
||||||
savefig("$fn.ps")
|
|
||||||
|
|
||||||
Plots.svg(p, fn)
|
|
||||||
Plots.svg(fn)
|
|
||||||
savefig(p, "$fn.svg")
|
|
||||||
savefig("$fn.svg")
|
|
||||||
end
|
|
||||||
|
|
||||||
if Sys.islinux()
|
|
||||||
pgfplotsx()
|
|
||||||
let p = plot()
|
|
||||||
Plots.tex(p, fn)
|
|
||||||
Plots.tex(fn)
|
|
||||||
savefig(p, "$fn.tex")
|
|
||||||
savefig("$fn.tex")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
unicodeplots()
|
|
||||||
let p = plot()
|
|
||||||
Plots.txt(p, fn)
|
|
||||||
Plots.txt(fn)
|
|
||||||
savefig(p, "$fn.txt")
|
|
||||||
savefig("$fn.txt")
|
|
||||||
end
|
|
||||||
|
|
||||||
plotlyjs()
|
|
||||||
let p = plot()
|
|
||||||
Plots.html(p, fn)
|
|
||||||
Plots.html(fn)
|
|
||||||
savefig(p, "$fn.html")
|
|
||||||
savefig("$fn.html")
|
|
||||||
|
|
||||||
if Sys.islinux()
|
|
||||||
Plots.eps(p, fn)
|
|
||||||
Plots.eps(fn)
|
|
||||||
savefig(p, "$fn.eps")
|
|
||||||
savefig("$fn.eps")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
@test_throws ErrorException savefig("$fn.foo")
|
|
||||||
end
|
|
||||||
|
|
||||||
gr() # reset to default backend
|
|
||||||
|
|
||||||
for fn in (
|
|
||||||
"test_args.jl",
|
|
||||||
"test_defaults.jl",
|
|
||||||
"test_pipeline.jl",
|
|
||||||
"test_axes.jl",
|
|
||||||
"test_layouts.jl",
|
|
||||||
"test_contours.jl",
|
|
||||||
"test_axis_letter.jl",
|
|
||||||
"test_components.jl",
|
|
||||||
"test_shorthands.jl",
|
|
||||||
"integration_dates.jl",
|
|
||||||
"test_recipes.jl",
|
|
||||||
"test_hdf5plots.jl",
|
|
||||||
"test_pgfplotsx.jl",
|
|
||||||
"test_plotly.jl",
|
|
||||||
"test_animations.jl",
|
|
||||||
)
|
|
||||||
@testset "$fn" begin
|
|
||||||
include(fn)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
reference_dir(args...) =
|
reference_dir(args...) =
|
||||||
joinpath(homedir(), ".julia", "dev", "PlotReferenceImages", args...)
|
joinpath(homedir(), ".julia", "dev", "PlotReferenceImages", args...)
|
||||||
@ -336,6 +55,7 @@ function reference_file(backend, i, version)
|
|||||||
refdir = reference_dir("Plots", string(backend))
|
refdir = reference_dir("Plots", string(backend))
|
||||||
fn = "ref$i.png"
|
fn = "ref$i.png"
|
||||||
versions = sort(VersionNumber.(readdir(refdir)), rev = true)
|
versions = sort(VersionNumber.(readdir(refdir)), rev = true)
|
||||||
|
|
||||||
reffn = joinpath(refdir, string(version), fn)
|
reffn = joinpath(refdir, string(version), fn)
|
||||||
for v in versions
|
for v in versions
|
||||||
tmpfn = joinpath(refdir, string(v), fn)
|
tmpfn = joinpath(refdir, string(v), fn)
|
||||||
@ -344,6 +64,7 @@ function reference_file(backend, i, version)
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return reffn
|
return reffn
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -358,15 +79,11 @@ if !isdir(reference_dir())
|
|||||||
end
|
end
|
||||||
|
|
||||||
include("imgcomp.jl")
|
include("imgcomp.jl")
|
||||||
|
# don't actually show the plots
|
||||||
Random.seed!(PLOTS_SEED)
|
Random.seed!(PLOTS_SEED)
|
||||||
|
default(show = false, reuse = true)
|
||||||
default(show = false, reuse = true) # don't actually show the plots
|
|
||||||
|
|
||||||
is_ci() = get(ENV, "CI", "false") == "true"
|
is_ci() = get(ENV, "CI", "false") == "true"
|
||||||
const PLOTS_IMG_TOL = parse(
|
const PLOTS_IMG_TOL = parse(Float64, get(ENV, "PLOTS_IMG_TOL", is_ci() ? "1e-4" : "1e-5"))
|
||||||
Float64,
|
|
||||||
get(ENV, "PLOTS_IMG_TOL", is_ci() ? Sys.iswindows() ? "2e-4" : "1e-4" : "1e-5"),
|
|
||||||
)
|
|
||||||
|
|
||||||
## Uncomment the following lines to update reference images for different backends
|
## Uncomment the following lines to update reference images for different backends
|
||||||
|
|
||||||
@ -389,72 +106,11 @@ const PLOTS_IMG_TOL = parse(
|
|||||||
# image_comparison_facts(:pgfplotsx, tol=PLOTS_IMG_TOL, skip = Plots._backend_skips[:pgfplotsx])
|
# image_comparison_facts(:pgfplotsx, tol=PLOTS_IMG_TOL, skip = Plots._backend_skips[:pgfplotsx])
|
||||||
# end
|
# end
|
||||||
|
|
||||||
|
# 10 Histogram2D
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
@testset "Examples" begin
|
|
||||||
if Sys.islinux()
|
|
||||||
backends = (
|
|
||||||
:unicodeplots,
|
|
||||||
:pgfplotsx,
|
|
||||||
:inspectdr,
|
|
||||||
:plotlyjs,
|
|
||||||
:gaston,
|
|
||||||
# :pyplot, # FIXME: fails with system matplotlib
|
|
||||||
)
|
|
||||||
only = setdiff(
|
|
||||||
1:length(Plots._examples),
|
|
||||||
(Plots._backend_skips[be] for be in backends)...,
|
|
||||||
)
|
|
||||||
for be in backends
|
|
||||||
@info be
|
|
||||||
for (i, p) in Plots.test_examples(be, only = only, disp = false)
|
|
||||||
fn = tempname() * ".png"
|
|
||||||
png(p, fn)
|
|
||||||
@test filesize(fn) > 1_000
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "Backends" begin
|
@testset "Backends" begin
|
||||||
@testset "UnicodePlots" begin
|
|
||||||
@test unicodeplots() == Plots.UnicodePlotsBackend()
|
|
||||||
@test backend() == Plots.UnicodePlotsBackend()
|
|
||||||
|
|
||||||
io = IOContext(IOBuffer(), :color => true)
|
|
||||||
|
|
||||||
# lets just make sure it runs without error
|
|
||||||
p = plot(rand(10))
|
|
||||||
@test p isa Plots.Plot
|
|
||||||
@test show(io, p) isa Nothing
|
|
||||||
|
|
||||||
p = bar(randn(10))
|
|
||||||
@test p isa Plots.Plot
|
|
||||||
@test show(io, p) isa Nothing
|
|
||||||
|
|
||||||
p = plot([1, 2], [3, 4])
|
|
||||||
annotate!(p, [(1.5, 3.2, Plots.text("Test", :red, :center))])
|
|
||||||
hline!(p, [3.1])
|
|
||||||
@test p isa Plots.Plot
|
|
||||||
@test show(io, p) isa Nothing
|
|
||||||
|
|
||||||
p = plot([Dates.Date(2019, 1, 1), Dates.Date(2019, 2, 1)], [3, 4])
|
|
||||||
hline!(p, [3.1])
|
|
||||||
annotate!(p, [(Dates.Date(2019, 1, 15), 3.2, Plots.text("Test", :red, :center))])
|
|
||||||
@test p isa Plots.Plot
|
|
||||||
@test show(io, p) isa Nothing
|
|
||||||
|
|
||||||
p = plot([Dates.Date(2019, 1, 1), Dates.Date(2019, 2, 1)], [3, 4])
|
|
||||||
annotate!(p, [(Dates.Date(2019, 1, 15), 3.2, :auto)])
|
|
||||||
hline!(p, [3.1])
|
|
||||||
@test p isa Plots.Plot
|
|
||||||
@test show(io, p) isa Nothing
|
|
||||||
|
|
||||||
p = plot((plot(i) for i in 1:4)..., layout = (2, 2))
|
|
||||||
@test p isa Plots.Plot
|
|
||||||
@test show(io, p) isa Nothing
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "GR" begin
|
@testset "GR" begin
|
||||||
ENV["PLOTS_TEST"] = "true"
|
ENV["PLOTS_TEST"] = "true"
|
||||||
ENV["GKSwstype"] = "100"
|
ENV["GKSwstype"] = "100"
|
||||||
@ -472,12 +128,130 @@ end
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@testset "UnicodePlots" begin
|
||||||
|
@test unicodeplots() == Plots.UnicodePlotsBackend()
|
||||||
|
@test backend() == Plots.UnicodePlotsBackend()
|
||||||
|
|
||||||
|
# lets just make sure it runs without error
|
||||||
|
p = plot(rand(10))
|
||||||
|
@test isa(p, Plots.Plot) == true
|
||||||
|
@test isa(display(p), Nothing) == true
|
||||||
|
p = bar(randn(10))
|
||||||
|
@test isa(p, Plots.Plot) == true
|
||||||
|
@test isa(display(p), Nothing) == true
|
||||||
|
p = plot([1, 2], [3, 4])
|
||||||
|
annotate!(p, [(1.5, 3.2, Plots.text("Test", :red, :center))])
|
||||||
|
hline!(p, [3.1])
|
||||||
|
@test isa(p, Plots.Plot) == true
|
||||||
|
@test isa(display(p), Nothing) == true
|
||||||
|
p = plot([Dates.Date(2019, 1, 1), Dates.Date(2019, 2, 1)], [3, 4])
|
||||||
|
hline!(p, [3.1])
|
||||||
|
annotate!(p, [(Dates.Date(2019, 1, 15), 3.2, Plots.text("Test", :red, :center))])
|
||||||
|
@test isa(p, Plots.Plot) == true
|
||||||
|
@test isa(display(p), Nothing) == true
|
||||||
|
p = plot([Dates.Date(2019, 1, 1), Dates.Date(2019, 2, 1)], [3, 4])
|
||||||
|
annotate!(p, [(Dates.Date(2019, 1, 15), 3.2, :auto)])
|
||||||
|
hline!(p, [3.1])
|
||||||
|
@test isa(p, Plots.Plot) == true
|
||||||
|
@test isa(display(p), Nothing) == true
|
||||||
|
end
|
||||||
|
|
||||||
@testset "PlotlyJS" begin
|
@testset "PlotlyJS" begin
|
||||||
@test plotlyjs() == Plots.PlotlyJSBackend()
|
@test plotlyjs() == Plots.PlotlyJSBackend()
|
||||||
@test backend() == Plots.PlotlyJSBackend()
|
@test backend() == Plots.PlotlyJSBackend()
|
||||||
|
|
||||||
p = plot(rand(10))
|
p = plot(rand(10))
|
||||||
@test p isa Plots.Plot
|
@test isa(p, Plots.Plot) == true
|
||||||
@test_broken display(p) isa Nothing
|
@test_broken isa(display(p), Nothing) == true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@testset "Axes" begin
|
||||||
|
p = plot()
|
||||||
|
axis = p.subplots[1][:xaxis]
|
||||||
|
@test typeof(axis) == Plots.Axis
|
||||||
|
@test Plots.discrete_value!(axis, "HI") == (0.5, 1)
|
||||||
|
@test Plots.discrete_value!(axis, :yo) == (1.5, 2)
|
||||||
|
@test Plots.ignorenan_extrema(axis) == (0.5, 1.5)
|
||||||
|
@test axis[:discrete_map] == Dict{Any,Any}(:yo => 2, "HI" => 1)
|
||||||
|
|
||||||
|
Plots.discrete_value!(axis, ["x$i" for i in 1:5])
|
||||||
|
Plots.discrete_value!(axis, ["x$i" for i in 0:2])
|
||||||
|
@test Plots.ignorenan_extrema(axis) == (0.5, 7.5)
|
||||||
|
end
|
||||||
|
|
||||||
|
@testset "NoFail" begin
|
||||||
|
#ensure backend with tested display
|
||||||
|
@test unicodeplots() == Plots.UnicodePlotsBackend()
|
||||||
|
@test backend() == Plots.UnicodePlotsBackend()
|
||||||
|
|
||||||
|
@testset "Plot" begin
|
||||||
|
plots = [
|
||||||
|
histogram([1, 0, 0, 0, 0, 0]),
|
||||||
|
plot([missing]),
|
||||||
|
plot([missing, missing]),
|
||||||
|
plot(fill(missing, 10)),
|
||||||
|
plot([missing; 1:4]),
|
||||||
|
plot([fill(missing, 10); 1:4]),
|
||||||
|
plot([1 1; 1 missing]),
|
||||||
|
plot(["a" "b"; missing "d"], [1 2; 3 4]),
|
||||||
|
]
|
||||||
|
for plt in plots
|
||||||
|
display(plt)
|
||||||
|
end
|
||||||
|
@test_nowarn plot(x -> x^2, 0, 2)
|
||||||
|
end
|
||||||
|
|
||||||
|
@testset "Bar" begin
|
||||||
|
p = bar([3, 2, 1], [1, 2, 3])
|
||||||
|
@test isa(p, Plots.Plot)
|
||||||
|
@test isa(display(p), Nothing) == true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@testset "EmptyAnim" begin
|
||||||
|
anim = @animate for i in []
|
||||||
|
end
|
||||||
|
|
||||||
|
@test_throws ArgumentError gif(anim)
|
||||||
|
end
|
||||||
|
|
||||||
|
@testset "NaN-separated Segments" begin
|
||||||
|
segments(args...) = collect(iter_segments(args...))
|
||||||
|
|
||||||
|
nan10 = fill(NaN, 10)
|
||||||
|
@test segments(11:20) == [1:10]
|
||||||
|
@test segments([NaN]) == []
|
||||||
|
@test segments(nan10) == []
|
||||||
|
@test segments([nan10; 1:5]) == [11:15]
|
||||||
|
@test segments([1:5; nan10]) == [1:5]
|
||||||
|
@test segments([nan10; 1:5; nan10; 1:5; nan10]) == [11:15, 26:30]
|
||||||
|
@test segments([NaN; 1], 1:10) == [2:2, 4:4, 6:6, 8:8, 10:10]
|
||||||
|
@test segments([nan10; 1:15], [1:15; nan10]) == [11:15]
|
||||||
|
end
|
||||||
|
|
||||||
|
@testset "Utils" begin
|
||||||
|
zipped = (
|
||||||
|
[(1, 2)],
|
||||||
|
[("a", "b")],
|
||||||
|
[(1, "a"), (2, "b")],
|
||||||
|
[(1, 2), (3, 4)],
|
||||||
|
[(1, 2, 3), (3, 4, 5)],
|
||||||
|
[(1, 2, 3, 4), (3, 4, 5, 6)],
|
||||||
|
[(1, 2.0), (missing, missing)],
|
||||||
|
[(1, missing), (missing, "a")],
|
||||||
|
[(missing, missing)],
|
||||||
|
[(missing, missing, missing), ("a", "b", "c")],
|
||||||
|
)
|
||||||
|
for z in zipped
|
||||||
|
@test isequal(collect(zip(Plots.unzip(z)...)), z)
|
||||||
|
@test isequal(collect(zip(Plots.unzip(GeometryBasics.Point.(z))...)), z)
|
||||||
|
end
|
||||||
|
op1 = Plots.process_clims((1.0, 2.0))
|
||||||
|
op2 = Plots.process_clims((1, 2.0))
|
||||||
|
data = randn(100, 100)
|
||||||
|
@test op1(data) == op2(data)
|
||||||
|
@test Plots.process_clims(nothing) ==
|
||||||
|
Plots.process_clims(missing) ==
|
||||||
|
Plots.process_clims(:auto)
|
||||||
|
end
|
||||||
|
|||||||
@ -1,61 +0,0 @@
|
|||||||
|
|
||||||
@testset "Empty anim" begin
|
|
||||||
anim = @animate for i in []
|
|
||||||
end
|
|
||||||
@test_throws ArgumentError gif(anim)
|
|
||||||
end
|
|
||||||
|
|
||||||
@userplot CirclePlot
|
|
||||||
@recipe function f(cp::CirclePlot)
|
|
||||||
x, y, i = cp.args
|
|
||||||
n = length(x)
|
|
||||||
inds = circshift(1:n, 1 - i)
|
|
||||||
linewidth --> range(0, 10, length = n)
|
|
||||||
seriesalpha --> range(0, 1, length = n)
|
|
||||||
aspect_ratio --> 1
|
|
||||||
label --> false
|
|
||||||
x[inds], y[inds]
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "Circle plot" begin
|
|
||||||
n = 10
|
|
||||||
t = range(0, 2π, length = n)
|
|
||||||
x = sin.(t)
|
|
||||||
y = cos.(t)
|
|
||||||
|
|
||||||
anim = @animate for i in 1:n
|
|
||||||
circleplot(x, y, i)
|
|
||||||
end
|
|
||||||
@test filesize(gif(anim).filename) > 10_000
|
|
||||||
@test filesize(mov(anim).filename) > 10_000
|
|
||||||
@test filesize(mp4(anim).filename) > 10_000
|
|
||||||
@test filesize(webm(anim).filename) > 10_000
|
|
||||||
|
|
||||||
@gif for i in 1:n
|
|
||||||
circleplot(x, y, i, line_z = 1:n, cbar = false, framestyle = :zerolines)
|
|
||||||
end every 5
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "html" begin
|
|
||||||
p = plot([sin, cos], zeros(0), leg = false, xlims = (0, 2π), ylims = (-1, 1))
|
|
||||||
anim = Animation()
|
|
||||||
for x in range(0, stop = 2π, length = 10)
|
|
||||||
push!(p, x, Float64[sin(x), cos(x)])
|
|
||||||
frame(anim)
|
|
||||||
end
|
|
||||||
|
|
||||||
agif = gif(anim)
|
|
||||||
html = tempname() * ".html"
|
|
||||||
open(html, "w") do io
|
|
||||||
show(io, MIME("text/html"), agif)
|
|
||||||
end
|
|
||||||
@test filesize(html) > 10_000
|
|
||||||
@test showable(MIME("image/gif"), agif)
|
|
||||||
|
|
||||||
agif = mp4(anim)
|
|
||||||
html = tempname() * ".html"
|
|
||||||
open(html, "w") do io
|
|
||||||
show(io, MIME("text/html"), agif)
|
|
||||||
end
|
|
||||||
@test filesize(html) > 10_000
|
|
||||||
end
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
using Plots, Test
|
|
||||||
|
|
||||||
@testset "Series Attributes" begin
|
|
||||||
pl = plot([[1, 2, 3], [2, 3, 4]], lw = 5)
|
|
||||||
@test hline!(deepcopy(pl), [1.75])[1].series_list[3][:label] ==
|
|
||||||
hline!(deepcopy(pl), [1.75], z_order = :front)[1].series_list[3][:label] ==
|
|
||||||
"y3"
|
|
||||||
@test hline!(deepcopy(pl), [1.75], z_order = :back)[1].series_list[1][:label] == "y3"
|
|
||||||
@test hline!(deepcopy(pl), [1.75], z_order = 2)[1].series_list[2][:label] == "y3"
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "Axis Attributes" begin
|
|
||||||
pl = @test_nowarn plot(; tickfont = font(10, "Times"))
|
|
||||||
for axis in (:xaxis, :yaxis, :zaxis)
|
|
||||||
@test pl[1][axis][:tickfontsize] == 10
|
|
||||||
@test pl[1][axis][:tickfontfamily] == "Times"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "Permute recipes" begin
|
|
||||||
pl = bar(["a", "b", "c"], [1, 2, 3])
|
|
||||||
ppl = bar(["a", "b", "c"], [1, 2, 3], permute = (:x, :y))
|
|
||||||
@test xticks(ppl) == yticks(pl)
|
|
||||||
@test yticks(ppl) == xticks(pl)
|
|
||||||
@test filter(isfinite, pl[1][1][:x]) == filter(isfinite, ppl[1][1][:y])
|
|
||||||
@test filter(isfinite, pl[1][1][:y]) == filter(isfinite, ppl[1][1][:x])
|
|
||||||
end
|
|
||||||
@ -64,10 +64,7 @@ end
|
|||||||
@test twpl[:bottom_margin] == 2Plots.cm
|
@test twpl[:bottom_margin] == 2Plots.cm
|
||||||
end
|
end
|
||||||
|
|
||||||
@testset "axis-aliases" begin
|
@testset "aliases" begin
|
||||||
@test haskey(Plots._keyAliases, :xguideposition)
|
|
||||||
@test haskey(Plots._keyAliases, :x_guide_position)
|
|
||||||
@test !haskey(Plots._keyAliases, :xguide_position)
|
|
||||||
p = plot(1:2, xl = "x label")
|
p = plot(1:2, xl = "x label")
|
||||||
@test p[1][:xaxis][:guide] === "x label"
|
@test p[1][:xaxis][:guide] === "x label"
|
||||||
p = plot(1:2, xrange = (0, 3))
|
p = plot(1:2, xrange = (0, 3))
|
||||||
@ -76,47 +73,18 @@ end
|
|||||||
@test p[1][:xaxis][:ticks] == [1.25, 1.5, 1.75]
|
@test p[1][:xaxis][:ticks] == [1.25, 1.5, 1.75]
|
||||||
p = plot(1:2, xlabelfontsize = 4)
|
p = plot(1:2, xlabelfontsize = 4)
|
||||||
@test p[1][:xaxis][:guidefontsize] == 4
|
@test p[1][:xaxis][:guidefontsize] == 4
|
||||||
p = plot(1:2, xgα = 0.07)
|
p = plot(1:2, xgα = .07)
|
||||||
@test p[1][:xaxis][:gridalpha] ≈ 0.07
|
@test p[1][:xaxis][:gridalpha] ≈ .07
|
||||||
p = plot(1:2, xgridls = :dashdot)
|
p = plot(1:2, xgridls = :dashdot)
|
||||||
@test p[1][:xaxis][:gridstyle] === :dashdot
|
@test p[1][:xaxis][:gridstyle] === :dashdot
|
||||||
p = plot(1:2, xgridcolor = :red)
|
p = plot(1:2, xgridcolor = :red)
|
||||||
@test p[1][:xaxis][:foreground_color_grid] === RGBA{Float64}(1.0, 0.0, 0.0, 1.0)
|
@test p[1][:xaxis][:foreground_color_grid] === RGBA{Float64}(1.,0.,0.,1.)
|
||||||
p = plot(1:2, xminorgridcolor = :red)
|
p = plot(1:2, xminorgridcolor = :red)
|
||||||
@test p[1][:xaxis][:foreground_color_minor_grid] === RGBA{Float64}(1.0, 0.0, 0.0, 1.0)
|
@test p[1][:xaxis][:foreground_color_minor_grid] === RGBA{Float64}(1.,0.,0.,1.)
|
||||||
p = plot(1:2, xgrid_lw = 0.01)
|
p = plot(1:2, xgrid_lw = .01)
|
||||||
@test p[1][:xaxis][:gridlinewidth] ≈ 0.01
|
@test p[1][:xaxis][:gridlinewidth] ≈ .01
|
||||||
p = plot(1:2, xminorgrid_lw = 0.01)
|
p = plot(1:2, xminorgrid_lw = .01)
|
||||||
@test p[1][:xaxis][:minorgridlinewidth] ≈ 0.01
|
@test p[1][:xaxis][:minorgridlinewidth] ≈ .01
|
||||||
p = plot(1:2, xtickor = :out)
|
p = plot(1:2, xtickor = :out)
|
||||||
@test p[1][:xaxis][:tick_direction] === :out
|
@test p[1][:xaxis][:tick_direction] === :out
|
||||||
end
|
end
|
||||||
|
|
||||||
@testset "aliases" begin
|
|
||||||
compare(p::Plots.Plot, s::Symbol, val, op) =
|
|
||||||
op(p[1][:xaxis][s], val) && op(p[1][:yaxis][s], val) && op(p[1][:zaxis][s], val)
|
|
||||||
p = plot(1:2, guide = "all labels")
|
|
||||||
@test compare(p, :guide, "all labels", ===)
|
|
||||||
p = plot(1:2, label = "test")
|
|
||||||
@test compare(p, :guide, "", ===)
|
|
||||||
p = plot(1:2, lim = (0, 3))
|
|
||||||
@test xlims(p) === ylims(p) === zlims(p) === (0, 3)
|
|
||||||
p = plot(1:2, tick = [1.25, 1.5, 1.75])
|
|
||||||
@test compare(p, :ticks, [1.25, 1.5, 1.75], ==)
|
|
||||||
p = plot(1:2, labelfontsize = 4)
|
|
||||||
@test compare(p, :guidefontsize, 4, ==)
|
|
||||||
p = plot(1:2, gα = 0.07)
|
|
||||||
@test compare(p, :gridalpha, 0.07, ≈)
|
|
||||||
p = plot(1:2, gridls = :dashdot)
|
|
||||||
@test compare(p, :gridstyle, :dashdot, ===)
|
|
||||||
p = plot(1:2, gridcolor = :red)
|
|
||||||
@test compare(p, :foreground_color_grid, RGBA{Float64}(1.0, 0.0, 0.0, 1.0), ===)
|
|
||||||
p = plot(1:2, minorgridcolor = :red)
|
|
||||||
@test compare(p, :foreground_color_minor_grid, RGBA{Float64}(1.0, 0.0, 0.0, 1.0), ===)
|
|
||||||
p = plot(1:2, grid_lw = 0.01)
|
|
||||||
@test compare(p, :gridlinewidth, 0.01, ≈)
|
|
||||||
p = plot(1:2, minorgrid_lw = 0.01)
|
|
||||||
@test compare(p, :minorgridlinewidth, 0.01, ≈)
|
|
||||||
p = plot(1:2, tickor = :out)
|
|
||||||
@test compare(p, :tick_direction, :out, ===)
|
|
||||||
end
|
|
||||||
|
|||||||
@ -3,9 +3,6 @@ using Plots, Test
|
|||||||
@testset "Shapes" begin
|
@testset "Shapes" begin
|
||||||
@testset "Type" begin
|
@testset "Type" begin
|
||||||
square = Shape([(0, 0.0), (1, 0.0), (1, 1.0), (0, 1.0)])
|
square = Shape([(0, 0.0), (1, 0.0), (1, 1.0), (0, 1.0)])
|
||||||
@test Plots.get_xs(square) == [0, 1, 1, 0]
|
|
||||||
@test Plots.get_ys(square) == [0, 0, 1, 1]
|
|
||||||
@test Plots.vertices(square) == [(0, 0), (1, 0), (1, 1), (0, 1)]
|
|
||||||
@test isa(square, Shape{Int64,Float64})
|
@test isa(square, Shape{Int64,Float64})
|
||||||
@test coords(square) isa Tuple{Vector{S},Vector{T}} where {T,S}
|
@test coords(square) isa Tuple{Vector{S},Vector{T}} where {T,S}
|
||||||
end
|
end
|
||||||
@ -61,25 +58,6 @@ using Plots, Test
|
|||||||
@test_nowarn p = plot(myshapes)
|
@test_nowarn p = plot(myshapes)
|
||||||
@test p[1][1][:seriestype] == :shape
|
@test p[1][1][:seriestype] == :shape
|
||||||
end
|
end
|
||||||
|
|
||||||
@testset "Misc" begin
|
|
||||||
@test Plots.weave([1, 3], [2, 4]) == collect(1:4)
|
|
||||||
@test Plots.makeshape(3) isa Plots.Shape
|
|
||||||
@test Plots.makestar(3) isa Plots.Shape
|
|
||||||
@test Plots.makecross() isa Plots.Shape
|
|
||||||
@test Plots.makearrowhead(10.0) isa Plots.Shape
|
|
||||||
|
|
||||||
@test Plots.rotate(1.0, 2.0, 5.0, (0, 0)) isa Tuple
|
|
||||||
|
|
||||||
star = Plots.makestar(3)
|
|
||||||
star_scaled = Plots.scale(star, 0.5)
|
|
||||||
|
|
||||||
Plots.scale!(star, 0.5)
|
|
||||||
@test Plots.get_xs(star) == Plots.get_xs(star_scaled)
|
|
||||||
@test Plots.get_ys(star) == Plots.get_ys(star_scaled)
|
|
||||||
|
|
||||||
@test Plots.extrema_plus_buffer([1, 2], 0.1) == (0.9, 2.1)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@testset "Brush" begin
|
@testset "Brush" begin
|
||||||
@ -104,39 +82,6 @@ end
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@testset "Text" begin
|
|
||||||
t = Plots.PlotText("foo")
|
|
||||||
f = Plots.font()
|
|
||||||
|
|
||||||
@test Plots.PlotText(nothing).str == "nothing"
|
|
||||||
@test length(t) == 3
|
|
||||||
@test text(t).str == "foo"
|
|
||||||
@test text(t, f).str == "foo"
|
|
||||||
@test text("bar", f).str == "bar"
|
|
||||||
@test text(true).str == "true"
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "Annotations" begin
|
|
||||||
ann = Plots.series_annotations(missing)
|
|
||||||
|
|
||||||
@test Plots.series_annotations(["1" "2"; "3" "4"]) isa AbstractMatrix
|
|
||||||
@test Plots.series_annotations(10).strs[1].str == "10"
|
|
||||||
@test Plots.series_annotations(nothing) === nothing
|
|
||||||
@test Plots.series_annotations(ann) == ann
|
|
||||||
|
|
||||||
@test Plots.annotations(["1" "2"; "3" "4"]) isa AbstractMatrix
|
|
||||||
@test Plots.annotations(ann) == ann
|
|
||||||
@test Plots.annotations([ann]) == [ann]
|
|
||||||
@test Plots.annotations(nothing) == []
|
|
||||||
|
|
||||||
t = Plots.text("foo")
|
|
||||||
sp = plot(1)[1]
|
|
||||||
@test Plots.locate_annotation(sp, 1, 2, t) == (1, 2, t)
|
|
||||||
@test Plots.locate_annotation(sp, 1, 2, 3, t) == (1, 2, 3, t)
|
|
||||||
@test Plots.locate_annotation(sp, (0.1, 0.2), t) isa Tuple
|
|
||||||
@test Plots.locate_annotation(sp, (0.1, 0.2, 0.3), t) isa Tuple
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "Fonts" begin
|
@testset "Fonts" begin
|
||||||
@testset "Scaling" begin
|
@testset "Scaling" begin
|
||||||
sizesToCheck = [
|
sizesToCheck = [
|
||||||
@ -213,9 +158,3 @@ end
|
|||||||
@test pos == (0.1, 0.5)
|
@test pos == (0.1, 0.5)
|
||||||
@test txt.str == "(a)"
|
@test txt.str == "(a)"
|
||||||
end
|
end
|
||||||
|
|
||||||
@testset "Bezier" begin
|
|
||||||
curve = Plots.BezierCurve([Plots.P2(0.0, 0.0), Plots.P2(0.5, 1.0), Plots.P2(1.0, 0.0)])
|
|
||||||
@test curve(0.75) == Plots.P2(0.75, 0.375)
|
|
||||||
@test length(coords(curve, 10)) == 10
|
|
||||||
end
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Plots, Test, Plots.Colors
|
using Plots, Test
|
||||||
|
|
||||||
const PLOTS_DEFAULTS = Dict(:theme => :wong2, :fontfamily => :palantino)
|
const PLOTS_DEFAULTS = Dict(:theme => :wong2, :fontfamily => :palantino)
|
||||||
Plots.__init__()
|
Plots.__init__()
|
||||||
@ -6,96 +6,8 @@ Plots.__init__()
|
|||||||
@testset "Loading theme" begin
|
@testset "Loading theme" begin
|
||||||
pl = plot(1:5)
|
pl = plot(1:5)
|
||||||
@test pl[1][1][:seriescolor] == RGBA(colorant"black")
|
@test pl[1][1][:seriescolor] == RGBA(colorant"black")
|
||||||
@test Plots.guidefont(pl[1][:xaxis]).family == "palantino"
|
@test guidefont(pl[1][:xaxis]).family == "palantino"
|
||||||
end
|
end
|
||||||
|
|
||||||
empty!(PLOTS_DEFAULTS)
|
empty!(PLOTS_DEFAULTS)
|
||||||
Plots.__init__()
|
Plots.__init__()
|
||||||
|
|
||||||
@testset "default" begin
|
|
||||||
default(fillrange = 0)
|
|
||||||
@test Plots._series_defaults[:fillrange] == 0
|
|
||||||
pl = plot(1:5)
|
|
||||||
@test pl[1][1][:fillrange] == 0
|
|
||||||
default()
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "Legend defaults" begin
|
|
||||||
p = plot()
|
|
||||||
@test p[1][:legend_font_family] == "sans-serif"
|
|
||||||
@test p[1][:legend_font_pointsize] == 8
|
|
||||||
@test p[1][:legend_font_halign] == :hcenter
|
|
||||||
@test p[1][:legend_font_valign] == :vcenter
|
|
||||||
@test p[1][:legend_font_rotation] == 0.0
|
|
||||||
@test p[1][:legend_font_color] == RGB{Colors.N0f8}(0.0, 0.0, 0.0)
|
|
||||||
@test p[1][:legend_position] == :best
|
|
||||||
@test p[1][:legend_title] == nothing
|
|
||||||
@test p[1][:legend_title_font_family] == "sans-serif"
|
|
||||||
@test p[1][:legend_title_font_pointsize] == 11
|
|
||||||
@test p[1][:legend_title_font_halign] == :hcenter
|
|
||||||
@test p[1][:legend_title_font_valign] == :vcenter
|
|
||||||
@test p[1][:legend_title_font_rotation] == 0.0
|
|
||||||
@test p[1][:legend_title_font_color] == RGB{Colors.N0f8}(0.0, 0.0, 0.0)
|
|
||||||
@test p[1][:legend_background_color] == RGBA{Float64}(1.0, 1.0, 1.0, 1.0)
|
|
||||||
@test p[1][:legend_foreground_color] == RGB{Colors.N0f8}(0.0, 0.0, 0.0)
|
|
||||||
end # testset
|
|
||||||
|
|
||||||
@testset "Legend API" begin
|
|
||||||
p = plot(;
|
|
||||||
legendfontfamily = "serif",
|
|
||||||
legendfontsize = 12,
|
|
||||||
legendfonthalign = :left,
|
|
||||||
legendfontvalign = :top,
|
|
||||||
legendfontrotation = 1,
|
|
||||||
legendfontcolor = :red,
|
|
||||||
legend = :outertopleft,
|
|
||||||
legendtitle = "The legend",
|
|
||||||
legendtitlefontfamily = "helvetica",
|
|
||||||
legendtitlefontsize = 3,
|
|
||||||
legendtitlefonthalign = :right,
|
|
||||||
legendtitlefontvalign = :bottom,
|
|
||||||
legendtitlefontrotation = -5.2,
|
|
||||||
legendtitlefontcolor = :blue,
|
|
||||||
background_color_legend = :cyan,
|
|
||||||
foreground_color_legend = :green,
|
|
||||||
)
|
|
||||||
@test p[1][:legend_font_family] == "serif"
|
|
||||||
@test p[1][:legend_font_pointsize] == 12
|
|
||||||
@test p[1][:legend_font_halign] == :left
|
|
||||||
@test p[1][:legend_font_valign] == :top
|
|
||||||
@test p[1][:legend_font_rotation] == 1.0
|
|
||||||
@test p[1][:legend_font_color] == :red
|
|
||||||
@test p[1][:legend_position] == :outertopleft
|
|
||||||
@test p[1][:legend_title] == "The legend"
|
|
||||||
@test p[1][:legend_title_font_family] == "helvetica"
|
|
||||||
@test p[1][:legend_title_font_pointsize] == 3
|
|
||||||
@test p[1][:legend_title_font_halign] == :right
|
|
||||||
@test p[1][:legend_title_font_valign] == :bottom
|
|
||||||
@test p[1][:legend_title_font_rotation] == -5.2
|
|
||||||
@test p[1][:legend_title_font_color] == :blue
|
|
||||||
@test p[1][:legend_background_color] == RGBA{Float64}(0.0, 1.0, 1.0, 1.0)
|
|
||||||
@test p[1][:legend_foreground_color] == RGBA{Float64}(0.0, 0.5019607843137255, 0.0, 1.0)
|
|
||||||
|
|
||||||
#remember settings
|
|
||||||
plot(legend_font_pointsize = 20)
|
|
||||||
sp = plot!(label = "R")[1]
|
|
||||||
@test Plots.legendfont(sp).pointsize == 20
|
|
||||||
|
|
||||||
#setting whole font
|
|
||||||
sp = plot(
|
|
||||||
1:5,
|
|
||||||
legendfont = font(12),
|
|
||||||
legend_font_halign = :left,
|
|
||||||
foreground_color_subplot = :red,
|
|
||||||
)[1]
|
|
||||||
@test Plots.legendfont(sp).pointsize == 12
|
|
||||||
@test Plots.legendfont(sp).halign == :left
|
|
||||||
# match mechanism
|
|
||||||
@test sp[:legend_font_color] == sp[:foreground_color_subplot]
|
|
||||||
@test Plots.legendfont(sp).color == sp[:foreground_color_subplot]
|
|
||||||
|
|
||||||
# magic invocation
|
|
||||||
@test_nowarn sp = plot(; legendfont = 12)[1]
|
|
||||||
@test sp[:legend_font_pointsize] == 12
|
|
||||||
@test Plots.legendfont(sp).pointsize == 12
|
|
||||||
end # testset
|
|
||||||
|
|||||||
@ -1,98 +0,0 @@
|
|||||||
using Plots, Test
|
|
||||||
|
|
||||||
@testset "Subplot sclicing" begin
|
|
||||||
pl = @test_nowarn plot(
|
|
||||||
rand(4, 8),
|
|
||||||
layout = 4,
|
|
||||||
yscale = [:identity :identity :log10 :log10],
|
|
||||||
)
|
|
||||||
@test pl[1][:yaxis][:scale] == :identity
|
|
||||||
@test pl[2][:yaxis][:scale] == :identity
|
|
||||||
@test pl[3][:yaxis][:scale] == :log10
|
|
||||||
@test pl[4][:yaxis][:scale] == :log10
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "Plot title" begin
|
|
||||||
pl = plot(rand(4, 8), layout = 4, plot_title = "My title")
|
|
||||||
@test pl[:plot_title] == "My title"
|
|
||||||
@test pl[:plot_titleindex] == 5
|
|
||||||
|
|
||||||
plot!(pl)
|
|
||||||
@test pl[:plot_title] == "My title"
|
|
||||||
@test pl[:plot_titleindex] == 5
|
|
||||||
|
|
||||||
plot!(pl, plot_title = "My new title")
|
|
||||||
@test pl[:plot_title] == "My new title"
|
|
||||||
@test pl[:plot_titleindex] == 5
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "Plots.jl/issues/4083" begin
|
|
||||||
p = plot(plot(1:2), plot(1:2); border = :grid, plot_title = "abc")
|
|
||||||
@test p[1][:framestyle] === :grid
|
|
||||||
@test p[2][:framestyle] === :grid
|
|
||||||
@test p[3][:framestyle] === :none
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "Coverage" begin
|
|
||||||
p = plot((plot(i) for i in 1:4)..., layout = (2, 2))
|
|
||||||
|
|
||||||
sp = p[end]
|
|
||||||
@test sp isa Plots.Subplot
|
|
||||||
@test size(sp) == (1, 1)
|
|
||||||
@test length(sp) == 1
|
|
||||||
@test sp[1, 1] == sp
|
|
||||||
@test Plots.get_subplot(p, UInt32(4)) == sp
|
|
||||||
@test Plots.series_list(sp) |> first |> Plots.get_subplot isa Plots.Subplot
|
|
||||||
@test Plots.get_subplot(p, keys(p.spmap) |> first) isa Plots.Subplot
|
|
||||||
|
|
||||||
gl = p[2, 2]
|
|
||||||
@test gl isa Plots.GridLayout
|
|
||||||
@test length(gl) == 1
|
|
||||||
@test size(gl) == (1, 1)
|
|
||||||
@test Plots.layout_args(gl) == (gl, 1)
|
|
||||||
|
|
||||||
@test size(p, 1) == 2
|
|
||||||
@test size(p, 2) == 2
|
|
||||||
@test size(p) === (2, 2)
|
|
||||||
@test ndims(p) == 2
|
|
||||||
|
|
||||||
@test p[1][end] isa Plots.Series
|
|
||||||
show(devnull, p[1])
|
|
||||||
|
|
||||||
@test Plots.getplot(p) == p
|
|
||||||
@test Plots.getattr(p) == p.attr
|
|
||||||
@test Plots.backend_object(p) == p.o
|
|
||||||
@test occursin("Plot", string(p))
|
|
||||||
print(devnull, p)
|
|
||||||
|
|
||||||
@test Plots.to_pixels(1Plots.mm) isa AbstractFloat
|
|
||||||
@test Plots.ispositive(1Plots.mm)
|
|
||||||
@test size(Plots.defaultbox) == (0Plots.mm, 0Plots.mm)
|
|
||||||
show(devnull, Plots.defaultbox)
|
|
||||||
show(devnull, p.layout)
|
|
||||||
|
|
||||||
@test Plots.make_measure_hor(1Plots.mm) == 1Plots.mm
|
|
||||||
@test Plots.make_measure_vert(1Plots.mm) == 1Plots.mm
|
|
||||||
|
|
||||||
@test Plots.parent(p.layout) isa Plots.RootLayout
|
|
||||||
show(devnull, Plots.parent_bbox(p.layout))
|
|
||||||
|
|
||||||
rl = Plots.RootLayout()
|
|
||||||
show(devnull, rl)
|
|
||||||
@test parent(rl) === nothing
|
|
||||||
@test Plots.parent_bbox(rl) == Plots.defaultbox
|
|
||||||
@test Plots.bbox(rl) == Plots.defaultbox
|
|
||||||
|
|
||||||
el = Plots.EmptyLayout()
|
|
||||||
@test Plots.update_position!(el) === nothing
|
|
||||||
@test size(el) == (0, 0)
|
|
||||||
@test length(el) == 0
|
|
||||||
@test el[1, 1] === nothing
|
|
||||||
|
|
||||||
@test Plots.left(el) == 0Plots.mm
|
|
||||||
@test Plots.top(el) == 0Plots.mm
|
|
||||||
@test Plots.right(el) == 0Plots.mm
|
|
||||||
@test Plots.bottom(el) == 0Plots.mm
|
|
||||||
|
|
||||||
@test_throws ErrorException Plots.layout_args(nothing)
|
|
||||||
end
|
|
||||||
@ -21,19 +21,16 @@ end
|
|||||||
@test !haskey(axis.contents[1].options.dict, "fill")
|
@test !haskey(axis.contents[1].options.dict, "fill")
|
||||||
|
|
||||||
@testset "Legends" begin
|
@testset "Legends" begin
|
||||||
legends_plot = plot(rand(5, 2), lab = ["1" ""], arrow = true)
|
legends_plot = plot(rand(5, 2), lab = ["1" ""])
|
||||||
scatter!(legends_plot, rand(5))
|
scatter!(legends_plot, rand(5))
|
||||||
Plots._update_plot_object(legends_plot)
|
Plots._update_plot_object(legends_plot)
|
||||||
axis_contents = Plots.pgfx_axes(legends_plot.o)[1].contents
|
axis_contents = Plots.pgfx_axes(legends_plot.o)[1].contents
|
||||||
leg_entries = filter(x -> x isa PGFPlotsX.LegendEntry, axis_contents)
|
leg_entries = filter(x -> x isa PGFPlotsX.LegendEntry, axis_contents)
|
||||||
series = filter(x -> x isa PGFPlotsX.Plot, axis_contents)
|
series = filter(x -> x isa PGFPlotsX.Plot, axis_contents)
|
||||||
@test length(leg_entries) == 2
|
@test length(leg_entries) == 2
|
||||||
@test length(series) == 5
|
|
||||||
@test !haskey(series[1].options.dict, "forget plot")
|
@test !haskey(series[1].options.dict, "forget plot")
|
||||||
@test haskey(series[2].options.dict, "forget plot")
|
@test haskey(series[2].options.dict, "forget plot")
|
||||||
@test haskey(series[3].options.dict, "forget plot")
|
@test !haskey(series[3].options.dict, "forget plot")
|
||||||
@test haskey(series[4].options.dict, "forget plot")
|
|
||||||
@test !haskey(series[5].options.dict, "forget plot")
|
|
||||||
end # testset
|
end # testset
|
||||||
|
|
||||||
@testset "3D docs example" begin
|
@testset "3D docs example" begin
|
||||||
|
|||||||
@ -17,22 +17,3 @@ end
|
|||||||
@test all(RecipesPipeline.get_axis_limits(p1, :x) .== x)
|
@test all(RecipesPipeline.get_axis_limits(p1, :x) .== x)
|
||||||
@test all(RecipesPipeline.get_axis_limits(p2, :x) .== x)
|
@test all(RecipesPipeline.get_axis_limits(p2, :x) .== x)
|
||||||
end
|
end
|
||||||
|
|
||||||
@testset "Slicing" begin
|
|
||||||
@test plot(1:5, fillrange = 0)[1][1][:fillrange] == 0
|
|
||||||
data4 = rand(4, 4)
|
|
||||||
mat = reshape(1:8, 2, 4)
|
|
||||||
for i in axes(data4, 1)
|
|
||||||
for attribute in (:fillrange, :ribbon)
|
|
||||||
@test plot(data4; NamedTuple{tuple(attribute)}(0)...)[1][i][attribute] == 0
|
|
||||||
@test plot(data4; NamedTuple{tuple(attribute)}(Ref([1, 2]))...)[1][i][attribute] ==
|
|
||||||
[1.0, 2.0]
|
|
||||||
@test plot(data4; NamedTuple{tuple(attribute)}(Ref([1 2]))...)[1][i][attribute] ==
|
|
||||||
(iseven(i) ? 2 : 1)
|
|
||||||
@test plot(data4; NamedTuple{tuple(attribute)}(Ref(mat))...)[1][i][attribute] ==
|
|
||||||
[2(i - 1) + 1, 2i]
|
|
||||||
end
|
|
||||||
@test plot(data4, ribbon = (mat, mat))[1][i][:ribbon] ==
|
|
||||||
([2(i - 1) + 1, 2i], [2(i - 1) + 1, 2i])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|||||||
@ -7,7 +7,6 @@ using Plots, Test
|
|||||||
|
|
||||||
p = plot(rand(10))
|
p = plot(rand(10))
|
||||||
@test isa(p, Plots.Plot) == true
|
@test isa(p, Plots.Plot) == true
|
||||||
@test_nowarn Plots.plotly_series(plot())
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@testset "Contours" begin
|
@testset "Contours" begin
|
||||||
@ -55,10 +54,4 @@ using Plots, Test
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@testset "Extra kwargs" begin
|
|
||||||
pl = plot(1:5, test = "me")
|
|
||||||
@test Plots.plotly_series(pl)[1][:test] == "me"
|
|
||||||
pl = plot(1:5, test = "me", extra_kwargs = :plot)
|
|
||||||
@test Plots.plotly_layout(pl)[:test] == "me"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,18 +1,6 @@
|
|||||||
using Plots, Test
|
using Plots, Test
|
||||||
using OffsetArrays
|
using OffsetArrays
|
||||||
|
|
||||||
@testset "User recipes" begin
|
|
||||||
struct LegendPlot end
|
|
||||||
@recipe function f(plot::LegendPlot)
|
|
||||||
legend --> :topleft
|
|
||||||
(1:3, 1:3)
|
|
||||||
end
|
|
||||||
pl = plot(LegendPlot(); legend = :right)
|
|
||||||
@test pl[1][:legend_position] == :right
|
|
||||||
pl = plot(LegendPlot())
|
|
||||||
@test pl[1][:legend_position] == :topleft
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "lens!" begin
|
@testset "lens!" begin
|
||||||
pl = plot(1:5)
|
pl = plot(1:5)
|
||||||
lens!(pl, [1, 2], [1, 2], inset = (1, bbox(0.0, 0.0, 0.2, 0.2)), colorbar = false)
|
lens!(pl, [1, 2], [1, 2], inset = (1, bbox(0.0, 0.0, 0.2, 0.2)), colorbar = false)
|
||||||
|
|||||||
@ -7,132 +7,42 @@ using Plots, Test
|
|||||||
xlims!((1, 20))
|
xlims!((1, 20))
|
||||||
@test xlims(p) == (1, 20)
|
@test xlims(p) == (1, 20)
|
||||||
|
|
||||||
xlims!(p, (1, 21))
|
|
||||||
@test xlims(p) == (1, 21)
|
|
||||||
|
|
||||||
ylims!((-1, 1))
|
ylims!((-1, 1))
|
||||||
@test ylims(p) == (-1, 1)
|
@test ylims(p) == (-1, 1)
|
||||||
|
|
||||||
ylims!(p, (-2, 2))
|
|
||||||
@test ylims(p) == (-2, 2)
|
|
||||||
|
|
||||||
zlims!((-1, 1))
|
zlims!((-1, 1))
|
||||||
@test zlims(p) == (-1, 1)
|
@test zlims(p) == (-1, 1)
|
||||||
|
|
||||||
zlims!(p, (-2, 2))
|
|
||||||
@test zlims(p) == (-2, 2)
|
|
||||||
|
|
||||||
xlims!(-1, 11)
|
xlims!(-1, 11)
|
||||||
@test xlims(p) == (-1, 11)
|
@test xlims(p) == (-1, 11)
|
||||||
|
|
||||||
xlims!(p, -2, 12)
|
|
||||||
@test xlims(p) == (-2, 12)
|
|
||||||
|
|
||||||
ylims!((-10, 10))
|
ylims!((-10, 10))
|
||||||
@test ylims(p) == (-10, 10)
|
@test ylims(p) == (-10, 10)
|
||||||
|
|
||||||
ylims!(p, (-11, 9))
|
|
||||||
@test ylims(p) == (-11, 9)
|
|
||||||
|
|
||||||
zlims!((-10, 10))
|
zlims!((-10, 10))
|
||||||
@test zlims(p) == (-10, 10)
|
@test zlims(p) == (-10, 10)
|
||||||
|
|
||||||
zlims!(p, (-9, 8))
|
|
||||||
@test zlims(p) == (-9, 8)
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "Set Title / Labels" begin
|
|
||||||
p = plot()
|
|
||||||
title!(p, "Foo")
|
|
||||||
sp = p[1]
|
|
||||||
@test sp[:title] == "Foo"
|
|
||||||
xlabel!(p, "xlabel")
|
|
||||||
@test sp[:xaxis][:guide] == "xlabel"
|
|
||||||
ylabel!(p, "ylabel")
|
|
||||||
@test sp[:yaxis][:guide] == "ylabel"
|
|
||||||
end
|
|
||||||
|
|
||||||
@testset "Misc" begin
|
|
||||||
p = plot()
|
|
||||||
sp = p[1]
|
|
||||||
|
|
||||||
xflip!(p)
|
|
||||||
@test sp[:xaxis][:flip]
|
|
||||||
|
|
||||||
yflip!(p)
|
|
||||||
@test sp[:yaxis][:flip]
|
|
||||||
|
|
||||||
xgrid!(p, true)
|
|
||||||
@test sp[:xaxis][:grid]
|
|
||||||
|
|
||||||
xgrid!(p, false)
|
|
||||||
@test !sp[:xaxis][:grid]
|
|
||||||
|
|
||||||
ygrid!(p, true)
|
|
||||||
@test sp[:yaxis][:grid]
|
|
||||||
|
|
||||||
ygrid!(p, false)
|
|
||||||
@test !sp[:yaxis][:grid]
|
|
||||||
|
|
||||||
ann = [(7, 3, "(7,3)"), (3, 7, text("hey", 14, :left, :top, :green))]
|
|
||||||
annotate!(p, ann)
|
|
||||||
annotate!(p, ann...)
|
|
||||||
|
|
||||||
xaxis!(p, true)
|
|
||||||
@test sp[:xaxis][:showaxis]
|
|
||||||
|
|
||||||
xaxis!(p, false)
|
|
||||||
@test !sp[:xaxis][:showaxis]
|
|
||||||
|
|
||||||
yaxis!(p, true)
|
|
||||||
@test sp[:yaxis][:showaxis]
|
|
||||||
|
|
||||||
yaxis!(p, false)
|
|
||||||
@test !sp[:yaxis][:showaxis]
|
|
||||||
|
|
||||||
p = plot3d([1, 2], [1, 2], [1, 2])
|
|
||||||
plot3d!(p, [3, 4], [3, 4], [3, 4])
|
|
||||||
@test Plots.series_list(p[1])[1][:seriestype] == :path3d
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@testset "Set Ticks" begin
|
@testset "Set Ticks" begin
|
||||||
p = plot([0, 2, 3, 4, 5, 6, 7, 8, 9, 10])
|
p = plot([0, 2, 3, 4, 5, 6, 7, 8, 9, 10])
|
||||||
sp = p[1]
|
|
||||||
|
|
||||||
xticks = 2:6
|
xticks = 2:6
|
||||||
xticks!(xticks)
|
xticks!(xticks)
|
||||||
@test sp.attr[:xaxis][:ticks] == xticks
|
@test Plots.get_subplot(current(), 1).attr[:xaxis][:ticks] == xticks
|
||||||
|
|
||||||
xticks = 1:5
|
|
||||||
xticks!(p, xticks)
|
|
||||||
@test sp.attr[:xaxis][:ticks] == xticks
|
|
||||||
|
|
||||||
yticks = 0.2:0.1:0.7
|
yticks = 0.2:0.1:0.7
|
||||||
yticks!(yticks)
|
yticks!(yticks)
|
||||||
@test sp.attr[:yaxis][:ticks] == yticks
|
@test Plots.get_subplot(current(), 1).attr[:yaxis][:ticks] == yticks
|
||||||
|
|
||||||
yticks = 0.1:0.5
|
|
||||||
yticks!(p, yticks)
|
|
||||||
@test sp.attr[:yaxis][:ticks] == yticks
|
|
||||||
|
|
||||||
xticks = [5, 6, 7.5]
|
xticks = [5, 6, 7.5]
|
||||||
xlabels = ["a", "b", "c"]
|
xlabels = ["a", "b", "c"]
|
||||||
xticks!(xticks, xlabels)
|
|
||||||
@test sp.attr[:xaxis][:ticks] == (xticks, xlabels)
|
|
||||||
|
|
||||||
xticks = [5, 2]
|
xticks!(xticks, xlabels)
|
||||||
xlabels = ["b", "a"]
|
@test Plots.get_subplot(current(), 1).attr[:xaxis][:ticks] == (xticks, xlabels)
|
||||||
xticks!(p, xticks, xlabels)
|
|
||||||
@test sp.attr[:xaxis][:ticks] == (xticks, xlabels)
|
|
||||||
|
|
||||||
yticks = [0.5, 0.6, 0.75]
|
yticks = [0.5, 0.6, 0.75]
|
||||||
ylabels = ["z", "y", "x"]
|
ylabels = ["z", "y", "x"]
|
||||||
yticks!(yticks, ylabels)
|
yticks!(yticks, ylabels)
|
||||||
@test sp.attr[:yaxis][:ticks] == (yticks, ylabels)
|
@test Plots.get_subplot(current(), 1).attr[:yaxis][:ticks] == (yticks, ylabels)
|
||||||
|
|
||||||
yticks = [0.5, 0.1]
|
|
||||||
ylabels = ["z", "y"]
|
|
||||||
yticks!(p, yticks, ylabels)
|
|
||||||
@test sp.attr[:yaxis][:ticks] == (yticks, ylabels)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user