JuliaPlots / InspectDR.jl

Fast, interactive Julia/GTK+ plots (+Smith charts +Gtk widget +Cairo-only images)
MIT License
68 stars 9 forks source link

Plot title truncated #25

Open cdhf opened 3 years ago

cdhf commented 3 years ago

Plotting with julia 1.6.0, Plots 1.11.1 and InspectDR 0.4.0. When setting a plot title, the upper half of it is truncated, both in the interactive window and in exported files.

using Plots, InspectDR inspectdr() plot([1,2,3]; title="Test")

results in

screenshot

ma-laforge commented 3 years ago

Yes. I don't increase area when font size increases. I will have to fix that in Plots.jl but it might take some time.

Workaround for now

You will have to manually fix the font size in InspectDR:

using Plots, InspectDR
inspectdr()

p=plot([1,2,3]; title="Test")
pgui = display(p) #Display plot manually, and get ref to InspectDR object.

#Increase headroom for title:
layout = pgui.subplots[1].src.layout
layout[:valloc_top] *= layout[:font_title]._size/14