Skip to content

Fractional blocks #26

Description

@riley-x

Is there a way to enable fractional blocks, so that there is no rounding? I'm especially running into issues where the rounding causes the total number of blocks to fluctuate, as in the example below. Both datasets total to 87.46 but the top plot has an extra block. It'd be great if the last block could have fractional size, and if the intermediate blocks could have split colors.

output

Code to reproduce:

plot1 = {'Net income': 18.46, 'Income tax': 1.64, 'MG&A': 7.52, 'R&D': 15.3, 'Cost of sales': 44.54}
plot2 = {'Misc income': 1.2, 'Revenue': 86.26}
fig = plt.figure(
    FigureClass=Waffle,
    plots={
        311: {'values':plot1},
        312: {'values':plot2}
    },
    rows=5,
    figsize=(9, 7),
    legend={'loc': 'upper left', 'bbox_to_anchor': (1.1, 1)},
    block_arranging_style='snake',
)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions