Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions plotly/graph_objs/_figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Modifications will be overwitten the next time code generation run.

from plotly.basedatatypes import BaseFigure
from plotly.graph_objs import Parcats


class Figure(BaseFigure):
Expand Down Expand Up @@ -340,7 +341,10 @@ def add_trace(
Figure(...)

"""
return super().add_trace(trace, row, col, secondary_y, exclude_empty_subplots)
# Avoid method resolution overhead by direct call
return BaseFigure.add_trace(
self, trace, row, col, secondary_y, exclude_empty_subplots
)

def add_traces(
self,
Expand Down Expand Up @@ -11945,7 +11949,6 @@ def add_parcats(
-------
Figure
"""
from plotly.graph_objs import Parcats

new_trace = Parcats(
arrangement=arrangement,
Expand Down Expand Up @@ -11973,7 +11976,8 @@ def add_parcats(
visible=visible,
**kwargs,
)
return self.add_trace(new_trace, row=row, col=col)
# Direct BaseFigure.add_trace call for reduced overhead
return BaseFigure.add_trace(self, new_trace, row=row, col=col)

def add_parcoords(
self,
Expand Down