Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Run ruff format
  • Loading branch information
robertoffmoura committed Oct 9, 2025
commit 85745d729ec0b70c1316f1e1da53a4229f6f4236
6 changes: 4 additions & 2 deletions plotly/matplotlylib/mpltools.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,10 @@ def prep_ticks(ax, index, ax_type, props):

if formatter == "LogFormatterMathtext":
axis_dict["exponentformat"] = "e"
elif formatter == "FuncFormatter" and props["axes"][index]["tickformat"] is not None:
to_remove = ["dtick" "tickmode"]
elif (
formatter == "FuncFormatter" and props["axes"][index]["tickformat"] is not None
):
to_remove = ["dticktickmode"]
for key in to_remove:
if key in axis_dict:
axis_dict.pop(key)
Expand Down
2 changes: 2 additions & 0 deletions plotly/matplotlylib/tests/test_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def test_multiple_traces_native_legend():
assert plotly_fig.data[2].mode == "lines+markers"



def test_non_arithmetic_progression_xtickvals():
xticks = [0.01, 0.53, 0.75]
plt.figure()
Expand All @@ -96,6 +97,7 @@ def test_non_arithmetic_progression_xtickvals():

assert plotly_fig.layout.xaxis.tickvals == tuple(xticks)


def test_non_arithmetic_progression_xticktext():
xtickvals = [0.01, 0.53, 0.75]
xticktext = ["Baseline", "param = 1", "param = 2"]
Expand Down