Skip to content

Feature Request: Add SubFigures to Mpf_Figure #664

Open
@traderjoe1968

Description

@traderjoe1968

Presently the Mpf_Figure class does not support mpl subfigure plots. Subfigures allow encapsulation of a group of subcharts into one figure that can then be embedded easily in the overall figure

Adding the following function to Mpf_Figure class will add in subfigures

    def add_subfigure(self,*args,**kwargs):

        if 'style' in kwargs or not hasattr(self,'mpfstyle'):
            style = _check_for_and_apply_style(kwargs)
        else:
            style = _check_for_and_apply_style(dict(style=self.mpfstyle))

        sf = mplfigure.Figure.add_subfigure(self, *args, **kwargs)
        sf.mpfstyle = style
        self.subfigs += [sf]
        return sf

Current Alternative solution / workaround is to sub-class Mpf_Figure and add this in. It would be preferable not to have to do this as SubFigure are part of the mpl and should be supported in mpf

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions