fix inspectdr

This commit is contained in:
Simon Christ 2021-06-01 18:12:53 +02:00
parent dd39c39bc9
commit 9f27271b05

View File

@ -408,13 +408,13 @@ function _inspectdr_setupsubplot(sp::Subplot{InspectDRBackend})
_inspectdr_mapptsize(xaxis[:tickfontsize]), _inspectdr_mapptsize(xaxis[:tickfontsize]),
color = _inspectdr_mapcolor(xaxis[:tickfontcolor]) color = _inspectdr_mapcolor(xaxis[:tickfontcolor])
) )
l[:enable_legend] = (sp[:legend_position] != :none) l.enable_legend = (sp[:legend_position] != :none)
#l[:halloc_legend] = 150 #TODO: compute??? #l.halloc_legend = 150 #TODO: compute???
l[:font_legend] = InspectDR.Font(sp[:legend_font_family], l.font_legend = InspectDR.Font(sp[:legend_font_family],
_inspectdr_mapptsize(sp[:legend_font_pointsize]), _inspectdr_mapptsize(sp[:legend_font_pointsize]),
color = _inspectdr_mapcolor(sp[:legend_font_color]) color = _inspectdr_mapcolor(sp[:legend_font_color])
) )
l[:frame_legend].fillcolor = _inspectdr_mapcolor(sp[:legend_background_color]) l.frame_legend.fillcolor = _inspectdr_mapcolor(sp[:legend_background_color])
#_round!() ensures values use integer spacings (looks better on screen): #_round!() ensures values use integer spacings (looks better on screen):
InspectDR._round!(InspectDR.autofit2font!(l, legend_width=10.0)) #10 "em"s wide InspectDR._round!(InspectDR.autofit2font!(l, legend_width=10.0)) #10 "em"s wide
return return