SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S


1
(20)
2
(21)
3
(21)
4
(14)
5
(8)
6
(12)
7
(16)
8
(27)
9
(39)
10
(19)
11
(12)
12
(3)
13
(3)
14
(18)
15
(14)
16
(6)
17
(7)
18
(19)
19
(5)
20
(8)
21
(24)
22
(42)
23
(12)
24
(11)
25
(16)
26
(2)
27
(4)
28
(10)





Showing results of 399

<< < 1 .. 4 5 6 7 8 .. 16 > >> (Page 6 of 16)
From: Jose G. <sjm...@go...> - 2011年02月18日 21:57:53
Hi everybody
is there anybody to set the distance between the x/y axis numbers and 
the corresponding axis labels. I found the default distance is rather 
small, and I would like to enlarge it. I was playing around in 
.matplolibrc but I did not find anything useful.
Any suggestion??
Thanks in advance
Jose
From: Jason S. <sto...@gm...> - 2011年02月18日 20:39:58
Good afternoon all,
One last matplotlib question for the group for today. On one of my GUI
plots, I'm calling imshow on an array of data (to display it in the same way
MATLAB's imagesc command does). I'd like to add a second y-axis to the
right side of the plot that is completely dependent on the values on the
primary y-axis. Essentially, for each y-axis tick point, I'll put the
y-axis 'value' into a formula and then put the result on the second y-axis.
 I did this in MATLAB by essentially overlaying a second set of axes over
the plot, but I haven't found the exact way to do it with matplotlib yet.
 I've seen a few examples online, but they all use the second overlaid plot
to actually plot new data - I wouldn't be doing this.
Would I need to use the twinx (or twiny) function?
Are there examples of this on the web that I haven't found that somebody
could point me towards?
Thank you.
From: Ryan M. <rm...@gm...> - 2011年02月18日 20:21:35
On Fri, Feb 18, 2011 at 1:24 PM, Nils Wagner
<nw...@ia...> wrote:
> Hi all,
>
> what is the reason for the white areas in the corners of the interpolation
> domain ?
> Any idea ?
The white areas are not bounded by your data points (they are located
outside the convex hull of the data points), so the interpolation
algorithm would effectively be extrapolating.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Michael D. <md...@st...> - 2011年02月18日 19:55:33
I think you'll need to manually set the color of the figure. I.e., 
given a figure object "fig":
fig.set_facecolor(...whatever Qt API gives you the default background 
color...)
You could also experiment with
fig.set_frameon(False)
which will not draw a background rectangle at all for the figure -- but 
that could cause overdrawing problems (possibly, haven't tried it).
Mike
On 02/18/2011 02:26 PM, Jason Stone wrote:
> Good afternoon all,
> I'm developing a GUI using QT Designer 4 and Python 2.7. The GUI will 
> need to have several plots on it in order to show the data in the ways 
> that I need. To accomplish this I'm using the matplotlib widget from 
> within QT Designer. It all seems to work great, but I can't seem to 
> find a way to change the background color of the widget. Essentially, 
> I've got a nicely laid out GUI with the default QT Designer light gray 
> as the "background color". Then I've got these matplotlib widgets 
> which by default have a darker shade of gray/charcoal as their 
> "background color". How do I change the matplotlib widget bgcolor to 
> the default light gray so as to match the rest of the GUI? Turning 
> the background of the main GUI to the dark gray to match the 
> matplotlib color is not an option. I kind of assumed the issue has to 
> do with the matplotlib widget and not with QT Designer, hence the 
> reason for posting in this mailing list.
>
> Does anyone have any thoughts regarding this? Or can you point me to 
> a documentation set that shows how to do this?
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Jason S. <sto...@gm...> - 2011年02月18日 19:27:03
Good afternoon all,
I'm developing a GUI using QT Designer 4 and Python 2.7. The GUI will need
to have several plots on it in order to show the data in the ways that I
need. To accomplish this I'm using the matplotlib widget from within QT
Designer. It all seems to work great, but I can't seem to find a way to
change the background color of the widget. Essentially, I've got a nicely
laid out GUI with the default QT Designer light gray as the "background
color". Then I've got these matplotlib widgets which by default have a
darker shade of gray/charcoal as their "background color". How do I change
the matplotlib widget bgcolor to the default light gray so as to match the
rest of the GUI? Turning the background of the main GUI to the dark gray to
match the matplotlib color is not an option. I kind of assumed the issue
has to do with the matplotlib widget and not with QT Designer, hence the
reason for posting in this mailing list.
Does anyone have any thoughts regarding this? Or can you point me to a
documentation set that shows how to do this?
From: Nils W. <nw...@ia...> - 2011年02月18日 19:24:43
Attachments: image.png
Hi all,
what is the reason for the white areas in the corners of 
the interpolation domain ?
Any idea ?
Nils
import numpy as np
from scipy.interpolate import griddata
import matplotlib.pyplot as plt
import numpy.ma as ma
from numpy.random import uniform, seed
# make up some randomly distributed data
seed(1234)
npts = 1000
x = uniform(-2,2,npts)
y = uniform(-2,2,npts)
z = x*y
# define grid.
xi = np.linspace(-2.3,2.3,100)
yi = np.linspace(-2.3,2.3,100)
# grid the data.
zi = griddata((x, y), z, (xi[None,:], yi[:,None]), 
method='cubic')
# contour the gridded data, plotting dots at the randomly 
spaced data points.
CS = plt.contour(xi,yi,zi,15,linewidths=0.5,colors='k')
CS = plt.contourf(xi,yi,zi,15,cmap=plt.cm.jet)
plt.colorbar() # draw colorbar
# plot data points.
plt.scatter(x,y,marker='o',c='b',s=5)
plt.xlim(-2,2)
plt.ylim(-2,2)
plt.title('griddata test (%d points)' % npts)
plt.show()
From: Jason S. <sto...@gm...> - 2011年02月18日 19:24:39
Good afternoon all,
I'm developing a GUI using QT Designer 4 and Python 2.7. The GUI will need
to have several plots on it in order to show the data in the ways that I
need. To accomplish this I'm using the matplotlib widget from within QT
Designer. It all seems to work great, but I can't seem to find a way to
change the background color of the widget. Essentially, I've got a nicely
laid out GUI with the default QT Designer light gray as the "background
color". Then I've got these matplotlib widgets which by default have a
darker shade of gray/charcoal as their "background color". How do I change
the matplotlib widget bgcolor to the default light gray so as to match the
rest of the GUI? Turning the background of the main GUI to the dark gray to
match the matplotlib color is not an option. I kind of assumed the issue
has to do with the matplotlib widget and not with QT Designer, hence the
reason for posting in this mailing list.
Does anyone have any thoughts regarding this? Or can you point me to a
documentation set that shows how to do this?
From: Benjamin R. <ben...@ou...> - 2011年02月18日 15:30:48
On Thu, Feb 17, 2011 at 6:12 PM, Jeffrey Spencer <jef...@gm...>wrote:
> I use Ipython and ubuntu. I had the default ubuntu package installed
> with v99.1. I upgraded to the svn version and installed it because I
> needed some new functionality with turning the right and top axis off
> that I couldn't get to work in the default ubuntu version. I have no
> problems running but the backend for TKAgg isn't included. So I have to
> change it to Agg. Is there any default graphical backends installed? Is
> there away to install this after or run the install so this backend is
> included. It just looks like it tries to import it but doesn't find it
> included in the matplotlib files.
>
> Did a search for this but I can't find the solution so sorry if this is
> really easy?
>
> Cheers,
> Jeff
>
>
The build process for matplotlib looks for various external modules to
determine which backends are able to be built. A really neat trick for
developers on Linux systems that use apt-get is the build-dep command. This
command will find and install all of the dependencies needed for building a
particular package without installing that package.
So, if the package that is available in the Ubuntu repos is called
"python-matplotlib" (I can't remember the exact name), you can run:
sudo apt-get build-dep python-matplotlib
and all necessary packages for building matplotlib from source will be
installed (without installing matplotlib itself!). Once that is done, you
can then redo the build and install process for matplotlib from svn and
everything should work properly.
I hope that helps!
Ben Root
From: Benjamin R. <ben...@ou...> - 2011年02月18日 15:19:48
On Fri, Feb 18, 2011 at 2:41 AM, andrea crotti <and...@gm...>wrote:
> Hi everyone, and thanks for the amazing library first of all :)
>
> Now a short question, I have some graphs and I would like to add some
> statistical summary as text on the figure.
>
> I see how I can add text and it's quite easy, the problem is that the text
> wants a coordinate to write the graph.
>
> And I can't really know it before since the size of the network (and the
> axis) are computed and fixed at run-time.
> So I should add enough space for the text and then place it, but how do I
> know how much space it would take?
> Thanks,
> Andrea
>
>
Automatic layouts are difficult to do in matplotlib. This was a design
decision trade-off made early in its development. Instead of having
matplotlib determining optimal layouts and such, the developers decided that
it would be better to give the programmers full control over all placement,
and merely establish good defaults.
Just for completeness, I like this page because it talks about the multiple
different ways you can specify coordinates for a text object (and
corresponding arrow) for placement:
http://matplotlib.sourceforge.net/users/annotations.html
Knowing ahead of time how much space an annotation will take is very
difficult, especially if your text involves any LaTeX symbols. However, it
is possible. The Text object has some method calls that can return bounding
boxes for the text object after it is made:
http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.text.Text.get_bbox_patch
http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.text.Text.get_window_extent
I haven't used these myself, so I don't know exactly what is the difference
between them (I think they are different coordinate systems). Once knowing
the size of your text object, you can change the position of the object
using its set_position() method. It is tricky, but if positioning and
layout is very important to you, it is possible to do.
I hope this helps!
Ben Root
From: JamesTan12 <lan...@ho...> - 2011年02月18日 15:13:25
Hi I have a list (Key values) with values I would like to plot to a
matplotlib histogram
[('a', 155), ('c', 73), ('b', 19), ('e', 260), ('d', 73), ('g', 42), ('f',
47), ('i', 175), ('h', 77), ('k', 7), ('j', 2), ('m', 76), ('l', 63), ('o',
174), ('n', 145), ('q', 3), ('p', 61), ('s', 153), ('r', 143), ('u', 50),
('t', 193), ('w', 19), ('v', 21), ('y', 55), ('x', 4), ('z', 4)]
Can anyone suggest how do I go about to plot it into a histogram with x-asix
being the key and y axis being the value.?
-- 
View this message in context: http://old.nabble.com/Plotting-histogram-with-dictionary-values-tp30959480p30959480.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Darren D. <dsd...@gm...> - 2011年02月18日 12:35:26
On Fri, Feb 18, 2011 at 4:21 AM, Jeffrey Spencer <jef...@gm...> wrote:
> When I bold it doesn't find Tkinter could this be the issue??
I can't parse that.
> I have
> python-tk already installed. It finds it fine when I install the Debian
> package but not when I get it from SVN.
>
> Cheers,
> Jeff
>
> Code below is from build:
>
> BUILDING MATPLOTLIB
>       matplotlib: 1.1.0svn
>         python: 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC
>             4.4.3]
>        platform: linux2
>
> REQUIRED DEPENDENCIES
>         numpy: 1.3.0
>       freetype2: 9.22.3
>
> OPTIONAL BACKEND DEPENDENCIES
>         libpng: 1.2.42
>        Tkinter: no
>             * Using default library and include directories for
>             * Tcl and Tk because a Tk window failed to open.
>             * You may need to define DISPLAY for Tk to work so
>             * that setup can determine where your libraries are
>             * located. Tkinter present, but header files are not
>             * found. You may need to install development
>             * packages.
You need to install the Tk development packages.
From: Jeffrey S. <jef...@gm...> - 2011年02月18日 09:21:07
When I bold it doesn't find Tkinter could this be the issue?? I have
python-tk already installed. It finds it fine when I install the Debian
package but not when I get it from SVN.
Cheers,
Jeff
Code below is from build:
BUILDING MATPLOTLIB
 matplotlib: 1.1.0svn
 python: 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC
 4.4.3]
 platform: linux2
REQUIRED DEPENDENCIES
 numpy: 1.3.0
 freetype2: 9.22.3
OPTIONAL BACKEND DEPENDENCIES
 libpng: 1.2.42
 Tkinter: no
 * Using default library and include directories for
 * Tcl and Tk because a Tk window failed to open.
 * You may need to define DISPLAY for Tk to work so
 * that setup can determine where your libraries are
 * located. Tkinter present, but header files are not
 * found. You may need to install development
 * packages.
 pkg-config: looking for pygtk-2.0 gtk+-2.0
 * Package pygtk-2.0 was not found in the pkg-config
 * search path. Perhaps you should add the directory
 * containing `pygtk-2.0.pc' to the PKG_CONFIG_PATH
 * environment variable No package 'pygtk-2.0' found
 * Package gtk+-2.0 was not found in the pkg-config
 * search path. Perhaps you should add the directory
 * containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH
 * environment variable No package 'gtk+-2.0' found
 * You may need to install 'dev' package(s) to
 * provide header files.
 Gtk+: no
 * Could not find Gtk+ headers in any of
 * '/usr/local/include', '/usr/include', '.'
 Mac OS X native: no
 Qt: no
 Qt4: Qt: 4.6.2, PyQt4: 4.7.2
 Cairo: 1.8.8
OPTIONAL DATE/TIMEZONE DEPENDENCIES
 datetime: present, version unknown
 dateutil: 1.5
 pytz: 2010o
OPTIONAL USETEX DEPENDENCIES
 dvipng: 1.12
 ghostscript: 8.71
 latex: 3.1415926
 pdftops: 0.12.4
[Edit setup.cfg to suppress the above messages]
============================================================================
pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends',
'matplotlib.backends.qt4_editor', 'matplotlib.projections',
'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests',
'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid',
'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist',
'matplotlib.sphinxext', 'matplotlib.tri', 'matplotlib.delaunay']
running build
running build_py
copying lib/matplotlib/mathtext.py -> build/lib.linux-x86_64-2.6/matplotlib
copying lib/matplotlib/backends/backend_svg.py ->
build/lib.linux-x86_64-2.6/matplotlib/backends
copying lib/matplotlib/mpl-data/matplotlibrc ->
build/lib.linux-x86_64-2.6/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf ->
build/lib.linux-x86_64-2.6/matplotlib/mpl-data
copying lib/matplotlib/tests/baseline_images/test_axes/canonical.svg ->
build/lib.linux-x86_64-2.6/matplotlib/tests/baseline_images/test_axes
copying lib/matplotlib/tests/baseline_images/test_axes/canonical.pdf ->
build/lib.linux-x86_64-2.6/matplotlib/tests/baseline_images/test_axes
copying lib/matplotlib/tests/baseline_images/test_axes/canonical.png ->
build/lib.linux-x86_64-2.6/matplotlib/tests/baseline_images/test_axes
copying lib/matplotlib/tests/baseline_images/test_image/image_interps.pdf ->
build/lib.linux-x86_64-2.6/matplotlib/tests/baseline_images/test_image
running build_ext
On Fri, Feb 18, 2011 at 5:48 PM, Eric Firing <ef...@ha...> wrote:
> On 02/17/2011 06:41 PM, Jeffrey Spencer wrote:
> > Essentially, I am having the same problem but installed from SVN. How do
> > you install extra backends? I haven't seen where to do this. Although I
> > want the TKAgg but I have installed TK/TCL.
>
> Do you have the python-tk package installed? If not, then after
> installing it you will need to rebuild mpl, since there is an extension
> module for tk.
>
> >
> > I am running 10.04 Ubuntu.
> >
> > Cheers,
> > Jeff
> >
> > On 02/18/2011 03:37 PM, Forest Yang wrote:
> >> Hi,
> >>
> >> I am using Ubuntu 10.10, and installed matplotlib from the
> >> repository. But when running an example file embedding plot in Qt4 I
> >> got the following errors:
> >>
> >>
> >> [11:34 PM] $ python embedding_in_qt4.py
> >> Traceback (most recent call last):
> >> File "embedding_in_qt4.py", line 16, in<module>
> >> from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg
> >> as FigureCanvas
> >> ImportError: No module named backends.backend_qt4agg
> >>
> >>
> >> Any extra steps for installing Qt4Agg backend ?
>
> Try installing the python-qt4 package. There is no extension code for
> the qt* backends, so I suspect this is all you need.
>
> Eric
>
> >>
> >> Thanks !
> >>
> >> Best regards,
> >> Forest
> >>
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: andrea c. <and...@gm...> - 2011年02月18日 08:41:58
Hi everyone, and thanks for the amazing library first of all :)
Now a short question, I have some graphs and I would like to add some
statistical summary as text on the figure.
I see how I can add text and it's quite easy, the problem is that the text
wants a coordinate to write the graph.
And I can't really know it before since the size of the network (and the
axis) are computed and fixed at run-time.
So I should add enough space for the text and then place it, but how do I
know how much space it would take?
Thanks,
Andrea
From: Eric F. <ef...@ha...> - 2011年02月18日 06:48:58
On 02/17/2011 06:41 PM, Jeffrey Spencer wrote:
> Essentially, I am having the same problem but installed from SVN. How do
> you install extra backends? I haven't seen where to do this. Although I
> want the TKAgg but I have installed TK/TCL.
Do you have the python-tk package installed? If not, then after 
installing it you will need to rebuild mpl, since there is an extension 
module for tk.
>
> I am running 10.04 Ubuntu.
>
> Cheers,
> Jeff
>
> On 02/18/2011 03:37 PM, Forest Yang wrote:
>> Hi,
>>
>> I am using Ubuntu 10.10, and installed matplotlib from the
>> repository. But when running an example file embedding plot in Qt4 I
>> got the following errors:
>>
>>
>> [11:34 PM] $ python embedding_in_qt4.py
>> Traceback (most recent call last):
>> File "embedding_in_qt4.py", line 16, in<module>
>> from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg
>> as FigureCanvas
>> ImportError: No module named backends.backend_qt4agg
>>
>>
>> Any extra steps for installing Qt4Agg backend ?
Try installing the python-qt4 package. There is no extension code for 
the qt* backends, so I suspect this is all you need.
Eric
>>
>> Thanks !
>>
>> Best regards,
>> Forest
>>
From: Robert A. <ab...@ss...> - 2011年02月18日 06:33:00
Dear Folks,
I'm finding that hist has problems computing on 2d arrays.
 import numpy
 import pylab
 mu, sigma = 2, 0.5
 v = numpy.random.normal(mu,sigma,160000)
 pylab.hist(v, bins=1000, normed=1)
This works without any problems. But if you try this:
 w=v.reshape(400,400)
 pylab.hist(w, bins=1000, normed=1)
it doesn't come back on my machine until all of memory is used up. However:
 n,bins = numpy.histogram(w,bins=1000,normed=1)
works just fine.
From: Jeffrey S. <jef...@gm...> - 2011年02月18日 04:41:02
Essentially, I am having the same problem but installed from SVN. How do 
you install extra backends? I haven't seen where to do this. Although I 
want the TKAgg but I have installed TK/TCL.
I am running 10.04 Ubuntu.
Cheers,
Jeff
On 02/18/2011 03:37 PM, Forest Yang wrote:
> Hi,
>
> I am using Ubuntu 10.10, and installed matplotlib from the
> repository. But when running an example file embedding plot in Qt4 I
> got the following errors:
>
>
> [11:34 PM] $ python embedding_in_qt4.py
> Traceback (most recent call last):
> File "embedding_in_qt4.py", line 16, in<module>
> from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg
> as FigureCanvas
> ImportError: No module named backends.backend_qt4agg
>
>
> Any extra steps for installing Qt4Agg backend ?
>
> Thanks !
>
> Best regards,
> Forest
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Forest Y. <yzi...@gm...> - 2011年02月18日 04:37:14
Hi,
 I am using Ubuntu 10.10, and installed matplotlib from the
repository. But when running an example file embedding plot in Qt4 I
got the following errors:
[11:34 PM] $ python embedding_in_qt4.py
Traceback (most recent call last):
 File "embedding_in_qt4.py", line 16, in <module>
 from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg
as FigureCanvas
ImportError: No module named backends.backend_qt4agg
Any extra steps for installing Qt4Agg backend ?
Thanks !
Best regards,
Forest
From: Jeffrey S. <jef...@gm...> - 2011年02月18日 00:12:32
I use Ipython and ubuntu. I had the default ubuntu package installed 
with v99.1. I upgraded to the svn version and installed it because I 
needed some new functionality with turning the right and top axis off 
that I couldn't get to work in the default ubuntu version. I have no 
problems running but the backend for TKAgg isn't included. So I have to 
change it to Agg. Is there any default graphical backends installed? Is 
there away to install this after or run the install so this backend is 
included. It just looks like it tries to import it but doesn't find it 
included in the matplotlib files.
Did a search for this but I can't find the solution so sorry if this is 
really easy?
Cheers,
Jeff
-- 
________________________
Jeffrey Spencer
jef...@gm...
From: K.-Michael A. <kmi...@gm...> - 2011年02月17日 19:46:56
Dear basemap team!
(I hope this is the right list for posting basemap problems? I reported 
the problem to the EPD list, but they don't have the capacity to test 
it due to the lack of GDAL installations)
There's a fatal (as in crashing Python) library dependency in relation 
with current gdal modules on the Mac. I'm using Kyngchaos' latest 
frameworks for GDAL (1.8.0)
Testcode: testgdal.py from Enthought/Examples/basemap-1.0/ (latest EPD)
This file starts with:
from osgeo import gdal, ogr
from mpl_toolkits.basemap import Basemap, cm
and when I run it like that, Python crashes with this:
Assertion failed: (0), function query, file AbstractSTRtree.cpp, line 286.
Program terminated by uncaught signal #6 after 6.80 seconds (running 
via Textmate, but same thing in ipython)
Because in the past I had some incompatibilities due to different numpy 
versions, which thanks Newton don't exist anymore (or do they?), I was 
trying around 
with the import sequences and found when I inverse these 2 like this:
from mpl_toolkits.basemap import Basemap, cm
from osgeo import gdal, ogr
the file runs perfectly.
I puth the crash report here, in case it helps:
http://dl.dropbox.com/u/139035/Basemap_crash.txt
Best regards,
Michael
From: Benjamin R. <ben...@ou...> - 2011年02月17日 15:10:14
On Thu, Feb 17, 2011 at 4:12 AM, Stephan Markus <zw...@we...> wrote:
>
> Small update:
>
> I tried the very same code with MPL 1.0.1 and Python 2.5.0 on Linux 64 and
> Python 2.5.4 on Win32 and it runs w/o throwing any exceptions there!
>
> But: the behaviour is still not that what I expected. Still these issues
> are
> remaining:
> - the smallest magnitude (center magnitude in other words) is 0.1 and I'd
> like to display way smaller values
> - the smallest magnitude doesn't even change when zooming
> - the grid lines and ticks do not show as I'd expect (see my last message)
> when zooming
>
>
> That's why I'd rather stick to a linear scale, doing my own logarithmic
> conversion, limit my data at lowest value I need and just use an offset for
> the scale.
>
I see what you mean. This problem is almost identical to another thread
going on where we can't seem to correctly do log scale for 3d plots. The
tick locators are in the wrong positions (the major ticks should be evenly
spaced) and the error message is similar to one I have been encountering in
mplot3d.
I will look a little further into this and see if I can kill two birds with
one stone...
Ben Root
From: Stephan M. <zw...@we...> - 2011年02月17日 10:12:21
Small update:
I tried the very same code with MPL 1.0.1 and Python 2.5.0 on Linux 64 and
Python 2.5.4 on Win32 and it runs w/o throwing any exceptions there!
But: the behaviour is still not that what I expected. Still these issues are
remaining:
- the smallest magnitude (center magnitude in other words) is 0.1 and I'd
like to display way smaller values
- the smallest magnitude doesn't even change when zooming
- the grid lines and ticks do not show as I'd expect (see my last message)
when zooming
That's why I'd rather stick to a linear scale, doing my own logarithmic
conversion, limit my data at lowest value I need and just use an offset for
the scale.
-- 
View this message in context: http://old.nabble.com/Polar-plot---problem-with-negative-values-for-radius-tp30936638p30948265.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Matthias W. <ark...@gm...> - 2011年02月17日 09:56:27
Hi all,
It's exactly as said. I am using OS 10.6
If I use ipython -pylab and later try to plot anything, the GUI for plotting launches and I just get a beachball.
However, if I do ipython and then import plot, I can do a plot with no problem. 
I did a search but came up with nothing. I have this problem whether I use apple python or the python2.7 downloaded from python.org. 
I am new to the whole terminal/programming thing. As you can imagine, everything is very difficult. Any help is appreciated
God bless,
Matthias
From: Stephan M. <zw...@we...> - 2011年02月17日 09:20:00
Ben,
I should have mentioned that I already tried that. When I set the rscale to
'log' the plot crashes when zooming or mpl cannot even create it.
Maybe some example code will help:
----------------
from numpy import arange, sin, pi, cos, ones
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg,
NavigationToolbar2TkAgg
from matplotlib.figure import Figure
import Tkinter as Tk
root = Tk.Tk()
f = Figure(figsize=(5,4), dpi=100)
ax = f.add_subplot(111, projection='polar')
t = arange(0.0,2*pi,0.01)
s1 = ones(len(t))*10
ax.set_rscale('log')
ax.plot(t,s1)
canvas = FigureCanvasTkAgg(f, master=root)
canvas.show()
canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)
toolbar = NavigationToolbar2TkAgg(canvas, root)
toolbar.update()
canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)
Tk.mainloop() 
----------------
Using this code the plot will show up but you can see the 10^-1 and 10^-2
tick labels overlapping in the center. Ok, it shouldn't be a big deal to get
rid of them. The major problem is if you try to zoom out, the tick labels
move away from the center and if you try to zoom into the plot it eventually
throws an exception "ValueError: cannot convert float NaN to integer".
If you try to plot smaller values (e.g. replacing the line 's1 =
ones(len(t))*10' with 's1 = ones(len(t))') mpl also throws an ValueError
exception and does not even create the plot.
Let me know if you need full tracebacks.
Btw: I am using Matplotlib 1.0.1 and Python 2.6.0 on Windows 64.
-- 
View this message in context: http://old.nabble.com/Polar-plot---problem-with-negative-values-for-radius-tp30936638p30947935.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
On 2/16/11 9:04 PM, Gui...@cs... wrote:
> Hi folks,
>
> I'm new to this list and first of all I'd like to thank all the matplotlib developers for putting together such a great package!!
>
> I've been using the Basemap toolkit recently and notice that the scale is generated on a zorder=0 layer.
>
> [cid:DCC...@ar...]
>
> I sometimes have to stack different layers and assign them a zorder argument to play with their ranking. This can results in the masking of the scale bar:
>
>
> [cid:A49...@ar...]
>
> As a workaround, I can set a negative zorder for the various features that could overlay the scale on the map, though.
> Still, I think it would be nice to be able to have a supplementary karg added to the class.
>
> Cheers
> Gill
Done (svn revision 8983). If you don't want to update from svn, you 
just iterate over the list returned by drawmapscale and use the 
'set_zorder' method of each element.
-Jeff
Hi folks,
I'm new to this list and first of all I'd like to thank all the matplotlib developers for putting together such a great package!!
I've been using the Basemap toolkit recently and notice that the scale is generated on a zorder=0 layer.
[cid:DCC...@ar...]
I sometimes have to stack different layers and assign them a zorder argument to play with their ranking. This can results in the masking of the scale bar:
[cid:A49...@ar...]
As a workaround, I can set a negative zorder for the various features that could overlay the scale on the map, though.
Still, I think it would be nice to be able to have a supplementary karg added to the class.
Cheers
Gill
Dr Guillaume Duclaux
Mineral Down Under Flagship & AuScope Grid
CSIRO Earth Science and Resource Engineering
Phone: +61 8 6436 8728 | Fax: +61 8 6436 8559 | Mobile: +61 422 289 732
gui...@cs...<mailto:gui...@cs...> | www.csiro.au<http://www.csiro.au/> |
Address: Australian Resources Research Centre, 26 Dick Perry Avenue, Kensington WA 6151
PLEASE NOTE
The information contained in this email may be confidential or privileged. Any unauthorised use or disclosure is prohibited. If you have received this email in error, please delete it immediately and notify the sender by return email. Thank you. To the extent permitted by law, CSIRO does not represent, warrant and/or guarantee that the integrity of this communication has been maintained or that the communication is free of errors, virus, interception or interference.
Please consider the environment before printing this email.
14 messages has been excluded from this view by a project administrator.

Showing results of 399

<< < 1 .. 4 5 6 7 8 .. 16 > >> (Page 6 of 16)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /