0

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!

Phlya
  • 5,726
  • 4
  • 35
  • 54
  • Can you give a bit more detail about what you have tried? – tacaswell Jan 10 '13 at 15:57
  • I actually don't understand, how to try it, because in the example the program the interface in code and, as I understand, it contains only matplotlib graph space. I use Glade to design the interface. – Phlya Jan 10 '13 at 16:01
  • You should add some text to your question that you are trying to get this to work with Glade as well. The guts of that example code is lines -4 and -3, which make a gtk object out of a matplotlib figure and then add said object to the gtk interface they are building. – tacaswell Jan 10 '13 at 16:07
  • OK, thank you. But they show at with pyGTK and Quickly uses pygobject - will it be important? – Phlya Jan 10 '13 at 16:09
  • I so much hoped to get an answer here... – Phlya Jan 10 '13 at 17:36

0 Answers0