Changeset 8db20a9 in sasview for src/sas/qtgui/Plotting/Plotter2D.py
- Timestamp:
- Jan 21, 2019 8:15:40 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_sync_sascalc
- Children:
- d541324e
- Parents:
- 3ca645bb
- git-author:
- Piotr Rozyczko <piotr.rozyczko@…> (01/21/19 08:12:08)
- git-committer:
- Piotr Rozyczko <piotr.rozyczko@…> (01/21/19 08:15:40)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Plotting/Plotter2D.py
r21e71f1 r8db20a9 468 468 # check scale 469 469 if self.scale == 'log_{10}': 470 try: 471 if self.zmin is None and len(output[output > 0]) > 0: 472 zmin_temp = self.zmin 473 output[output > 0] = numpy.log10(output[output > 0]) 474 elif self.zmin <= 0: 475 zmin_temp = self.zmin 476 output[output > 0] = numpy.zeros(len(output)) 477 output[output <= 0] = MIN_Z 478 else: 479 zmin_temp = self.zmin 480 output[output > 0] = numpy.log10(output[output > 0]) 481 except: 482 #Too many problems in 2D plot with scale 483 pass 470 with numpy.errstate(all='ignore'): 471 output = numpy.log10(output) 472 index = numpy.isfinite(output) 473 if not index.all(): 474 cutoff = (numpy.quantile(output[index], 0.05) - numpy.log10(2) if index.any() else 0.) 475 output[output < cutoff] = cutoff 476 output[~index] = cutoff 477 vmin, vmax = None, None 484 478 485 479 self.cmap = cmap
Note: See TracChangeset
for help on using the changeset viewer.