Merge pull request #855 from mkborregaard/submodule-measure
Add submodule PlotMeasures (fix #821)
This commit is contained in:
commit
6bbb26d2ea
@ -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")
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user