Phlya
Phlya

Reputation: 5976

Embed matplotlib in Quickly app?

I am new to programming in general and Quickly as a consequence. I would like to embed a Matplotlib graph into my Quickly application. I found some examples of how to do it with general pyGTK application, but I am not sure, how to use them with Quickly... I at least need matplotlib window to stop inactivating the main window.

I would be glad if you could help me with it and tell, what I would need to change in standard embedding code. The official example of that is here I just do not understand, how to apply it here...

I use Glade to design the interface, Quickly uses pygobject, not pyGTK, those are the main problems.

NEW:

I have found this And also as it seems I would have to use file init.py here, not the main file with all my code. It looks like this:

# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
'''
Some licensing information
'''
import optparse

import locale
from locale import gettext as _
locale.textdomain('chromograph')

from gi.repository import Gtk # pylint: disable=E0611

from chromograph import ChromographWindow

from chromograph_lib import set_up_logging, get_version

def parse_options():
    """Support for command line options"""
    parser = optparse.OptionParser(version="%%prog %s" % get_version())
    parser.add_option(
        "-v", "--verbose", action="count", dest="verbose",
        help=_("Show debug messages (-vv debugs chromograph_lib also)"))
    (options, args) = parser.parse_args()

    set_up_logging(options)

def main():
    'constructor for your class instances'
    parse_options()

    # Run the application.    
    window = ChromographWindow.ChromographWindow()
    window.show()
    Gtk.main()

Thanks in advance!

Upvotes: 0

Views: 165

Answers (0)

Related Questions