diff --git a/contrib/README.md b/contrib/README.md index 4313f9c..8e25b03 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -81,7 +81,8 @@ how many days of earnings history are considered when ranking channels. output. `--peer` accepts a nodeid, alias (via lightning-cli/listnodes), or SCID (via lightning-cli/listpeerchannels). The combo view includes a daily earnings panel (incoming/outgoing msat per day) when lightning-cli is - available. + available. Use `--title` to override the plot title (defaults to the peer + label; pass empty to omit). - **`plot-aggregate`** plots aggregate percentile summaries from the `fee-log-parser` sqlite output. Views include `baseline-base`, `baseline-ppm`, `size`, `balance`, `theory`, diff --git a/contrib/plot-fees b/contrib/plot-fees index d3899a9..24b4d09 100755 --- a/contrib/plot-fees +++ b/contrib/plot-fees @@ -335,6 +335,13 @@ def add_common_args(parser): action="store_true", help="Show the plot interactively.", ) + parser.add_argument( + "--title", + nargs="?", + const="", + default=None, + help="Plot title (defaults to peer label; pass empty to omit).", + ) parser.add_argument( "--since", dest="from_ts", @@ -593,7 +600,7 @@ def plot_single_view( fig, primary_ax, plot_axes = axes_factory(plt) plotter(*plot_axes, rows, args.peer_label) primary_ax.set_xlabel("time") - primary_ax.set_title(args.peer_label) + primary_ax.set_title(args.title) if use_plt_tight_layout: plt.tight_layout() @@ -1084,7 +1091,7 @@ def plot_combo(args): if all_times: ax_baseline.set_xlim(min(all_times), max(all_times)) - fig.suptitle(args.peer_label) + fig.suptitle(args.title) fig.tight_layout(rect=[0, 0, 1, 0.96]) fig.subplots_adjust(hspace=0.15) @@ -1127,6 +1134,7 @@ def main(): args.from_ts = parse_time_arg(args.from_ts) args.to_ts = parse_time_arg(args.to_ts) args.peer, args.peer_label = resolve_peer(args) + args.title = args.peer_label if args.title is None else args.title if not args.png and not args.show and not args.csv: raise SystemExit("use --png to save, --show to display, or --csv to export")