Skip to content

Commit

Permalink
some cleanups, update version
Browse files Browse the repository at this point in the history
  • Loading branch information
newville committed Jul 2, 2023
1 parent 1cdfed9 commit 11f7c98
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
11 changes: 5 additions & 6 deletions wxmplot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
data and customizing the plots and displays. wxmplot panels are more
interactive than typical displayss from matplotlib's pyplot module.
version: 0.9.49
last update: 2022-Mar-20
version: 0.9.56
last update: 2023-Jul-02
License: MIT
Author: Matthew Newville <newville@cars.uchicago.edu>
Center for Advanced Radiation Sources,
Expand All @@ -30,20 +30,19 @@
import sys
import wx

if sys.platform.lower() == 'darwin':
wx.PyApp.IsDisplayAvailable = lambda _: True

from .version import version as __version__
from .plotpanel import PlotPanel
from .imagepanel import ImagePanel

from .baseframe import BaseFrame
from .plotframe import PlotFrame


from .imageframe import ImageFrame
from .multiframe import MultiPlotFrame
from .stackedplotframe import StackedPlotFrame
from .residualplotframe import ResidualPlotFrame
from .imagematrixframe import ImageMatrixFrame
from .plotapp import PlotApp

if sys.platform.lower() == 'darwin':
wx.PyApp.IsDisplayAvailable = lambda _: True
24 changes: 11 additions & 13 deletions wxmplot/baseframe.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
#!/usr/bin/python
##
## wxmplot PlotFrame: a wx.Frame for line plotting, using matplotlib
##
"""
wxmplot PlotFrame: a wx.Frame for line plotting, using matplotlib
"""

from . import __version__
import os
import time
import wx
import matplotlib
from functools import partial

import wx
from wxutils import get_cwd

from . import __version__
from .plotpanel import PlotPanel
from .utils import MenuItem, fix_filename

Expand Down Expand Up @@ -91,26 +89,26 @@ def clear(self):
if self.panel is not None:
self.panel.clear()

def unzoom_all(self,event=None):
def unzoom_all(self, event=None):
"""zoom out full data range """
if self.panel is not None:
self.panel.unzoom_all(event=event)

def unzoom(self,event=None):
def unzoom(self, event=None):
"""zoom out 1 level, or to full data range """
if self.panel is not None: self.panel.unzoom(event=event)

def set_title(self,s):
def set_title(self, s):
"set plot title"
if self.panel is not None:
self.panel.set_title(s)

def set_xlabel(self,s):
def set_xlabel(self, s):
"set plot xlabel"
if self.panel is not None: self.panel.set_xlabel(s)
self.panel.canvas.draw()

def set_ylabel(self,s):
def set_ylabel(self, s):
"set plot xlabel"
if self.panel is not None: self.panel.set_ylabel(s)
self.panel.canvas.draw()
Expand Down Expand Up @@ -283,7 +281,7 @@ def BuildMenu(self):
mbar.Append(mhelp, '&Help')

self.SetMenuBar(mbar)
self.Bind(wx.EVT_CLOSE,self.onExit)
self.Bind(wx.EVT_CLOSE, self.onExit)

def BindMenuToPanel(self, panel=None):
pass
Expand Down

0 comments on commit 11f7c98

Please sign in to comment.