Compare commits

..
Author SHA1 Message Date
Anshul SinghviandGitHub f58d585a20 Unify preamble pushes 2019-12-13 13:47:22 -05:00
Daniel SchwabenederandGitHub 140afeb53d Merge pull request #2320 from korsbo/layout_colon
Support colons in layout keyword argument.
2019-12-12 09:35:56 +01:00
Daniel SchwabenederandGitHub 639a09bccb Merge pull request #2322 from JuliaPlots/compathelper/new_version/2019-12-12-03-02-29-808-2906006334
CompatHelper: bump compat for "Requires" to "1.0"
2019-12-12 09:32:10 +01:00
github-actions[bot] f105d41e54 CompatHelper: bump compat for "Requires" to "1.0" 2019-12-12 03:02:30 +00:00
Niklas Korsbo 140a429e09 Fix regression of layout_args. 2019-12-11 12:27:44 +00:00
Niklas Korsbo e54eb53665 Fix layout specification bug. 2019-12-11 11:11:14 +00:00
Niklas Korsbo 9b3cf3a818 Support colons in layout kwarg. 2019-12-11 10:58:39 +00:00
Daniel SchwabenederandGitHub 3d306578f1 Merge pull request #2317 from daschw/gr-logticks
fix extra blank space in GR with log axis and engineering notation
2019-12-11 09:28:21 +01:00
Michael Krabbe Borregaard e615718f1b up version 2019-12-10 22:15:57 +01:00
Daniel Schwabeneder fbbbd40353 fix extra blank space in GR with log axis and engineering notation 2019-12-10 13:12:35 +01:00
8 changed files with 44 additions and 52 deletions
-10
View File
@@ -19,17 +19,9 @@ addons:
- libgtk-3-dev
- xauth
- xvfb
dist: trusty
sudo: required
services:
- docker
before_install:
- echo "**** pulling Docker image"
- docker pull tkpapp/texlive-julia-minimal
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pwd ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./test/install_wkhtmltoimage.sh ; fi
@@ -37,8 +29,6 @@ notifications:
email: true
script:
- echo "**** running Docker"
- docker run --env-file travis_docker_env.list -t -a STDOUT -a STDIN -a STDERR -v $PWD:/mnt tkpapp/texlive-julia-minimal /mnt/travis_docker_test_script.sh $TRAVIS_JULIA_VERSION
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- if [[ `uname` = "Linux" ]]; then TESTCMD="xvfb-run julia"; else TESTCMD="julia"; fi
- $TESTCMD -e 'using Pkg; Pkg.build(); Pkg.test(coverage=true)'
+6 -6
View File
@@ -3,14 +3,14 @@
#### notes on release changes, ongoing development, and future planned work
- Minor version 0.17 is the last one to support Julia 0.6!!
- Minor version 0.11 is the last one to support Julia 0.5!!
- Critical bugfixes only
- `backports` branch is for Julia 0.5
---
## (current master)
## 0.28.3
- support generalized array interface
- save to pdf, svg and eps in plotlyjs
- fix for clims in line_z
- optimize heatmap logic in gr
## 0.26.3
- fix `vline` with dates
- fix PyPlot logscale bug
+2 -2
View File
@@ -1,7 +1,7 @@
name = "Plots"
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
author = ["Tom Breloff (@tbreloff)"]
version = "0.28.2"
version = "0.28.3"
[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
@@ -43,7 +43,7 @@ PlotThemes = "1"
PlotUtils = "0.6.1"
RecipesBase = "0.6, 0.7"
Reexport = "0.2"
Requires = "0.5"
Requires = "0.5, 1.0"
Showoff = "0.3.1"
StatsBase = "0.32"
julia = "1"
+8 -6
View File
@@ -1116,9 +1116,10 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
# @show cv dv ymin xi yi flip mirror (flip $ mirror)
if xaxis[:ticks] in (:auto, :native)
# ensure correct dispatch in gr_text for automatic log ticks
if xaxis[:scale] in _logScales
dv = string(dv, "\\ ")
elseif xaxis[:formatter] in (:scientific, :auto)
if xaxis[:formatter] in (:scientific, :auto)
if xaxis[:scale] in _logScales
dv = string(dv, "\\ ")
end
dv = convert_sci_unicode(dv)
end
end
@@ -1135,9 +1136,10 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
# @show cv dv xmin xi yi
if yaxis[:ticks] in (:auto, :native)
# ensure correct dispatch in gr_text for automatic log ticks
if yaxis[:scale] in _logScales
dv = string(dv, "\\ ")
elseif yaxis[:formatter] in (:scientific, :auto)
if yaxis[:formatter] in (:scientific, :auto)
if yaxis[:scale] in _logScales
dv = string(dv, "\\ ")
end
dv = convert_sci_unicode(dv)
end
end
+8 -4
View File
@@ -6,10 +6,15 @@ Base.@kwdef mutable struct PGFPlotsXPlot
function PGFPlotsXPlot(is_created, was_shown, the_plot)
pgfx_plot = new(is_created, was_shown, the_plot)
# tikz libraries
PGFPlotsX.push_preamble!(pgfx_plot.the_plot, "\\usetikzlibrary{arrows.meta}")
PGFPlotsX.push_preamble!(pgfx_plot.the_plot, "\\usetikzlibrary{backgrounds}")
PGFPlotsX.push_preamble!(pgfx_plot.the_plot,
"""
% Load TikZ libraries
\\usetikzlibrary{arrows.meta, backgrounds}
% Load PGFPlots libraries
\\usepgfplotslibrary{patchplots, fillbetween}
% Set some useful keys
\\pgfkeys{/tikz/.cd,
background color/.initial=white,
background color/.get=\\backcol,
@@ -25,8 +30,7 @@ Base.@kwdef mutable struct PGFPlotsXPlot
"""
)
# pgfplots libraries
PGFPlotsX.push_preamble!(pgfx_plot.the_plot, "\\usepgfplotslibrary{patchplots}")
PGFPlotsX.push_preamble!(pgfx_plot.the_plot, "\\usepgfplotslibrary{fillbetween}")
PGFPlotsX.push_preamble!(pgfx_plot.the_plot, "")
pgfx_plot
end
end
+20 -3
View File
@@ -469,7 +469,7 @@ function layout_args(plotattributes::KW)
end
function layout_args(plotattributes::KW, n_override::Integer)
layout, n = layout_args(get(plotattributes, :layout, n_override))
layout, n = layout_args(n_override, get(plotattributes, :layout, n_override))
if n != n_override
error("When doing layout, n ($n) != n_override ($(n_override)). You're probably trying to force existing plots into a layout that doesn't fit them.")
end
@@ -481,12 +481,27 @@ function layout_args(n::Integer)
GridLayout(nr, nc), n
end
function layout_args(sztup::NTuple{2,I}) where I<:Integer
function layout_args(sztup::NTuple{2, Integer})
nr, nc = sztup
GridLayout(nr, nc), nr*nc
end
function layout_args(sztup::NTuple{3,I}) where I<:Integer
layout_args(n_override::Integer, n::Integer) = layout_args(n)
layout_args(n, sztup::NTuple{2, Integer}) = layout_args(sztup)
function layout_args(n, sztup::Tuple{Colon, Integer})
nc = sztup[2]
nr = ceil(Int, n / nc)
GridLayout(nr, nc), n
end
function layout_args(n, sztup::Tuple{Integer, Colon})
nr = sztup[1]
nc = ceil(Int, n / nr)
GridLayout(nr, nc), n
end
function layout_args(sztup::NTuple{3, Integer})
n, nr, nc = sztup
nr, nc = compute_gridsize(n, nr, nc)
GridLayout(nr, nc), n
@@ -499,6 +514,8 @@ function layout_args(layout::GridLayout)
layout, n
end
layout_args(n_override::Integer, layout::GridLayout) = layout_args(layout)
layout_args(huh) = error("unhandled layout type $(typeof(huh)): $huh")
-9
View File
@@ -1,9 +0,0 @@
# environment variables that are passed from Travis to Docker
DOCUMENTER_KEY
TRAVIS_BRANCH
TRAVIS_PULL_REQUEST
TRAVIS_REPO_SLUG
TRAVIS_TAG
TRAVIS_OS_NAME
TRAVIS_JULIA_VERSION
JULIA_PROJECT
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
JULIAVER=$1 # the first and only argument to the script is the version
JULIABIN=/test/julia-$JULIAVER/bin/julia
## install the image (when necessary)
/test/install-julia.sh $JULIAVER
cd /mnt && if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
# run tests
$JULIABIN -e "import Pkg; Pkg.build(); Pkg.test(; coverage=true)"