Skip to content

Layout Engine: return smaller size for axes with no plottables #3608

@swharden

Description

@swharden

Presently the right axis is measured on every render to estimate how large the ticks are and that space is allocated by the layout manager. However, plots with no plottables using the right axis shouldn't be keeping that space open. It's causing issues when adding additional axes or colorbars because there is a lot of space occupied by that unused axis. #3294

Current behavior

double[,] data = SampleData.MonaLisa();
var hm1 = myPlot.Add.Heatmap(data);
hm1.Colormap = new ScottPlot.Colormaps.Turbo();
myPlot.Add.ColorBar(hm1);

image

This hack works for now

myPlot.Axes.Right.MaximumSize = 5;

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions