From dc6b66b61d883fc475df3e4f82a3b0b3b04bfef1 Mon Sep 17 00:00:00 2001 From: "Barnhart, Katherine (Katy) Ruth" Date: Tue, 14 Nov 2023 12:46:45 -0700 Subject: [PATCH 1/2] add documentation for imshow_norm and imshow_alpha --- doc/ClawPlotItem.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/ClawPlotItem.rst b/doc/ClawPlotItem.rst index b1629b2..f1c57c5 100644 --- a/doc/ClawPlotItem.rst +++ b/doc/ClawPlotItem.rst @@ -303,6 +303,19 @@ Special attributes for plot_type = '2d_imshow' frame to frame. Also, if AMR is used, they may vary from patch to patch, yielding very confusing plots. +.. attribute:: imshow_norm : matplotlib color norm + + As an alternative to setting *imshow_cmin* and *imshow_cmax*, provide + a `matplotlib color norm +`_ + to *imshow_norm*. This will be used to normalize the values of q into the + colorspace specified by the colormap. If *imshow_norm* is provided, it + will be used instead of *imshow_cmin* and *imshow_cmax*. + +.. attribute:: imshow_alpha : float + + The transparency value (between 0 [transparent] and 1 [opaque]). + .. attribute:: add_colorbar : bool If True, a colorbar is added to the plot. From c5c775f9deba67bcd61d97b9b339f71c95a1ff6c Mon Sep 17 00:00:00 2001 From: "Barnhart, Katherine (Katy) Ruth" Date: Mon, 8 Jan 2024 21:49:42 -0700 Subject: [PATCH 2/2] add notes about adding colorbar_tick_labels and colorbar_ticks. --- doc/ClawPlotItem.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/ClawPlotItem.rst b/doc/ClawPlotItem.rst index f1c57c5..c289491 100644 --- a/doc/ClawPlotItem.rst +++ b/doc/ClawPlotItem.rst @@ -310,7 +310,11 @@ Special attributes for plot_type = '2d_imshow' `_ to *imshow_norm*. This will be used to normalize the values of q into the colorspace specified by the colormap. If *imshow_norm* is provided, it - will be used instead of *imshow_cmin* and *imshow_cmax*. + will be used instead of *imshow_cmin* and *imshow_cmax*. + + It may be advantageous to also specify *plotitem.colorbar_ticks* and + *plotitem.colorbar_tick_labels* to enforce drawing of colorbar ticks + when using *imshow_norm*. .. attribute:: imshow_alpha : float