| 87 | |
| 88 | class PsychPlotFrame(wx.Frame): |
| 89 | def __init__(self, Tmin=263.15, Tmax=333.15, p=101.325, **kwargs): |
| 90 | |
| 91 | wx.Frame.__init__(self, None, title='Psychrometric plot', **kwargs) |
| 92 | |
| 93 | sizer = wx.BoxSizer(wx.HORIZONTAL) |
| 94 | self.PP = PlotPanel(self) |
| 95 | |
| 96 | self.PP.figure.delaxes(self.PP.ax) |
| 97 | self.PP.ax = self.PP.figure.add_axes((0.1, 0.1, 0.85, 0.85)) |
| 98 | |
| 99 | sizer.Add(self.PP, 1, wx.EXPAND) |
| 100 | self.SetSizer(sizer) |
| 101 | |
| 102 | PsychChart.p = p |
| 103 | PsychChart.Tdb = np.linspace(Tmin, Tmax) |
| 104 | |
| 105 | SL = PsychChart.SaturationLine() |
| 106 | SL.plot(self.PP.ax) |
| 107 | |
| 108 | RHL = PsychChart.HumidityLines([0.05, 0.1, 0.15, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]) |
| 109 | RHL.plot(self.PP.ax) |
| 110 | |
| 111 | HL = PsychChart.EnthalpyLines(range(-20, 100, 10)) |
| 112 | HL.plot(self.PP.ax) |
| 113 | |
| 114 | PF = PsychChart.PlotFormatting() |
| 115 | PF.plot(self.PP.ax) |
| 116 | |
| 117 | sizer.Layout() |
| 118 | |
| 119 | self.add_menu() |
| 120 | |
| 121 | self.PP.toolbar = WXToolbar(self.PP.canvas) |
| 122 | self.PP.toolbar.Realize() |
| 123 | self.PP.GetSizer().Add(self.PP.toolbar) |
| 124 | |
| 125 | self.PP.Layout() |
| 126 | |
| 127 | def add_menu(self): |
| 128 | # Menu Bar |