Skip to content

Commit ebff476

Browse files
committed
Fix tikz figure
1 parent 65d7644 commit ebff476

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

src/maxplotlib/canvas/canvas.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,24 +102,29 @@ def add_line(
102102
**kwargs,
103103
)
104104

105-
def add_tikzfigure(self, **kwargs):
105+
def add_tikzfigure(
106+
self,
107+
col=None,
108+
row=None,
109+
label=None,
110+
**kwargs,
111+
):
106112
"""
107113
Adds a subplot to the figure.
108114
109115
Parameters:
110116
**kwargs: Arbitrary keyword arguments.
111-
- col (int): Column index for the subplot.
112-
- row (int): Row index for the subplot.
113-
- label (str): Label to identify the subplot.
114117
"""
115-
col = kwargs.get("col", None)
116-
row = kwargs.get("row", None)
117-
label = kwargs.get("label", None)
118118

119119
row, col = self.generate_new_rowcol(row, col)
120120

121121
# Initialize the LinePlot for the given subplot position
122-
tikz_figure = TikzFigure(**kwargs)
122+
tikz_figure = TikzFigure(
123+
col=col,
124+
row=row,
125+
label=label,
126+
**kwargs,
127+
)
123128
self._subplot_matrix[row][col] = tikz_figure
124129

125130
# Store the LinePlot instance by its position for easy access

0 commit comments

Comments
 (0)