diff --git a/docs/src/_build/doctrees/environment.pickle b/docs/src/_build/doctrees/environment.pickle index c7a6cb5..f132590 100644 Binary files a/docs/src/_build/doctrees/environment.pickle and b/docs/src/_build/doctrees/environment.pickle differ diff --git a/docs/src/_build/html/tutorial-00.html b/docs/src/_build/html/tutorial-00.html index 5b9c824..8b17fc8 100644 --- a/docs/src/_build/html/tutorial-00.html +++ b/docs/src/_build/html/tutorial-00.html @@ -58,14 +58,6 @@
  • Contributors
  • License
  • Requirements
  • -
  • Installation
  • -
  • Command Line Usage
  • -
  • Python Usage
  • -
  • Contributing
  • -
  • Testing
  • -
  • Contributors
  • -
  • License
  • -
  • Requirements
  • Python Package
  • diff --git a/docs/src/_build/html/tutorial-01.html b/docs/src/_build/html/tutorial-01.html index 7d8d1c3..6094d33 100644 --- a/docs/src/_build/html/tutorial-01.html +++ b/docs/src/_build/html/tutorial-01.html @@ -65,14 +65,6 @@
  • Contributors
  • License
  • Requirements
  • -
  • Installation
  • -
  • Command Line Usage
  • -
  • Python Usage
  • -
  • Contributing
  • -
  • Testing
  • -
  • Contributors
  • -
  • License
  • -
  • Requirements
  • Python Package
  • diff --git a/docs/src/_build/html/tutorial-02.html b/docs/src/_build/html/tutorial-02.html index ea0ca8d..8fa936f 100644 --- a/docs/src/_build/html/tutorial-02.html +++ b/docs/src/_build/html/tutorial-02.html @@ -64,14 +64,6 @@
  • Contributors
  • License
  • Requirements
  • -
  • Installation
  • -
  • Command Line Usage
  • -
  • Python Usage
  • -
  • Contributing
  • -
  • Testing
  • -
  • Contributors
  • -
  • License
  • -
  • Requirements
  • Python Package
  • diff --git a/docs/src/_build/html/tutorial-03.html b/docs/src/_build/html/tutorial-03.html index 95a5234..2070a37 100644 --- a/docs/src/_build/html/tutorial-03.html +++ b/docs/src/_build/html/tutorial-03.html @@ -63,14 +63,6 @@
  • Contributors
  • License
  • Requirements
  • -
  • Installation
  • -
  • Command Line Usage
  • -
  • Python Usage
  • -
  • Contributing
  • -
  • Testing
  • -
  • Contributors
  • -
  • License
  • -
  • Requirements
  • Python Package
  • diff --git a/docs/src/_build/html/tutorial-04.html b/docs/src/_build/html/tutorial-04.html index 7f6047f..b794b07 100644 --- a/docs/src/_build/html/tutorial-04.html +++ b/docs/src/_build/html/tutorial-04.html @@ -64,14 +64,6 @@
  • Contributors
  • License
  • Requirements
  • -
  • Installation
  • -
  • Command Line Usage
  • -
  • Python Usage
  • -
  • Contributing
  • -
  • Testing
  • -
  • Contributors
  • -
  • License
  • -
  • Requirements
  • Python Package
  • diff --git a/docs/src/_build/html/tutorial-05.html b/docs/src/_build/html/tutorial-05.html index b2c3ef9..7940d95 100644 --- a/docs/src/_build/html/tutorial-05.html +++ b/docs/src/_build/html/tutorial-05.html @@ -64,14 +64,6 @@
  • Contributors
  • License
  • Requirements
  • -
  • Installation
  • -
  • Command Line Usage
  • -
  • Python Usage
  • -
  • Contributing
  • -
  • Testing
  • -
  • Contributors
  • -
  • License
  • -
  • Requirements
  • Python Package
  • diff --git a/docs/src/_build/html/tutorial-06.html b/docs/src/_build/html/tutorial-06.html index fb244eb..b1b3f96 100644 --- a/docs/src/_build/html/tutorial-06.html +++ b/docs/src/_build/html/tutorial-06.html @@ -62,14 +62,6 @@
  • Contributors
  • License
  • Requirements
  • -
  • Installation
  • -
  • Command Line Usage
  • -
  • Python Usage
  • -
  • Contributing
  • -
  • Testing
  • -
  • Contributors
  • -
  • License
  • -
  • Requirements
  • Python Package
  • diff --git a/docs/src/_build/html/tutorial-0X.html b/docs/src/_build/html/tutorial-0X.html index ce28fc7..91c22c9 100644 --- a/docs/src/_build/html/tutorial-0X.html +++ b/docs/src/_build/html/tutorial-0X.html @@ -63,14 +63,6 @@
  • Contributors
  • License
  • Requirements
  • -
  • Installation
  • -
  • Command Line Usage
  • -
  • Python Usage
  • -
  • Contributing
  • -
  • Testing
  • -
  • Contributors
  • -
  • License
  • -
  • Requirements
  • Python Package
  • diff --git a/docs/src/_build/html/tutorials.html b/docs/src/_build/html/tutorials.html index afe4583..437ff05 100644 --- a/docs/src/_build/html/tutorials.html +++ b/docs/src/_build/html/tutorials.html @@ -58,14 +58,6 @@
  • Contributors
  • License
  • Requirements
  • -
  • Installation
  • -
  • Command Line Usage
  • -
  • Python Usage
  • -
  • Contributing
  • -
  • Testing
  • -
  • Contributors
  • -
  • License
  • -
  • Requirements
  • Python Package
  • diff --git a/tests/test_plot/test_heatmap.py b/tests/test_plot/test_heatmap.py index b6c7597..1333a52 100644 --- a/tests/test_plot/test_heatmap.py +++ b/tests/test_plot/test_heatmap.py @@ -172,8 +172,8 @@ def test_default(self, mock_colourbar, mock_resolve, mock_interpolate, mock_zt): mock_zt.return_value = self.data2 mock_interpolate.return_value = (self.data, self.data) mock_resolve.return_value = self.data - cbar = heatmap.add_ztmap(self.ax, self.data, xinterp=None, - yinterp=None) + cbar = heatmap.add_ztmap(self.ax, self.data, kdata=self.data, + xinterp=None, yinterp=None) self.ax.pcolormesh.assert_called_once() self.ax.set_xscale.assert_called_once_with('linear') diff --git a/tp/plot/heatmap.py b/tp/plot/heatmap.py index 01a8f55..5d949e9 100644 --- a/tp/plot/heatmap.py +++ b/tp/plot/heatmap.py @@ -478,7 +478,7 @@ def add_pfdiff(ax, data1, data2, direction='avg', xinterp=200, yinterp=200, return cbar, h, l -def add_ztmap(ax, data, kdata=None, direction='avg', xinterp=200, +def add_ztmap(ax, data, kdata=1., direction='avg', xinterp=200, yinterp=200, kind='linear', xmin=None, xmax=None, ymin=None, ymax=None, cmin=None, cmax=None, colour='viridis', **kwargs): """Convenience wrapper for plotting ZT heatmaps. @@ -562,6 +562,8 @@ def add_ztmap(ax, data, kdata=None, direction='avg', xinterp=200, data = tp.data.utilities.resolve(data, 'zt', direction=direction) else: data = tp.data.utilities.resolve(data, equants, direction=direction) + if kdata is None: + kdata = 1. if not isinstance(kdata, (int, float)): kdata = tp.data.utilities.resolve(kdata, ltc, direction=direction) @@ -592,7 +594,7 @@ def add_ztmap(ax, data, kdata=None, direction='avg', xinterp=200, return cbar -def add_ztdiff(ax, data1, data2, kdata1=None, kdata2=None, direction='avg', +def add_ztdiff(ax, data1, data2, kdata1=1., kdata2=1., direction='avg', xinterp=200, yinterp=200, kind='linear', xmin=None, xmax=None, ymin=None, ymax=None, cmin=None, cmax=None, colour1='#800080', colour2='#FF8000', midcolour='#FFFFFF', label1=None, @@ -692,6 +694,8 @@ def add_ztdiff(ax, data1, data2, kdata1=None, kdata2=None, direction='avg', else: data[i] = tp.data.utilities.resolve(data[i], equants, direction=direction) + if kdata[i] is None: + kdata[i] = 1. if not isinstance(kdata[i], (int, float)): kdata[i] = tp.data.utilities.resolve(kdata[i], ltc, direction=direction)