From acbaefccff320af85e24f1ef3a83891dc7cc0347 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Mon, 16 Dec 2024 10:36:37 -0500 Subject: [PATCH 1/4] change datetime formatting class --- docs/examples/shading/plot_martinez_shade_loss.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/docs/examples/shading/plot_martinez_shade_loss.py b/docs/examples/shading/plot_martinez_shade_loss.py index 625be33bc8..10ce77f741 100644 --- a/docs/examples/shading/plot_martinez_shade_loss.py +++ b/docs/examples/shading/plot_martinez_shade_loss.py @@ -47,7 +47,7 @@ import pandas as pd import numpy as np import matplotlib.pyplot as plt -from matplotlib.dates import ConciseDateFormatter +from matplotlib.dates import DateFormatter pitch = 4 # meters width = 1.5 # meters @@ -235,10 +235,6 @@ ax1.plot(times, shade_losses, label=k, linestyle=linestyle) ax1.legend(loc="upper center") ax1.grid() -ax1.set_xlabel("Time") -ax1.xaxis.set_major_formatter( - ConciseDateFormatter("%H:%M", tz="Europe/Madrid") -) ax1.set_ylabel(r"$P_{out}$ losses") ax1.set_title("Per module") @@ -248,9 +244,7 @@ ax2.legend(loc="upper center") ax2.grid() ax2.set_xlabel("Time") -ax2.xaxis.set_major_formatter( - ConciseDateFormatter("%H:%M", tz="Europe/Madrid") -) +ax2.xaxis.set_major_formatter(DateFormatter("%H:%M", tz="Europe/Madrid")) ax2.set_ylabel(r"$P_{out}$ losses") ax2.set_title("Per row") fig.tight_layout() From f5bb33577bec21d7caaa1aea5732e2b35ea304f3 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Mon, 16 Dec 2024 10:41:18 -0500 Subject: [PATCH 2/4] list `obj` in `hoverxref_roles` --- docs/sphinx/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index 157e77074a..e2a2c1c0d4 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -73,7 +73,7 @@ # Enable hover tooltips hoverxref_auto_ref = True -hoverxref_roles = ["class", "meth", "func", "ref", "term"] +hoverxref_roles = ["class", "meth", "func", "ref", "term", "obj"] hoverxref_role_types = dict.fromkeys(hoverxref_roles, "tooltip") hoverxref_domains = ["py"] hoverxref_intersphinx = list(intersphinx_mapping.keys()) From 3d9ebe548fec3a8a62fcfc5374ed46af359503f0 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Mon, 16 Dec 2024 10:50:25 -0500 Subject: [PATCH 3/4] list `mod` as well --- docs/sphinx/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index e2a2c1c0d4..012919ae08 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -73,7 +73,7 @@ # Enable hover tooltips hoverxref_auto_ref = True -hoverxref_roles = ["class", "meth", "func", "ref", "term", "obj"] +hoverxref_roles = ["class", "meth", "func", "ref", "term", "obj", "mod"] hoverxref_role_types = dict.fromkeys(hoverxref_roles, "tooltip") hoverxref_domains = ["py"] hoverxref_intersphinx = list(intersphinx_mapping.keys()) From 39d1777c572e035a8b918144aaaf1d061a5f27dd Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Mon, 16 Dec 2024 10:52:50 -0500 Subject: [PATCH 4/4] and `data` --- docs/sphinx/source/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index 012919ae08..a08507c0b3 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -73,7 +73,9 @@ # Enable hover tooltips hoverxref_auto_ref = True -hoverxref_roles = ["class", "meth", "func", "ref", "term", "obj", "mod"] +hoverxref_roles = [ + "class", "meth", "func", "ref", "term", "obj", "mod", "data" +] hoverxref_role_types = dict.fromkeys(hoverxref_roles, "tooltip") hoverxref_domains = ["py"] hoverxref_intersphinx = list(intersphinx_mapping.keys())