From 99dff995049f99df9c8d7cdc925e9a89f115aaf2 Mon Sep 17 00:00:00 2001 From: willtebbutt Date: Mon, 16 Nov 2020 09:03:28 +0000 Subject: [PATCH] pgfplotsx, no font size (#3154) Co-authored-by: Will Tebbutt --- src/backends/pgfplotsx.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/backends/pgfplotsx.jl b/src/backends/pgfplotsx.jl index d25083ae..c5981c8c 100644 --- a/src/backends/pgfplotsx.jl +++ b/src/backends/pgfplotsx.jl @@ -887,6 +887,13 @@ function pgfx_font(fontsize, thickness_scaling = 1, font = "\\selectfont") return string("{\\fontsize{", fs, " pt}{", 1.3fs, " pt}", font, "}") end +# If a particular fontsize parameter is `nothing`, produce a figure that doesn't specify the +# font size, and therefore uses whatever fontsize is utilised by the doc in which the +# figure is located. +function pgfx_font(fontsize::Nothing, thickness_scaling = 1, font = "\\selectfont") + return string("{", font, "}") +end + function pgfx_should_add_to_legend(series::Series) series.plotattributes[:primary] && !(