[Matplotlib-users] MatplotlibDeprecationWarning
Hi, I get the following warning in some code I wrote for matplotlib-1.2. python2.7/site-packages/matplotlib-1.5.0-py2.7-linux-x86_64.egg/matplotlib/artist.py:221: MatplotlibDeprecationWarning: This has been deprecated in mpl 1.5, please use the axes property. A removal date has not been set. warnings.warn(_get_axes_msg, mplDeprecation, stacklevel=1) Clearly, I should use 'the axes property', but as a replacement for? The code base is relatively large, so it's not clear to me what triggers the warning. Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Overgaden Oven Vandet 106, 4.tv | phone: +45-29716388 | | DK-1415 København K | email: mads.ip...@gmail.com | | Denmark | map : https://goo.gl/maps/oQ6y6 | +--+--+ -- Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741551=/4140 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] FigureCanvasQTAgg clean up
On 01/30/2013 05:03 PM, Benjamin Root wrote: On Tue, Jan 29, 2013 at 5:12 PM, Mads Ipsen mads.ip...@gmail.com mailto:mads.ip...@gmail.com wrote: Hi, I spend some time writing up the question below on Stackoverflow which immediately was closed as a duplicate of other posts. To my best knowledge, these posts did not answer my questions - so I'll try my luck here instead: I am using the qt backengine for setting up a QWidget that embeds a matplotlib scene. When the widget is closed it appears that many of the matplotlib objects that were part of the plot still are alive in Python space. My question is basically the following: What actions should I take to clean up the figure and axes objects etc. that were part of the plot widget? The qt backend comes with a figure manager, but it appears a little unclear how it should be used. I have attached a small unit test example that sets up a plot. When the plot appears, just close it, and the test will garbage collects the plot, and then display info of the matplotlib objects that are still alive in Python space. Clearly both the path of the plot, and several Bbox objects are still referenced. Our current unit test suite contains almost 1 GUI tests and its imperative that proper object space clean up is done after each test. Any help is much appreciated. Best regards, Mads Would fig.clf() do what you need? Ben Root Thanks for the feedback. The trick is to get this done automatically when the widget is closed. If you look in backend_qt4.py in the constructor of FigureCanvasQT you'll find QtCore.QObject.connect(self, QtCore.SIGNAL('destroyed()'), self.close_event) which should perform the steps below when close_event is called event = CloseEvent(s, self, guiEvent=guiEvent) self.callbacks.process(s, event) If I insert print statements, the signal is ignored with matplotlib 1.1.0, but called with 1.2.0 (which uses a lambda function in the above connection).But inspecting pythons objects after the close() method is called on the widget, it seems that - at least - the paths associated with plot actually still exist. So I'm just a bit worried if there already is existing functionality in the FigureCanvasQTAgg object that can do these things for me. And if so, how to use them? Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com | +--+--+ -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_jan___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] FigureCanvasQTAgg clean up
Hi, I spend some time writing up the question below on Stackoverflow which immediately was closed as a duplicate of other posts. To my best knowledge, these posts did not answer my questions - so I'll try my luck here instead: I am using the qt backengine for setting up a QWidget that embeds a matplotlib scene. When the widget is closed it appears that many of the matplotlib objects that were part of the plot still are alive in Python space. My question is basically the following: What actions should I take to clean up the figure and axes objects etc. that were part of the plot widget? The qt backend comes with a figure manager, but it appears a little unclear how it should be used. I have attached a small unit test example that sets up a plot. When the plot appears, just close it, and the test will garbage collects the plot, and then display info of the matplotlib objects that are still alive in Python space. Clearly both the path of the plot, and several Bbox objects are still referenced. Our current unit test suite contains almost 1 GUI tests and its imperative that proper object space clean up is done after each test. Any help is much appreciated. Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com | +--+--+ import sys import gc import numpy import unittest from PyQt4 import QtCore, QtGui from matplotlib.figure import Figure from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg # Need a Qt app to handle events QT_APP = QtGui.QApplication(sys.argv) class Plot2D(QtGui.QWidget): 2D Plot class based on a matplotlib canvas. def __init__(self, parent=None, testing=False): Constructor. @param parent : Parent widget. @param testing : Set to True if testing # Initialize base class QtGui.QWidget.__init__(self, parent) # Set a layout layout = QtGui.QVBoxLayout() self.setLayout(layout) # Set up figure self._figure = Figure() self._canvas = FigureCanvasQTAgg(self._figure) # Add widgets to the layout layout.addWidget(self._canvas) # Draw something self._axes = self._figure.add_subplot(111) self.draw() def draw(self): Redraws a figure. Added for unit testing purposes but may also be used for inspiration on how to make a plot. str = '1 2 3 4' data = map(int, str.split()) x = range(len(data)) # clear the axes and redraw the plot anew self._axes.clear() self._axes.bar( left=x, height=data, width=8.0/ 100.0, align='center', alpha=0.44, picker=5) t = numpy.arange(0.0, 3.0, 0.01) s = numpy.sin(2*numpy.pi*t) self._axes.plot(t, s, picker=5) self._axes.set_title('This is a title') self._axes.set_xlabel('Clock is ticking') self._axes.set_ylabel('Time is running') self._canvas.draw() class Plot2DTest(unittest.TestCase): def setUp(self): self._plot = Plot2D() def tearDown(self): self._plot.close() del self._plot gc.collect() @classmethod def tearDownClass(cls): QtGui.qApp.processEvents() print print 'Performing tear down for', cls print 'Active matplotlib objects\n--:' objs = [o for o in gc.get_objects() if 'matplotlib' in str(type(o))] for o in objs: print o def testConstruction(self): Test that class instantiation suceeds self._plot.show() QtGui.qApp.exec_() if __name__ == '__main__': unittest.main() -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Line2D visible in axes
Hi, I have an 'axes' and some Line2D instance 'line' which is part of the axes artists. Suppose the plot has been zoomed so only a small window of the original axes is visible. Is there a fast/convenient method that can be used to test if a Line2D object is visible at the current zoom level. Of course you can test with data = line.get_xydata() (x_0, x_1) = axes.get_xlim() (y_0, y_1) = axes.get_ylim() invisible_x = (data[:,0].max() x_0) or (data[:,0].min() x_1) invisible_y = (data[:,1].max() y_0) or (data[:,1].min() y_1) but there might be something more convenient method/approach for this. Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com | +--+--+ -- Keep yourself connected to Go Parallel: BUILD Helping you discover the best ways to construct your parallel projects. http://goparallel.sourceforge.net___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Label for axhline
Hi, I would like to add a label or tick label for an axhline(), in such a way that the labels follows the location of the hline. The x-coordinate of the label should be in screen coordinates (a little to the right of the plot) - but the y-coordinate should be in data coordinates. Any good suggestions? Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com | +--+--+ -- Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Label for axhline
Sterling, Thanks - I ended up adding an extra y-tick with minor=True. Something along these lines: # Add Fermi line y = self._bandstructure.fermiLevel() self._axes.axhline(y=y, linestyle=':') # Add Fermi tick tick = self._axes.set_yticks([y], minor=True)[0] tick.label1On = False tick.label2On = True self._axes.set_yticklabels([r'$\epsilon_\mathrm{F}$'], minor=True, fontsize=font_size*1.19, verticalalignment='center') Evil? On 28/11/2012 17:35, Sterling Smith wrote: Mads, I recommend trying a text object[1], with a transform which is a blended transform from a transform factory[2]. Also, you probably want the x coordinate in axes coordinates, with a left horizontal alignment. -Sterling [1] http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.text [2] http://matplotlib.org/users/transforms_tutorial.html#blended-transformations On Nov 28, 2012, at 4:27AM, Mads Ipsen wrote: Hi, I would like to add a label or tick label for an axhline(), in such a way that the labels follows the location of the hline. The x-coordinate of the label should be in screen coordinates (a little to the right of the plot) - but the y-coordinate should be in data coordinates. Any good suggestions? Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com | +--+--+ -- Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com | +--+--+ -- Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Updating a colorbar
Hi, Suppose you do this: axes = self.figure().get_axes() contour = axes.contourf(x,y,z) colorbar = self.figure().colorbar(contour) Suppose that the contour data changes, can you update the colorbar with the new data? Currently I remove the colorbar and insert a new one - but I have a feeling that something smarter could be done. Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com | +--+--+ -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Tick label text
I want to make some mods to a few selected tick labels. For example, if I do label = axes.yaxis.get_major_ticks()[2].label label.set_fontsize(size) label.set_rotation('vertical') the font size and the orientation of the tick label is changed. However, if try label.set_text('Foo') the tick label is *not* modified. Any clues? Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com | +--+--+ -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Resizing a PyQt based mpl window
Hi, I have attached a small example displaying a simple plot in a PyQt based widget. If you start resizing the widget manually, the labels of the axes as well as the title disappear from the plot window even for moderately small window sizes. Any suggestions on how I can fix this? Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com | +--+--+ import sys from PyQt4 import QtGui from matplotlib.figure import Figure from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg import matplotlib.backends.qt4_editor.figureoptions as figureoptions class Plot2D(QtGui.QWidget): 2D Plot class based on a matplotlib canvas. def __init__(self, parent=None, testing=False): # Initialize base class QtGui.QWidget.__init__(self, parent) # Set a layout layout = QtGui.QVBoxLayout() self.setLayout(layout) # Widget to hold the canvas self._plot_widget = QtGui.QWidget() # Set up figure self._figure = Figure() self._canvas = FigureCanvasQTAgg(self._figure) self._canvas.setParent(self._plot_widget) # Add widgets to the layout layout.addWidget(self._canvas) # Draw somthing self.axes = self._figure.add_subplot(111) self.draw() def draw(self): Redraws a figure. Added for unit testing purposes but may also be used for inspiration on how to make a plot. import numpy str = '1 2 3 4' data = map(int, str.split()) x = range(len(data)) # clear the axes and redraw the plot anew self.axes.clear() self.axes.bar( left=x, height=data, width=8.0/ 100.0, align='center', alpha=0.44, picker=5) t = numpy.arange(0.0, 3.0, 0.01) s = numpy.sin(2*numpy.pi*t) self.axes.plot(t, s, picker=5) self.axes.set_title('This is a title') self.axes.set_xlabel('Clock is ticking') self.axes.set_ylabel('Time is running') self._canvas.draw() if __name__ == __main__: app = QtGui.QApplication(sys.argv) widget = Plot2D() widget.show() sys.exit(app.exec_()) # qApp = QtGui.QApplication(sys.argv) # aw = ApplicationWindow() # aw.setWindowTitle(%s % progname) # aw.show() # sys.exit(qApp.exec_()) -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Build on VS2008 - warnings
On 15/11/2011 14:45, Michael Droettboom wrote: I'd love to see the compiler logs and try to fix what I can. I don't have a Windows install to test, but maybe I can resolve the more obvious ones. Mike On 11/08/2011 05:49 AM, Mads Ipsen wrote: Hi, Thanks to the help from Christoph, I have been able to build matplotlib-1.1.0 on both Win XP-32 and 64. I have noticed though, that quite a few warnings are produced when the source is compiled. Is this something that the core developers would like to fix, or is it a 'don't care' thing? If the info is useful, I'd be happy to post it somewhere. Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email:mads.ip...@gmail.com | +--+--+ -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users Attached, you'll find the build log from a gcc based build on Ubuntu 11.04 (64): Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.5-15ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --with-multiarch-defaults=x86_64-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/x86_64-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib/x86_64-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.4.5 (Ubuntu/Linaro 4.4.5-15ubuntu1) Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com | +--+--+ running build_ext building 'matplotlib.ft2font' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/src creating build/temp.linux-x86_64-2.7/CXX gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/home/mpi/git/quantumsource/external-libs/build/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/home/mpi/git/quantumsource/external-libs/build/include/python2.7 -c src/ft2font.cpp -o build/temp.linux-x86_64-2.7/src/ft2font.o gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/home/mpi/git/quantumsource/external-libs/build/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/home/mpi/git/quantumsource/external-libs/build/include/python2.7 -c src/mplutils.cpp -o build/temp.linux-x86_64-2.7/src/mplutils.o gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/home/mpi/git/quantumsource/external-libs/build/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/home/mpi/git/quantumsource/external-libs/build/include/python2.7 -c CXX/IndirectPythonInterface.cxx -o build/temp.linux-x86_64-2.7/CXX/IndirectPythonInterface.o gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/home/mpi/git/quantumsource/external-libs/build/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr
[Matplotlib-users] Build on VS2008 - warnings
Hi, Thanks to the help from Christoph, I have been able to build matplotlib-1.1.0 on both Win XP-32 and 64. I have noticed though, that quite a few warnings are produced when the source is compiled. Is this something that the core developers would like to fix, or is it a 'don't care' thing? If the info is useful, I'd be happy to post it somewhere. Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com | +--+--+ -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Build MPL with VS 2008 problem
On 11/02/2011 09:46 PM, Christoph Gohlke wrote: On 11/2/2011 1:39 PM, Mads Ipsen wrote: On 11/02/2011 09:28 PM, Christoph Gohlke wrote: On 11/2/2011 1:11 PM, Mads Ipsen wrote: On 11/02/2011 08:43 PM, Michael Droettboom wrote: On 11/02/2011 01:34 PM, Mads Ipsen wrote: On 11/02/2011 05:50 PM, Michael Droettboom wrote: On 11/02/2011 10:53 AM, Mads Ipsen wrote: Any clues to why ft2build.h cannot be located. The above docs says it should be part of the binary installer. The binary for freetype is included with the installer, but the headers (needed to build, but not to run) are not. Do you need to build matplotlib from source, or just use it? Mike I need to built it from source. Mads In that case, you will need to install the development packages for freetype, libpng, libz, and numpy. I'm not a regular Windows user, so I don't know what the best practice is for that these days. Some of the other members on this list can hopefully jump in. There was also a thread on this list about Building on Windows from 08/18/2011 that might be helpful. Mike -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.netmailto:Matplotlib-users@lists.sourceforge.net mailto:Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users I can't seem to find this thread anywhere. It it really that difficult to build on Windows? It most be documented somewhere what the prereqs are? Seehttp://sourceforge.net/mailarchive/message.php?msg_id=27961105 and http://matplotlib.sourceforge.net/users/installing.html#build-requirements Prebuilt static link libraries for msvc compilers are available at http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib. It seems you are trying to compile from within cygwin, using the include files provided by cygwin. That will probably not work. Christoph Best regards, Mads -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.netmailto:Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users I am building from the VS2008 command prompt. But thanks for the info. Will have a look. Best regards, Mads OK. The cygwin in your home path looked suspicious: c:\cygwin\home\mads ipsen\ Christoph -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users Hi, I am now done with the 32 bit case and am trying to do the same for 64 bit now. Here I get the error: Creating library build\temp.win32-2.7\Release\src\ft2font.lib and object buil d\temp.win32-2.7\Release\src\ft2font.exp ft2font.obj : error LNK2019: unresolved external symbol _FT_Set_Transform refere nced in function public: class Py::Object __thiscall FT2Font::set_size(class Py ::Tuple const ) (?set_size@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@@Z) ft2font.obj : error LNK2019: unresolved external symbol _FT_Set_Char_Size refere nced in function public: class Py::Object __thiscall FT2Font::set_size(class Py ::Tuple const ) (?set_size@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@@Z) ft2font.obj : error LNK2019: unresolved external symbol _FT_Set_Charmap referenc ed in function public: class Py::Object __thiscall FT2Font::set_charmap(class P y::Tuple const ) (?set_charmap@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@@Z) ft2font.obj : error LNK2019: unresolved external symbol _FT_Select_Charmap refer enced in function public: class Py::Object __thiscall FT2Font::select_charmap(c lass Py::Tuple const ) (?select_charmap@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@@ Z) I am using the msvcr90-x64 version of the libraries downloaded from http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib Wrong libraries? Bestregards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com | +--+--+ -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa
Re: [Matplotlib-users] Build MPL with VS 2008 problem
On 11/03/2011 04:34 PM, Christoph Gohlke wrote: On 11/3/2011 6:45 AM, Mads Ipsen wrote: On 11/02/2011 09:46 PM, Christoph Gohlke wrote: On 11/2/2011 1:39 PM, Mads Ipsen wrote: On 11/02/2011 09:28 PM, Christoph Gohlke wrote: On 11/2/2011 1:11 PM, Mads Ipsen wrote: On 11/02/2011 08:43 PM, Michael Droettboom wrote: On 11/02/2011 01:34 PM, Mads Ipsen wrote: On 11/02/2011 05:50 PM, Michael Droettboom wrote: On 11/02/2011 10:53 AM, Mads Ipsen wrote: Any clues to why ft2build.h cannot be located. The above docs says it should be part of the binary installer. The binary for freetype is included with the installer, but the headers (needed to build, but not to run) are not. Do you need to build matplotlib from source, or just use it? Mike I need to built it from source. Mads In that case, you will need to install the development packages for freetype, libpng, libz, and numpy. I'm not a regular Windows user, so I don't know what the best practice is for that these days. Some of the other members on this list can hopefully jump in. There was also a thread on this list about Building on Windows from 08/18/2011 that might be helpful. Mike -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.netmailto:Matplotlib-users@lists.sourceforge.net mailto:Matplotlib-users@lists.sourceforge.net mailto:Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users I can't seem to find this thread anywhere. It it really that difficult to build on Windows? It most be documented somewhere what the prereqs are? Seehttp://sourceforge.net/mailarchive/message.php?msg_id=27961105and http://matplotlib.sourceforge.net/users/installing.html#build-requirements Prebuilt static link libraries for msvc compilers are available at http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib. It seems you are trying to compile from within cygwin, using the include files provided by cygwin. That will probably not work. Christoph Best regards, Mads -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.netmailto:Matplotlib-users@lists.sourceforge.net mailto:Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users I am building from the VS2008 command prompt. But thanks for the info. Will have a look. Best regards, Mads OK. The cygwin in your home path looked suspicious:c:\cygwin\home\mads ipsen\ Christoph -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.netmailto:Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users Hi, I am now done with the 32 bit case and am trying to do the same for 64 bit now. Here I get the error: Creating library build\temp.win32-2.7\Release\src\ft2font.lib and object buil d\temp.win32-2.7\Release\src\ft2font.exp ft2font.obj : error LNK2019: unresolved external symbol _FT_Set_Transform refere nced in function public: class Py::Object __thiscall FT2Font::set_size(class Py ::Tuple const) (?set_size@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@@Z) ft2font.obj : error LNK2019: unresolved external symbol _FT_Set_Char_Size refere nced in function public: class Py::Object __thiscall FT2Font::set_size(class Py ::Tuple const) (?set_size@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@@Z) ft2font.obj : error LNK2019: unresolved external symbol _FT_Set_Charmap referenc ed in function public: class Py::Object __thiscall FT2Font::set_charmap(class P y::Tuple const) (?set_charmap@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@@Z) ft2font.obj : error LNK2019: unresolved external symbol _FT_Select_Charmap refer enced in function public: class Py::Object __thiscall FT2Font::select_charmap(c lass Py::Tuple const) (?select_charmap@FT2Font@@QAE?AVObject@Py@@ABVTuple@3@@ Z) I am using the msvcr90-x64 version of the libraries downloaded from http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib Wrong libraries? Bestregards, Mads Creating library build\temp.win32-2.7 ... You are likely using a 32 bit compiler or Python. Christoph -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1
[Matplotlib-users] Build MPL with VS 2008 problem
Hi, I am trying to build MPL 1.1.0 with VS 2008 on Windows XP 32. I have installed * Python 2.7.2 * Numpy 1.6 In the docs it says Windows users only need the first two (python and numpy) since the others are built into the matplotlib Windows installers available for download at the sourceforge site. OK, so I also downloaded matplotlib-1.1.0.win32-py2.7.exe and installed that. Now I cd to the matplotlib-1.1.0 directory and issue python setup.py build and get the following error. C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W 3 /GS- /DNDEBUG -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -Ic :\Python27\lib\site-packages\numpy\core\include -I. -Ic:\Python27\lib\site-packa ges\numpy\core\include\freetype2 -I.\freetype2 -Ic:\Python27\include -Ic:\Python 27\PC /Tpsrc/ft2font.cpp /Fobuild\temp.win32-2.7\Release\src/ft2font.obj ft2font.cpp C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C 4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc c:\cygwin\home\mads ipsen\matplotlib-1.1.0\src\ft2font.h(16) : fatal error C1083 : Cannot open include file: 'ft2build.h': No such file or directory error: command 'C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe' fa iled with exit status 2 Any clues to why ft2build.h cannot be located. The above docs says it should be part of the binary installer. Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com | +--+--+ -- RSA#174; Conference 2012 Save $700 by Nov 18 Register now#33; http://p.sf.net/sfu/rsa-sfdev2dev1___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Build MPL with VS 2008 problem
On 11/02/2011 05:50 PM, Michael Droettboom wrote: On 11/02/2011 10:53 AM, Mads Ipsen wrote: Hi, I am trying to build MPL 1.1.0 with VS 2008 on Windows XP 32. I have installed * Python 2.7.2 * Numpy 1.6 In the docs it says Windows users only need the first two (python and numpy) since the others are built into the matplotlib Windows installers available for download at the sourceforge site. OK, so I also downloaded matplotlib-1.1.0.win32-py2.7.exe and installed that. Now I cd to the matplotlib-1.1.0 directory and issue python setup.py build and get the following error. C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W 3 /GS- /DNDEBUG -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -Ic :\Python27\lib\site-packages\numpy\core\include -I. -Ic:\Python27\lib\site-packa ges\numpy\core\include\freetype2 -I.\freetype2 -Ic:\Python27\include -Ic:\Python 27\PC /Tpsrc/ft2font.cpp /Fobuild\temp.win32-2.7\Release\src/ft2font.obj ft2font.cpp C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C 4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc c:\cygwin\home\mads ipsen\matplotlib-1.1.0\src\ft2font.h(16) : fatal error C1083 : Cannot open include file: 'ft2build.h': No such file or directory error: command 'C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe' fa iled with exit status 2 Any clues to why ft2build.h cannot be located. The above docs says it should be part of the binary installer. The binary for freetype is included with the installer, but the headers (needed to build, but not to run) are not. Do you need to build matplotlib from source, or just use it? Mike -- RSA#174; Conference 2012 Save $700 by Nov 18 Register now#33; http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users I need to built it from source. Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com | +--+--+ -- RSA#174; Conference 2012 Save $700 by Nov 18 Register now#33; http://p.sf.net/sfu/rsa-sfdev2dev1___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Build MPL with VS 2008 problem
On 11/02/2011 08:43 PM, Michael Droettboom wrote: On 11/02/2011 01:34 PM, Mads Ipsen wrote: On 11/02/2011 05:50 PM, Michael Droettboom wrote: On 11/02/2011 10:53 AM, Mads Ipsen wrote: Any clues to why ft2build.h cannot be located. The above docs says it should be part of the binary installer. The binary for freetype is included with the installer, but the headers (needed to build, but not to run) are not. Do you need to build matplotlib from source, or just use it? Mike I need to built it from source. Mads In that case, you will need to install the development packages for freetype, libpng, libz, and numpy. I'm not a regular Windows user, so I don't know what the best practice is for that these days. Some of the other members on this list can hopefully jump in. There was also a thread on this list about Building on Windows from 08/18/2011 that might be helpful. Mike -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users I can't seem to find this thread anywhere. It it really that difficult to build on Windows? It most be documented somewhere what the prereqs are? Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com | +--+--+ -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Build MPL with VS 2008 problem
On 11/02/2011 09:28 PM, Christoph Gohlke wrote: On 11/2/2011 1:11 PM, Mads Ipsen wrote: On 11/02/2011 08:43 PM, Michael Droettboom wrote: On 11/02/2011 01:34 PM, Mads Ipsen wrote: On 11/02/2011 05:50 PM, Michael Droettboom wrote: On 11/02/2011 10:53 AM, Mads Ipsen wrote: Any clues to why ft2build.h cannot be located. The above docs says it should be part of the binary installer. The binary for freetype is included with the installer, but the headers (needed to build, but not to run) are not. Do you need to build matplotlib from source, or just use it? Mike I need to built it from source. Mads In that case, you will need to install the development packages for freetype, libpng, libz, and numpy. I'm not a regular Windows user, so I don't know what the best practice is for that these days. Some of the other members on this list can hopefully jump in. There was also a thread on this list about Building on Windows from 08/18/2011 that might be helpful. Mike -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.netmailto:Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users I can't seem to find this thread anywhere. It it really that difficult to build on Windows? It most be documented somewhere what the prereqs are? Seehttp://sourceforge.net/mailarchive/message.php?msg_id=27961105 and http://matplotlib.sourceforge.net/users/installing.html#build-requirements Prebuilt static link libraries for msvc compilers are available at http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib. It seems you are trying to compile from within cygwin, using the include files provided by cygwin. That will probably not work. Christoph Best regards, Mads -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users I am building from the VS2008 command prompt. But thanks for the info. Will have a look. Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com | +--+--+ -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Build MPL with VS 2008 problem
On 11/02/2011 09:46 PM, Christoph Gohlke wrote: On 11/2/2011 1:39 PM, Mads Ipsen wrote: On 11/02/2011 09:28 PM, Christoph Gohlke wrote: On 11/2/2011 1:11 PM, Mads Ipsen wrote: On 11/02/2011 08:43 PM, Michael Droettboom wrote: On 11/02/2011 01:34 PM, Mads Ipsen wrote: On 11/02/2011 05:50 PM, Michael Droettboom wrote: On 11/02/2011 10:53 AM, Mads Ipsen wrote: Any clues to why ft2build.h cannot be located. The above docs says it should be part of the binary installer. The binary for freetype is included with the installer, but the headers (needed to build, but not to run) are not. Do you need to build matplotlib from source, or just use it? Mike I need to built it from source. Mads In that case, you will need to install the development packages for freetype, libpng, libz, and numpy. I'm not a regular Windows user, so I don't know what the best practice is for that these days. Some of the other members on this list can hopefully jump in. There was also a thread on this list about Building on Windows from 08/18/2011 that might be helpful. Mike -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.netmailto:Matplotlib-users@lists.sourceforge.net mailto:Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users I can't seem to find this thread anywhere. It it really that difficult to build on Windows? It most be documented somewhere what the prereqs are? Seehttp://sourceforge.net/mailarchive/message.php?msg_id=27961105 and http://matplotlib.sourceforge.net/users/installing.html#build-requirements Prebuilt static link libraries for msvc compilers are available at http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib. It seems you are trying to compile from within cygwin, using the include files provided by cygwin. That will probably not work. Christoph Best regards, Mads -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.netmailto:Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users I am building from the VS2008 command prompt. But thanks for the info. Will have a look. Best regards, Mads OK. The cygwin in your home path looked suspicious: c:\cygwin\home\mads ipsen\ Christoph -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users Works like a charm. What about support for the Qt backend. Do I need any Qt dev. env. installed or does it just rely on PyQt and Qt binaries being present on the machine? Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email: mads.ip...@gmail.com | +--+--+ -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Aspect ratio of a circle
Hi, I am using the Qt4 based back engine for displaying a 2D plot in a widget. The plot typically contains lots of line plots. Suppose I add a CirclePolygon to the plot like this: circle = CirclePolygon((x,y), radius=0.04, edgecolor='black', facecolor='red', zorder=1) axes.add_patch(circle) Then when I start to zoom in the window the aspect ratio of the circle is not preserved (it appears like an ellipse). If you plot a line with points, displaying its points using circles, these circles do have their aspect ratio (and size) preserved. There must be some approach for achieving the same effect for a manually added circle. Any help is appreciated, Best regards, Mads -- +--+ | Mads Ipsen, Scientific developer | +---+--+ | QuantumWise A/S | phone: +45-29716388 | | Lersø Parkallé 107| www: www.quantumwise.com | | DK-2100 Copenhagen Ø, Denmark | email: mads.ip...@gmail.com | +---+--+ -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Aspect ratio of a circle
I tried that, but that will make the entire plot look very strange if xlim = [0;100] and ylim=[-1:1]. What I really want to do is add a scale free aspect ratio correct circle to the plot. Just like the circles that appear on a scatter plot. Best regards, Mads On 2011-03-09 14:44, Aman Thakral wrote: Hi Mads, Did you add axis='equal' to you axes command? e.g. ax = fig.add_subplot(111, aspect='equal') -Aman On Wed, Mar 9, 2011 at 6:07 AM, Mads Ipsen madsip...@gmail.com mailto:madsip...@gmail.com wrote: Hi, I am using the Qt4 based back engine for displaying a 2D plot in a widget. The plot typically contains lots of line plots. Suppose I add a CirclePolygon to the plot like this: circle = CirclePolygon((x,y), radius=0.04, edgecolor='black', facecolor='red', zorder=1) axes.add_patch(circle) Then when I start to zoom in the window the aspect ratio of the circle is not preserved (it appears like an ellipse). If you plot a line with points, displaying its points using circles, these circles do have their aspect ratio (and size) preserved. There must be some approach for achieving the same effect for a manually added circle. Any help is appreciated, Best regards, Mads -- +--+ | Mads Ipsen, Scientific developer | +---+--+ | QuantumWise A/S | phone: +45-29716388 | | Lersø Parkallé 107| www: www.quantumwise.com http://www.quantumwise.com | | DK-2100 Copenhagen Ø, Denmark | email: mads.ip...@gmail.com mailto:mads.ip...@gmail.com | +---+--+ -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net mailto:Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- +--+ | Mads Ipsen, Scientific developer | +---+--+ | QuantumWise A/S | phone: +45-29716388 | | Lersø Parkallé 107| www: www.quantumwise.com | | DK-2100 Copenhagen Ø, Denmark | email: mads.ip...@gmail.com | +---+--+ -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Aspect ratio of a circle
Thanks. The intention is to make the added circle dragable by the mouse by listening to mouse press, move, and release. That means that I have to modify the data of the added scatter data. I believe that the axes.scatter() method returns a matplotlib.collections.CircleCollection object. How do I change the position of the circles (one circle) contained in this object? Mads On 2011-03-09 15:28, Benjamin Root wrote: On Wednesday, March 9, 2011, Mads Ipsenmadsip...@gmail.com wrote: Hi, I am using the Qt4 based back engine for displaying a 2D plot in a widget. The plot typically contains lots of line plots. Suppose I add a CirclePolygon to the plot like this: circle = CirclePolygon((x,y), radius=0.04, edgecolor='black', facecolor='red', zorder=1) axes.add_patch(circle) Then when I start to zoom in the window the aspect ratio of the circle is not preserved (it appears like an ellipse). If you plot a line with points, displaying its points using circles, these circles do have their aspect ratio (and size) preserved. There must be some approach for achieving the same effect for a manually added circle. Any help is appreciated, Best regards, Mads Mads, The way this is done is tricky. The transform object assigned to the circles in plot() and scatter() are different than the default when you make a circle polygon yourself. The easiest way to get them is to just simply use scatter() and pass in your own size value. I hope that helps! Ben Root -- +--+ | Mads Ipsen, Scientific developer | +---+--+ | QuantumWise A/S | phone: +45-29716388 | | Lersø Parkallé 107| www: www.quantumwise.com | | DK-2100 Copenhagen Ø, Denmark | email: mads.ip...@gmail.com | +---+--+ -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users