diff --git a/pyrs/interface/ui/diffdataviews.py b/pyrs/interface/ui/diffdataviews.py index 51bed4acc..6ada694b7 100644 --- a/pyrs/interface/ui/diffdataviews.py +++ b/pyrs/interface/ui/diffdataviews.py @@ -45,8 +45,9 @@ def plot_pole_figure(self, vec_alpha, vec_beta, vec_intensity): # else: # plot contour # TODO - make the grid of r converted from linear grid on alpha + init_value = np.nan # np.nan self._myCanvas.plot_contour(vec_theta=vec_beta, vec_r=vec_r, vec_values=vec_intensity, max_r=90., - r_resolution=5., theta_resolution=5., init_value=np.nan) + r_resolution=5., theta_resolution=5., init_value=init_value) # TODO - convert (vec_r, vec_beta) to X, Y and do a scattering in another diff --git a/pyrs/interface/ui/mplgraphicsviewpolar.py b/pyrs/interface/ui/mplgraphicsviewpolar.py index 57d176837..24cb8375c 100644 --- a/pyrs/interface/ui/mplgraphicsviewpolar.py +++ b/pyrs/interface/ui/mplgraphicsviewpolar.py @@ -191,7 +191,10 @@ def plot_contour(self, vec_theta, vec_r, vec_values, max_r, r_resolution, theta_ # END-IF-ELSE # set value - mesh_values[index_theta, index_r] += value_i + if np.isnan(mesh_values[index_theta, index_r]): + mesh_values[index_theta, index_r] = value_i + else: + mesh_values[index_theta, index_r] += value_i # END-FOR # plot