Changeset 4a4164c in sasview for plottools/src/danse
- Timestamp:
- Jan 20, 2012 6:11:03 PM (13 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- cdf515f
- Parents:
- 356d2d3
- Location:
- plottools/src/danse/common/plottools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plottools/src/danse/common/plottools/PlotPanel.py
rca58654 r4a4164c 324 324 Set the resizing (True/False) 325 325 """ 326 pass # Not imple eted326 pass # Not implemented 327 327 328 328 def schedule_full_draw(self, func='append'): … … 330 330 Put self in schedule to full redraw list 331 331 """ 332 pass # Not impleme ted332 pass # Not implemented 333 333 334 334 def add_toolbar(self): … … 1425 1425 cmap=self.cmap, zmin=zmin_2D_temp, 1426 1426 zmax=zmax_2D_temp) 1427 self.figure.canvas.draw_idle() 1427 1428 1428 1429 def image(self, data, qx_data, qy_data, xmin, xmax, ymin, ymax, … … 1479 1480 im = self.subplot.imshow(output, interpolation='nearest', 1480 1481 origin='lower', 1481 #vmin=zmin_temp, vmax=self.zmax_2D, 1482 cmap=self.cmap)#, 1483 #extent=(self.xmin_2D, self.xmax_2D, 1484 # self.ymin_2D, self.ymax_2D)) 1482 vmin=zmin_temp, vmax=self.zmax_2D, 1483 cmap=self.cmap, 1484 extent=(self.xmin_2D, self.xmax_2D, 1485 self.ymin_2D, self.ymax_2D)) 1486 1485 1487 cbax = self.subplot.figure.add_axes([0.84,0.2,0.02,0.7]) 1486 1488 else: 1487 1489 # clear the previous 2D from memory 1488 self.subplot.figure.clf() 1490 # mpl is not clf, so we do 1491 self.subplot.figure.clear() 1492 1489 1493 self.subplot.figure.subplots_adjust(left=0.1, right=.8, bottom=.1) 1490 1494 try: … … 1501 1505 Y = self.y_bins[0:-1] 1502 1506 X, Y = numpy.meshgrid(X, Y) 1503 1507 if len(X) > 60: 1508 ax.disable_mouse_rotation() 1504 1509 im = ax.plot_surface(X, Y, output, rstride=1, cstride=1, cmap=cmap, 1505 1510 linewidth=0, antialiased=False) 1506 1511 #ax.set_zlim3d(zmin_temp, self.zmax_2D) 1507 1512 #ax.set_frame_on(False) 1508 self.subplot.set_axis_off() 1513 self.subplot.set_axis_off() 1509 1514 1510 1515 if cbax == None: … … 1514 1519 cb.update_bruteforce(im) 1515 1520 cb.set_label('$' + self.scale + '$') 1516 1517 #if self.dimension != 3:1518 self.figure.canvas.draw_idle()1519 1521 1520 1522 def _build_matrix(self): -
plottools/src/danse/common/plottools/canvas.py
r7434020 r4a4164c 130 130 self.xaxis = None 131 131 self.yaxis = None 132 self.ndraw = 0 132 133 # Support for mouse wheel 133 134 self.Bind(wx.EVT_MOUSEWHEEL, self._onMouseWheel) … … 166 167 """ 167 168 # Check resize whether or not True 169 if self.panel.dimension == 3: 170 return 171 168 172 # This is for fast response when plot is being resized 169 173 if not self.resizing: … … 191 195 # Only draw if window is shown, otherwise graph will bleed through 192 196 # on the notebook style AUI widgets. 197 # raise 193 198 fig = FigureCanvasWxAgg 194 if self.IsShownOnScreen() :199 if self.IsShownOnScreen() and self.ndraw != 1: 195 200 self._isRendered = True 196 #self.panel.parent.refresh_floating(self.panel)197 201 self._get_axes_switch() 198 202 #import time … … 207 211 else: 208 212 self._isRendered = False 209 213 if self.ndraw <= 1: 214 self.ndraw += 1 215 210 216 def _onMouseWheel(self, evt): 211 217 """Translate mouse wheel events into matplotlib events"""
Note: See TracChangeset
for help on using the changeset viewer.