From 33e5a51a28a998683440826eb920fbe664ee1307 Mon Sep 17 00:00:00 2001 From: "Michael K. Borregaard" Date: Mon, 22 May 2017 14:33:32 +0200 Subject: [PATCH 1/4] add submodule Measure --- src/Plots.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Plots.jl b/src/Plots.jl index c75a8e65..eaba8acb 100644 --- a/src/Plots.jl +++ b/src/Plots.jl @@ -133,11 +133,15 @@ ignorenan_extrema(x) = Base.extrema(x) # --------------------------------------------------------- +module Measure 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 +importall Measure +export BBox, BoundingBox # --------------------------------------------------------- include("types.jl") From b717cf1dc0cf0832473e332e414b965192d1067e Mon Sep 17 00:00:00 2001 From: "Michael K. Borregaard" Date: Mon, 2 Oct 2017 08:24:59 +0200 Subject: [PATCH 2/4] Rename submodule to PlotMeasures --- src/Plots.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Plots.jl b/src/Plots.jl index eaba8acb..d3966d09 100644 --- a/src/Plots.jl +++ b/src/Plots.jl @@ -133,14 +133,15 @@ ignorenan_extrema(x) = Base.extrema(x) # --------------------------------------------------------- -module Measure +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 -importall Measure + +importall .PlotMeasures export BBox, BoundingBox # --------------------------------------------------------- From 4f6a920f72fb8bbf3f9124f4e994daa2286f4a17 Mon Sep 17 00:00:00 2001 From: "Michael K. Borregaard" Date: Mon, 2 Oct 2017 08:28:25 +0200 Subject: [PATCH 3/4] Import Measures into Plots --- src/Plots.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Plots.jl b/src/Plots.jl index d3966d09..24a9989c 100644 --- a/src/Plots.jl +++ b/src/Plots.jl @@ -138,10 +138,10 @@ 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 -importall .PlotMeasures +using .PlotMeasures +import .PlotMeasures: Length, AbsoluteLength, Measure, width, height export BBox, BoundingBox # --------------------------------------------------------- From 2a1140c0b3e56aa360ea60662306dbbc8afbdee3 Mon Sep 17 00:00:00 2001 From: "Michael K. Borregaard" Date: Mon, 2 Oct 2017 15:07:16 +0200 Subject: [PATCH 4/4] include PlotMeasures in example 29 --- src/examples.jl | 1 + 1 file changed, 1 insertion(+) 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)