Skip to content

Commit 0604d9b

Browse files
authored
Address sphinx build issues (#2332)
* change datetime formatting class * list `obj` in `hoverxref_roles` * list `mod` as well * and `data`
1 parent b50b56f commit 0604d9b

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

Diff for: docs/examples/shading/plot_martinez_shade_loss.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
import pandas as pd
4848
import numpy as np
4949
import matplotlib.pyplot as plt
50-
from matplotlib.dates import ConciseDateFormatter
50+
from matplotlib.dates import DateFormatter
5151

5252
pitch = 4 # meters
5353
width = 1.5 # meters
@@ -235,10 +235,6 @@
235235
ax1.plot(times, shade_losses, label=k, linestyle=linestyle)
236236
ax1.legend(loc="upper center")
237237
ax1.grid()
238-
ax1.set_xlabel("Time")
239-
ax1.xaxis.set_major_formatter(
240-
ConciseDateFormatter("%H:%M", tz="Europe/Madrid")
241-
)
242238
ax1.set_ylabel(r"$P_{out}$ losses")
243239
ax1.set_title("Per module")
244240

@@ -248,9 +244,7 @@
248244
ax2.legend(loc="upper center")
249245
ax2.grid()
250246
ax2.set_xlabel("Time")
251-
ax2.xaxis.set_major_formatter(
252-
ConciseDateFormatter("%H:%M", tz="Europe/Madrid")
253-
)
247+
ax2.xaxis.set_major_formatter(DateFormatter("%H:%M", tz="Europe/Madrid"))
254248
ax2.set_ylabel(r"$P_{out}$ losses")
255249
ax2.set_title("Per row")
256250
fig.tight_layout()

Diff for: docs/sphinx/source/conf.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@
7373

7474
# Enable hover tooltips
7575
hoverxref_auto_ref = True
76-
hoverxref_roles = ["class", "meth", "func", "ref", "term"]
76+
hoverxref_roles = [
77+
"class", "meth", "func", "ref", "term", "obj", "mod", "data"
78+
]
7779
hoverxref_role_types = dict.fromkeys(hoverxref_roles, "tooltip")
7880
hoverxref_domains = ["py"]
7981
hoverxref_intersphinx = list(intersphinx_mapping.keys())

0 commit comments

Comments
 (0)