Merge branch 'master' of https://github.com/sswatson/Plots.jl
This commit is contained in:
commit
8c27064fc1
2
REQUIRE
2
REQUIRE
@ -13,4 +13,4 @@ JSON
|
|||||||
NaNMath
|
NaNMath
|
||||||
Requires
|
Requires
|
||||||
Contour
|
Contour
|
||||||
GR 0.35.0
|
GR 0.37.0
|
||||||
|
|||||||
@ -5,7 +5,7 @@ _current_plots_version = v"0.20.6"
|
|||||||
using Reexport
|
using Reexport
|
||||||
|
|
||||||
import StaticArrays
|
import StaticArrays
|
||||||
using Dates, Printf, Statistics, Base64, LinearAlgebra
|
using Dates, Printf, Statistics, Base64, LinearAlgebra, Random
|
||||||
import SparseArrays: findnz
|
import SparseArrays: findnz
|
||||||
|
|
||||||
@reexport using RecipesBase
|
@reexport using RecipesBase
|
||||||
|
|||||||
@ -459,7 +459,7 @@ const _widen_seriestypes = (:line, :path, :steppre, :steppost, :sticks, :scatter
|
|||||||
|
|
||||||
function default_should_widen(axis::Axis)
|
function default_should_widen(axis::Axis)
|
||||||
should_widen = false
|
should_widen = false
|
||||||
if !is_2tuple(axis[:lims])
|
if !(is_2tuple(axis[:lims]) || axis[:lims] == :round)
|
||||||
for sp in axis.sps
|
for sp in axis.sps
|
||||||
for series in series_list(sp)
|
for series in series_list(sp)
|
||||||
if series.plotattributes[:seriestype] in _widen_seriestypes
|
if series.plotattributes[:seriestype] in _widen_seriestypes
|
||||||
|
|||||||
@ -1029,16 +1029,13 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
|||||||
else
|
else
|
||||||
h = series[:levels] > 1 ? range(zmin, stop=zmax, length=series[:levels]) : [(zmin + zmax) / 2]
|
h = series[:levels] > 1 ? range(zmin, stop=zmax, length=series[:levels]) : [(zmin + zmax) / 2]
|
||||||
end
|
end
|
||||||
if series[:fillrange] != nothing
|
|
||||||
GR.surface(x, y, z, GR.OPTION_CELL_ARRAY)
|
|
||||||
else
|
|
||||||
GR.setlinetype(gr_linetype[get_linestyle(series)])
|
GR.setlinetype(gr_linetype[get_linestyle(series)])
|
||||||
GR.setlinewidth(max(0, get_linewidth(series) / (sum(gr_plot_size) * 0.001)))
|
GR.setlinewidth(max(0, get_linewidth(series) / (sum(gr_plot_size) * 0.001)))
|
||||||
if plot_color(series[:linecolor]) == [plot_color(:black)]
|
if series[:fillrange] != nothing
|
||||||
GR.contour(x, y, h, z, 0 + (series[:contour_labels] == true ? 1 : 0))
|
GR.contourf(x, y, h, z, series[:contour_labels] == true ? 1 : 0)
|
||||||
else
|
else
|
||||||
GR.contour(x, y, h, z, 1000 + (series[:contour_labels] == true ? 1 : 0))
|
coff = plot_color(series[:linecolor]) == [plot_color(:black)] ? 0 : 1000
|
||||||
end
|
GR.contour(x, y, h, z, coff + (series[:contour_labels] == true ? 1 : 0))
|
||||||
end
|
end
|
||||||
|
|
||||||
# create the colorbar of contour levels
|
# create the colorbar of contour levels
|
||||||
|
|||||||
@ -600,7 +600,7 @@ function process_annotation(sp::Subplot, xs, ys, labs, font = font())
|
|||||||
alphabet = "abcdefghijklmnopqrstuvwxyz"
|
alphabet = "abcdefghijklmnopqrstuvwxyz"
|
||||||
push!(anns, (x, y, text(string("(", alphabet[sp[:subplot_index]], ")"), font)))
|
push!(anns, (x, y, text(string("(", alphabet[sp[:subplot_index]], ")"), font)))
|
||||||
else
|
else
|
||||||
push!(anns, (x, y, isa(lab, PlotText) ? lab : text(lab, font)))
|
push!(anns, (x, y, isa(lab, PlotText) ? lab : isa(lab, Tuple) ? text(lab...) : text(lab, font)))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
anns
|
anns
|
||||||
@ -615,7 +615,7 @@ function process_annotation(sp::Subplot, positions::Union{AVec{Symbol},Symbol},
|
|||||||
alphabet = "abcdefghijklmnopqrstuvwxyz"
|
alphabet = "abcdefghijklmnopqrstuvwxyz"
|
||||||
push!(anns, (pos, text(string("(", alphabet[sp[:subplot_index]], ")"), font)))
|
push!(anns, (pos, text(string("(", alphabet[sp[:subplot_index]], ")"), font)))
|
||||||
else
|
else
|
||||||
push!(anns, (pos, isa(lab, PlotText) ? lab : text(lab, font)))
|
push!(anns, (pos, isa(lab, PlotText) ? lab : isa(lab, Tuple) ? text(lab...) : text(lab, font)))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
anns
|
anns
|
||||||
|
|||||||
@ -100,7 +100,7 @@ _get_showtheme_args(thm::Symbol, func::Symbol) = thm, get(_color_functions, func
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
srand(1)
|
Random.seed!(1)
|
||||||
|
|
||||||
label := ""
|
label := ""
|
||||||
colorbar := false
|
colorbar := false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user