here is the sample code "embedding_in_gtk2.py"
6 import gtk
7
8 from matplotlib.figure import Figure
9 from numpy import arange, sin, pi
10
11 # uncomment to select /GTK/GTKAgg/GTKCairo
12 #from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
13 from matplotlib.backends.
I am writing gtk2 application on python, I need to plot a chart in
separate window and i just use this code
def matplot_print(self, print_values):
"""\brief print data by matplotlib and shw the figure
\param print_values [(name - is a string, [(datetime, value)]
- is a list of
Here the code
>>
#!/usr/bin/env python
from pylab import figure, show
from matplotlib.dates import AutoDateLocator, AutoDateFormatter,
drange, DateFormatter
import datetime
import random
dates = drange(datetime.datetime(2010, 1, 1), datetime