diff --git a/src/Plots.jl b/src/Plots.jl index c75a8e65..24a9989c 100644 --- a/src/Plots.jl +++ b/src/Plots.jl @@ -133,11 +133,16 @@ ignorenan_extrema(x) = Base.extrema(x) # --------------------------------------------------------- +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 +end +using .PlotMeasures +import .PlotMeasures: Length, AbsoluteLength, Measure, width, height +export BBox, BoundingBox # --------------------------------------------------------- include("types.jl") diff --git a/src/examples.jl b/src/examples.jl index 4393ab60..fabb368d 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -288,6 +288,7 @@ PlotExample("Heatmap, categorical axes, and aspect_ratio", PlotExample("Layouts, margins, label rotation, title location", "", [:(begin + using Plots.PlotMeasures # for Measures, e.g. mm and px plot(rand(100,6),layout=@layout([a b; c]),title=["A" "B" "C"], title_location=:left, left_margin=[20mm 0mm], bottom_margin=10px, xrotation=60)