Changeset 4552 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Aug 21, 2020 7:41:12 AM (16 months ago)
Author:
vondreele
Message:

reinstate wx.CallAfter? for ReloadFromGPX - needed to get reload to work properly
do AddToNotebook? inside reloadFromGPX after the load
Fix mpl 3.3 bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r4546 r4552  
    209209timeDebug = GSASIIpath.GetConfigValue('Show_timing',False)
    210210obsInCaption = True # include the observed, calc,... items in the plot caption (PlotPatterns)
     211mplv = eval(mpl.__version__.replace('.',','))
    211212
    212213#matplotlib 2.0.x dumbed down Paired to 16 colors -
     
    332333       
    333334    def ToolBarDraw(self):
    334         mplv = eval(mpl.__version__.replace('.',','))
    335335        if mplv[0] >= 3 and mplv[1] >= 3:
    336             self.toolbar.draw_idle()
     336            self.toolbar.canvas.draw_idle()
    337337        else:
    338338            self.toolbar.draw()
     
    1056510565    legend.delay = delay*1000 # Hold time in ms for clear; 0 == forever
    1056610566    for line in legend.get_lines():
    10567         line.set_picker(4)
     10567        if mplv[0] >= 3 and mplv[1] >= 3:
     10568            line.set_pickradius(4)
     10569        else:
     10570            line.set_picker(4)
    1056810571        # bug: legend items with single markers don't seem to respond to a "pick"
    1056910572    #GSASIIpath.IPyBreak()
    1057010573    for txt in legend.get_texts():
    10571         txt.set_picker(4)
     10574        if mplv[0] >= 3 and mplv[1] >= 3:
     10575            txt.set_pickradius(4)
     10576        else:
     10577            txt.set_picker(4)
    1057210578    if new:
    1057310579        legend.figure.canvas.mpl_connect('pick_event',onLegendPick)
Note: See TracChangeset for help on using the changeset viewer.