From b37f2141a1e7eb1bc74ff3d3403f13bd71bb3e20 Mon Sep 17 00:00:00 2001 From: "Michael K. Borregaard" Date: Thu, 5 Oct 2017 12:08:15 +0200 Subject: [PATCH] Also import px and pct into PlotMeasures Necessary for example 29 to work --- src/Plots.jl | 7 +++++-- src/layouts.jl | 4 ---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Plots.jl b/src/Plots.jl index e730e65c..e2ffa95c 100644 --- a/src/Plots.jl +++ b/src/Plots.jl @@ -138,12 +138,15 @@ module PlotMeasures import Measures import Measures: Length, AbsoluteLength, Measure, BoundingBox, mm, cm, inch, pt, width, height, w, h const BBox = Measures.Absolute2DBox -export BBox, BoundingBox, mm, cm, inch, pt, px, pct, w, h + +# allow pixels and percentages +const px = AbsoluteLength(0.254) +const pct = Length{:pct, Float64}(1.0) +export BBox, BoundingBox, mm, cm, inch, px, pct, pt, w, h end using .PlotMeasures import .PlotMeasures: Length, AbsoluteLength, Measure, width, height -export BBox, BoundingBox # --------------------------------------------------------- include("types.jl") diff --git a/src/layouts.jl b/src/layouts.jl index 9e90a2f1..9bd4d3b2 100644 --- a/src/layouts.jl +++ b/src/layouts.jl @@ -1,10 +1,6 @@ # NOTE: (0,0) is the top-left !!! -# allow pixels and percentages -const px = AbsoluteLength(0.254) -const pct = Length{:pct, Float64}(1.0) - to_pixels(m::AbsoluteLength) = m.value / 0.254 const _cbar_width = 5mm