File: plot_many_traces.py

package info (click to toggle)
wxmplot 0.9.58-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,052 kB
  • sloc: python: 10,085; makefile: 88; sh: 2
file content (25 lines) | stat: -rw-r--r-- 492 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/python
#

import wx
import numpy as np
import wxmplot

x   = np.linspace(0, 5, 201)

traces = []

for i in range(20):
    traces.append((x, np.sqrt(x)*np.sin(0.25*(i+1)*x)*np.exp(-x/2)))


app = wx.App()

pframe = wxmplot.PlotFrame(output_title='Plot Multiple')
pframe.plot_many(traces, title='Test Plotting 20 traces with plot_many()',
                 xlabel=r'x (mm)')

pframe.write_message('WXMPlot PlotFrame example: Try Help->Quick Reference')
pframe.Show()
#
app.MainLoop()