Changing grid insets after the plot has been drawn once do not have effect.
Steps to reproduce the issue
After drawing the plot once
// kotlin
plot.clear()
plot.graph.gridInsets.bottom = PixelUtils.dpToPix(40f)
plot.redraw()
This is because XYGraphWidget onResize is the only place where gridInsets have an effect.
This is called by Widget checkSize which guards calling resize with size of the widget rect. CheckSize is called on widget.draw() But the widget rect does not change due to gridInset being changed.
One quick fix could be to call onResize whenever gridInsets is set.
Changing grid insets after the plot has been drawn once do not have effect.
After drawing the plot once // kotlin plot.clear() plot.graph.gridInsets.bottom = PixelUtils.dpToPix(40f) plot.redraw()
This is because XYGraphWidget onResize is the only place where gridInsets have an effect. This is called by Widget checkSize which guards calling resize with size of the widget rect. CheckSize is called on widget.draw() But the widget rect does not change due to gridInset being changed.
One quick fix could be to call onResize whenever gridInsets is set.
1.5.4