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
(6)
2
(29)
3
(19)
4
(6)
5
(5)
6
(9)
7
(9)
8
(19)
9
(14)
10
(19)
11
(26)
12
(10)
13
(26)
14
(22)
15
(19)
16
(17)
17
(16)
18
(2)
19
20
(1)
21
(1)
22
(10)
23
(11)
24
(17)
25
(6)
26
(1)
27
28
(9)
29
(9)
30
(9)



Showing results of 339

<< < 1 2 3 4 .. 14 > >> (Page 2 of 14)
From: Eric F. <ef...@ha...> - 2011年11月28日 06:01:12
On 11/27/2011 05:30 PM, Tom Bennett wrote:
> Hi,
> I am new to Matplotlib. I am using matplotlib under ipython. A
> function script generates a figure that has three subplots. The thing is
> that I would like to continue to interact with a specific subplot under
> the interactive prompt through pylab after I run that function. However,
> gca() returns the last subplot which is not what I want.
> The question is if there is any way to tell gca() which Axes is the
> current Axes.
> Thanks,
> Tom
>
If you keep a reference to the Axes when you create it, or if you use 
gca() to return a reference before creating the next one, then you can 
use sca(ax) to make ax the current axes.
Eric
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Tom B. <tom...@ma...> - 2011年11月28日 03:59:46
Hi,
I am new to Matplotlib. I am using matplotlib under ipython. A
function script generates a figure that has three subplots. The thing is
that I would like to continue to interact with a specific subplot under the
interactive prompt through pylab after I run that function. However, gca()
returns the last subplot which is not what I want.
The question is if there is any way to tell gca() which Axes is the current
Axes.
Thanks,
Tom
From: Gökhan S. <gok...@gm...> - 2011年11月25日 17:39:30
On Thu, Nov 24, 2011 at 7:57 AM, Marianne C. <mar...@gm...> wrote:
>
> My name is Marianne, I am a beginner user of matplotlib.
>> I am using imshow in pyplot. I am desperate to get rid of
>> the ticks on both x and y axes (see attached picture). I
>> do not need the black box around the data either. Should
>> I use imshow in axes.Axes instead, to be able to call
>
>
plt.axis('off')
or
ax = plt.gca()
ax.set_axis_off()
should clear the axis bounds and remove ticks as well.
-- 
Gökhan
From: Marianne C. <mar...@gm...> - 2011年11月25日 15:14:32
Hi Friedrich and everybody else,
Thank you for your reply.
I think I am not getting everything, but in my understanding,
the object which I create is not a Figure or an Axis, it is an
AxesImage. gca() or gcf() return errors indeed.
Therefore, I cannot use attributes which are specific to Figures
and Axes.
Would there be a reason for the class AxesImage to handle
very few attributes? Is this class not so popular? :p
Best,
Marianne
On Thu, Nov 24, 2011 at 8:09 PM, Friedrich Romstedt <
fri...@gm...> wrote:
> 2011年11月24日 Marianne C. <mar...@gm...>:
> > On Thu, Nov 24, 2011 at 3:48 PM, Marianne C. <mar...@gm...>
> wrote:
> >> Hi all,
> >>
> >> My name is Marianne, I am a beginner user of matplotlib.
> >> I am using imshow in pyplot. I am desperate to get rid of
> >> the ticks on both x and y axes (see attached picture). I
> >> do not need the black box around the data either. Should
>
> The cleanes solution, is to use the NullLocator. I'm not a user of
> pylab Matlabish interface, but from what I know::
>
> gca().xaxis.set_major_locator(matplotlib.ticker.NullLocator())
> gca().yaxis.set_major_locator(matplotlib.ticker.NullLocator())
>
> after importing matplotlib.ticker of course. Should work, but didn't try.
>
> http://matplotlib.sourceforge.net/api/ticker_api.html
>
> http://matplotlib.sourceforge.net/api/axis_api.html#matplotlib.axis.Axis.set_major_locator
> http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.gca
>
> You are free to use the OO interface which yields the same.
>
> Notice that upon clear() the locators are most probably lost.
>
> gca() get the current Axes object. xaxis and yaxis are its Axis
> attributes. The locator defines where to set ticks. If it's the
> NoneLocator this is rather a stub to saying "don't place ticks ever".
> But it's more clean than to force them directly to the empty list
> because it'll survive at least limit changes. I don't know if the
> manual method survives that. Otherwise it's also a matter of taste.
>
> From the docs I do not see that you could hand over the locators
> directly to the imshow call
>
> http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow
> .
>
> For the frame, if it really matters, you can set the ``edgecolor``
> probably to 'none', literally with the quotes. There's a Figure
> object created when you create the plot, you can get it via gcf().
> Try to figure out how to set its egdecolor either on construction or
> later. If you are stuck tell.
>
> Make sure to "reply to all".
>
> cu,
> Friedrich
>
From: Benjamin R. <ben...@ou...> - 2011年11月25日 13:30:39
On Friday, November 25, 2011, Keith Hughitt <kei...@gm...> wrote:
> Hi,
> I would like to draw a contour plot on top of an image and such that any
values of the countour plot < x are made transparent.
> Here is what I am doing at the moment to handle the overplotting:
>
> from matplotlib import pyplot as plt
> fig = plt.figure()
> axes = fig.add_subplot(111)
> contour = plt.imshow(contour_data,
extent=contour_extent,cmap=contour_cmap, origin='lower', zorder=10)
> im = plt.imshow(im_data, extent=im_extent, cmap=im_cmap, origin='lower',
zorder=1)
> plt.show()
>
> Any suggestions? One thing I thought about doing is converting im_data
and contour_data from grayscale to RGBA, and setting the alpha channel to 0
for all data with value less than x, but I was hoping there might be a more
straight-forward way to handle this.
> Thanks,
> Keith
>
>
Just use a numpy masked array and it will do exactly what you want.
contour_data = np.ma.masked_array(contour_data, mask=(contour_data < 0))
Cheers!
Ben Root
From: Luka N. <luk...@gm...> - 2011年11月25日 13:14:05
Hello.
I'm searching for a method to show a stream of data on a graph. So far
I've only managed to get the stream on a regular graph but the data
bandwidth is very high (100 samples/sec) and the usual graph doesn't
handle redrawing so good.
I was searching for a way to utilize the animation functionality of
matplotlib but found only some Tk examples (with very smooth refresh
rate).
But I couldn't modify the source to create the same effect using the Gtk
+ front-end. The problem is that I don't know how to integrate the graph
into the Glib main loop. 
Please help.
This is an example I found o the net:
----------------------------------------------------------
import matplotlib
matplotlib.use('TkAgg') # do this before importing pylab
import matplotlib.pyplot as plt
import random
fig = plt.figure()
ax = fig.add_subplot(111)
x = range(30)
y = [random.random() for i in x]
line, = ax.plot(x,y)
def animate(*args):
 n = len(y)
 while True:
 data = random.random()
 y.append(data)
 n += 1
 line.set_data(range(n-30, n), y[-30:])
 ax.set_xlim(n-31, n-1)
 fig.canvas.draw()
fig.canvas.manager.window.after(100, animate)
plt.show()
----------------------------------------------------------
From: Keith H. <kei...@gm...> - 2011年11月25日 12:36:41
Hi,
I would like to draw a contour plot on top of an image and such that any
values of the countour plot < x are made transparent.
Here is what I am doing at the moment to handle the overplotting:
from matplotlib import pyplot as plt
fig = plt.figure()
axes = fig.add_subplot(111)
contour = plt.imshow(contour_data, extent=contour_extent,cmap=contour_cmap,
origin='lower', zorder=10)
im = plt.imshow(im_data, extent=im_extent, cmap=im_cmap, origin='lower',
zorder=1)
plt.show()
Any suggestions? One thing I thought about doing is converting im_data and
contour_data from grayscale to RGBA, and setting the alpha channel to 0 for
all data with value less than x, but I was hoping there might be a more
straight-forward way to handle this.
Thanks,
Keith
From: Ignas A. <ani...@gm...> - 2011年11月25日 01:44:57
Hi all,
On 24/11/11 23:02, Friedrich Romstedt wrote:
> How does the ebuild work? Does it invoke setup.py? If yes, maybe
> matplotlib installs the CXX dir s.t. it does not work for py3k?
Sorry for making the noise, I found the problem, actually it was my
ebuild which removed the CXX folder after the 2.7 python succeeded to
build. I do not know the reasons behind this though.
No I do not have the error there, but I have elsewhere. :) Here it is:
------------------
x86_64-pc-linux-gnu-g++ -pthread -march=native -O2 -fno-strict-aliasing
-fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-DPYCXX_PYTHON_2TO3=1 -I/usr/local/include -I/usr/include -I/usr/include
-I. -I/usr/lib64/python3.2/site-packages/numpy/core/include -Isrc
-Iagg24/include -I.
-I/usr/lib64/python3.2/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/include -I. -I/usr/include -I.
-I/usr/include/pygtk-2.0 -I/usr/include/gtk-2.0 -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -I/usr/lib64/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0
-I/usr/include/pixman-1 -I/usr/include/libpng15 -I/usr/include/libdrm
-I/usr/lib64/python3.2/site-packages/numpy/core/include
-I/usr/include/python3.2 -c src/_gtkagg.cpp -o
build-3.2/temp.linux-x86_64-3.2/src/_gtkagg.o
src/_gtkagg.cpp: In function ‘PyObject* init_gtkagg()’:
src/_gtkagg.cpp:137:5: error: return-statement with no value, in
function returning ‘PyObject*’
src/_gtkagg.cpp:138:5: error: ‘PyCObject_Check’ was not declared in this
scope
src/_gtkagg.cpp:138:5: error: ‘PyCObject_AsVoidPtr’ was not declared in
this scope
src/_gtkagg.cpp:138:5: error: return-statement with no value, in
function returning ‘PyObject*’
src/_gtkagg.cpp:138:5: error: return-statement with no value, in
function returning ‘PyObject*’
------------------
If anybody could explain why I am getting the above. Is it because of
a wrong version of PyGobject (2.28.6) or PyGtk (2.24.0) ? Or is it
because the GTK Backend is not yet ported to Python 3?
Also, could anybody tell me what differences are there in dependencies
between Py2 and Py3 versions of MPL?
Cheers,
Ignas A.
-- 
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?
From: Friedrich R. <fri...@gm...> - 2011年11月24日 23:02:10
2011年11月24日 Ignas Anikevicius <ani...@gm...>:
> I have probably found out the cause in the difference. The relevant
> part of the log for the Python 2.7 build:
> ---------------------------
> running build_ext
> building 'matplotlib.ft2font' extension
> creating build-2.7/temp.linux-x86_64-2.7
> creating build-2.7/temp.linux-x86_64-2.7/src
> creating build-2.7/temp.linux-x86_64-2.7/CXX
> x86_64-pc-linux-gnu-g++ -pthread -march=native -O2 -fno-strict-aliasing
> -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
> -I/usr/local/include -I/usr/include
> -I/usr/lib64/python2.7/site-packages/numpy/core/include
> -I/usr/include/freetype2 -I/usr/include -I. -I/usr/include/python2.7 -c
> src/ft2font.cpp -o build-2.7/temp.linux-x86_64-2.7/src/ft2font.o
> ---------------------------
>
> And know for the Python 3.2 build:
> ---------------------------
> running build_ext
> building 'matplotlib.ft2font' extension
> creating build-3.2/temp.linux-x86_64-3.2
> creating build-3.2/temp.linux-x86_64-3.2/src
> ---------------------------
> <<< !!!!!!!!!!!!!!!!!!!!!!!!!!!!!missing line
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!>>>
> ---------------------------
> x86_64-pc-linux-gnu-g++ -pthread -march=native -O2 -fPIC
> -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
> -DPYCXX_PYTHON_2TO3=1 -I/usr/local/include -I/usr/include
> -I/usr/lib64/python3.2/site-packages/numpy/core/include
> -I/usr/include/freetype2 -I/usr/include -I. -I/usr/include/python3.2 -c
> src/ft2font.cpp -o build-3.2/temp.linux-x86_64-3.2/src/ft2font.o
> ---------------------------
>
> Note that there is a missing line for the 3.2 build as it does not
> create the build-3.2/temp.linux-x86_64-3.2/CXX directory.
>
> Hence, my question is whether this behaviour is due to some code in
> the MPL building system, or should I research my ebuild more?
Good research! Unfortunately, this beyond my level. Keep us posted.
I would suspect some bug in distutils, but this can be completely off.
 Normally the obvious guesses are rather wrong in such cases as this.
How does the ebuild work? Does it invoke setup.py? If yes, maybe
matplotlib installs the CXX dir s.t. it does not work for py3k? Maybe
just the attribute matplotlib is monkeypatching. if at all, changed
its name? All this ideas do not claim that they explain it, they just
are meant to help you being let to the real cause of the malfunction.
Good luck, and a lot of inspiration
Friedrich
P.S.: "Luck – has nothing to do with it. Faith, and hard work, girl,
'cause I'll be damned if ..." [Final Fantasy]
From: Ignas A. <ani...@gm...> - 2011年11月24日 22:29:44
Hi,
Thanks for your reply.
On 24/11/11 18:54, Friedrich Romstedt wrote:
>...
> building on a Mac. Did you modify CFLAGS or CC?
>
There was in the ebuild some additional flags like
fno-strict-aliasing, but nothing change by removing the aditional
flags. The strange thing is that it still builds for 2.7, but not for
3.2.
>...
>...
> I actually don't know if it'll work if you say e.g. pythonX.Y
> matplotlib.git/setup.py build ...... might be an mistake in either
> distutils or the matplotlib build engine which I don't know at all (if
> there are additions from the mpl side to building at all.....). If
> I'm right a ``cd ........./matplotlib`` should do the trick. :-)
It did not help :(...
I have probably found out the cause in the difference. The relevant
part of the log for the Python 2.7 build:
---------------------------
running build_ext
building 'matplotlib.ft2font' extension
creating build-2.7/temp.linux-x86_64-2.7
creating build-2.7/temp.linux-x86_64-2.7/src
creating build-2.7/temp.linux-x86_64-2.7/CXX
x86_64-pc-linux-gnu-g++ -pthread -march=native -O2 -fno-strict-aliasing
-fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-I/usr/local/include -I/usr/include
-I/usr/lib64/python2.7/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/include -I. -I/usr/include/python2.7 -c
src/ft2font.cpp -o build-2.7/temp.linux-x86_64-2.7/src/ft2font.o
---------------------------
And know for the Python 3.2 build:
---------------------------
running build_ext
building 'matplotlib.ft2font' extension
creating build-3.2/temp.linux-x86_64-3.2
creating build-3.2/temp.linux-x86_64-3.2/src
---------------------------
<<< !!!!!!!!!!!!!!!!!!!!!!!!!!!!!missing line
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!>>>
---------------------------
x86_64-pc-linux-gnu-g++ -pthread -march=native -O2 -fPIC
-DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-DPYCXX_PYTHON_2TO3=1 -I/usr/local/include -I/usr/include
-I/usr/lib64/python3.2/site-packages/numpy/core/include
-I/usr/include/freetype2 -I/usr/include -I. -I/usr/include/python3.2 -c
src/ft2font.cpp -o build-3.2/temp.linux-x86_64-3.2/src/ft2font.o
---------------------------
Note that there is a missing line for the 3.2 build as it does not
create the build-3.2/temp.linux-x86_64-3.2/CXX directory.
Hence, my question is whether this behaviour is due to some code in
the MPL building system, or should I research my ebuild more?
Cheers,
Ignas A.
-- 
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?
From: Eric F. <ef...@ha...> - 2011年11月24日 20:57:52
On 11/24/2011 07:04 AM, Chao YUE wrote:
> Dear all,
>
> I use matplotlib 1.1.0.
>
> import matplotlib.pyplot as plt
> plt.plot(np.arange(10),'ro',mec='none')
>
> when I use plt.show(),
>
> there is only blank frame with axis not no points.
>
> but plt.plot(np.arange(10),'ro') will give good plot with read filled
> circles and black edges.
>
> plt.scatter(np.arange(10),np.arange(10),c='r',marker='o',edgecolor='none')
> is working fine.
>
> but I really think plt.plot is a very good and easy function if you
> don't make complex scatter points. and the circles look much nicer than
> that produced by plt.scatter (thought I don't know why
> as they use the same symble....)
>
> does anyone else have found the same ?
See https://github.com/matplotlib/matplotlib/pull/598
for a proposed quick fix.
Eric
>
> thanks to all,
>
> Chao
>
> --
> ***********************************************************************************
> Chao YUE
> Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
> UMR 1572 CEA-CNRS-UVSQ
> Batiment 712 - Pe 119
> 91191 GIF Sur YVETTE Cedex
> Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
> ************************************************************************************
>
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: C M <cmp...@gm...> - 2011年11月24日 19:12:51
>
> I don't know if this will work for you, but in your situation I would
> probably just make another axis for the data with no y value. Like, a short
> squat axis directly below the main axis.
>
> -Jeff
>
Thanks. That crossed my mind, but I never tried it yet. I thought it
would take up too much vertical room in the display to have another axis
just for what would likely be 1-2 data points worth of y-less data. I'd
really want to not display the x axis for that one and just align it with
the x axis of the main plot, but then the data points would be *below* the
axis, and that would seem visually odd.
I'll play with it in a sample app and see if I can get it to look good this
way.
 Che
From: Eric F. <ef...@ha...> - 2011年11月24日 19:09:59
On 11/24/2011 08:13 AM, Benjamin Root wrote:
>
>
> On Thursday, November 24, 2011, Eric Firing <ef...@ha...
> <mailto:ef...@ha...>> wrote:
> > On 11/24/2011 07:04 AM, Chao YUE wrote:
> >> Dear all,
> >>
> >> I use matplotlib 1.1.0.
> >>
> >> import matplotlib.pyplot as plt
> >> plt.plot(np.arange(10),'ro',mec='none')
> >>
> >> when I use plt.show(),
> >>
> >> there is only blank frame with axis not no points.
> >>
> >> but plt.plot(np.arange(10),'ro') will give good plot with read filled
> >> circles and black edges.
> >>
> >>
> plt.scatter(np.arange(10),np.arange(10),c='r',marker='o',edgecolor='none')
> >> is working fine.
> >>
> >> but I really think plt.plot is a very good and easy function if you
> >> don't make complex scatter points. and the circles look much nicer than
> >> that produced by plt.scatter (thought I don't know why
> >> as they use the same symble....)
> >>
> >> does anyone else have found the same ?
> >
> > Confirmed with git master. This is a major bug.
> >
> > Eric
> >
>
> Hmmm, the bug that I once reported before about the errorbar plots
> having black edges seems to be back for me as well... I wonder if this
> is related?
>
> Ben Root
Looks like an alpha-handling bug. I think the mec='none' is setting 
edgecolor alpha to zero, which is setting the gc alpha to zero, which is 
clobbering the rgbFace.
Eric
From: Friedrich R. <fri...@gm...> - 2011年11月24日 19:09:40
2011年11月24日 Marianne C. <mar...@gm...>:
> On Thu, Nov 24, 2011 at 3:48 PM, Marianne C. <mar...@gm...> wrote:
>> Hi all,
>>
>> My name is Marianne, I am a beginner user of matplotlib.
>> I am using imshow in pyplot. I am desperate to get rid of
>> the ticks on both x and y axes (see attached picture). I
>> do not need the black box around the data either. Should
The cleanes solution, is to use the NullLocator. I'm not a user of
pylab Matlabish interface, but from what I know::
 gca().xaxis.set_major_locator(matplotlib.ticker.NullLocator())
 gca().yaxis.set_major_locator(matplotlib.ticker.NullLocator())
after importing matplotlib.ticker of course. Should work, but didn't try.
http://matplotlib.sourceforge.net/api/ticker_api.html
http://matplotlib.sourceforge.net/api/axis_api.html#matplotlib.axis.Axis.set_major_locator
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.gca
You are free to use the OO interface which yields the same.
Notice that upon clear() the locators are most probably lost.
gca() get the current Axes object. xaxis and yaxis are its Axis
attributes. The locator defines where to set ticks. If it's the
NoneLocator this is rather a stub to saying "don't place ticks ever".
But it's more clean than to force them directly to the empty list
because it'll survive at least limit changes. I don't know if the
manual method survives that. Otherwise it's also a matter of taste.
>From the docs I do not see that you could hand over the locators
directly to the imshow call
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow.
For the frame, if it really matters, you can set the ``edgecolor``
probably to 'none', literally with the quotes. There's a Figure
object created when you create the plot, you can get it via gcf().
Try to figure out how to set its egdecolor either on construction or
later. If you are stuck tell.
Make sure to "reply to all".
cu,
Friedrich
From: Friedrich R. <fri...@gm...> - 2011年11月24日 18:54:09
2011年11月24日 Ignas Anikevicius <ani...@gm...>:
> Dear list,
>
> I have been trying to build matplotlib with python2 *and* python3
> support. I am using Gentoo and a custom ebuild which can be found on
> gnlay overlay[1]. However, I had a build error while trying to compile
> 'src/ft2font.cpp' (see the log attached[2]). I was wondering weather
> there are any preparation steps involved to make this file compile,
> which might be different from the python2 version?
>
> I found the 'CXX/Extensions.hxx' and the problem might be that it is
> not loaded due to some reason?
The log looks ok, although the lines are remarkably short, compared to
building on a Mac. Did you modify CFLAGS or CC?
The ``-I.`` should just do the trick, at least. So I wonder if, for
some reason, maybe your CWD is no longer the matplotlib root
directory. I could imagine that it has either sth to do with your
gentoo ebuild or with Python3k's distutils? Just a rough guess.
> I am afraid that this might have something to do with the my ebuild,
> so could someone tell me more about how the building process works? Or
> how much it is different for python3 compared with python2?
For py2k it's just pythonX.Y setup.py build and then pythonX.Y
setup.py install, if you want to install. ft2font.so is built during
the build step. I believe it's the same for py3k.
I actually don't know if it'll work if you say e.g. pythonX.Y
matplotlib.git/setup.py build ...... might be an mistake in either
distutils or the matplotlib build engine which I don't know at all (if
there are additions from the mpl side to building at all.....). If
I'm right a ``cd ........./matplotlib`` should do the trick. :-) I
believe it's rare to invoke the setup.py from another directory than
that where it resides in.
I don't know how to build ebuild scripts. I'm just a user of them.
cu,
Friedrich
From: Benjamin R. <ben...@ou...> - 2011年11月24日 18:13:16
On Thursday, November 24, 2011, Eric Firing <ef...@ha...> wrote:
> On 11/24/2011 07:04 AM, Chao YUE wrote:
>> Dear all,
>>
>> I use matplotlib 1.1.0.
>>
>> import matplotlib.pyplot as plt
>> plt.plot(np.arange(10),'ro',mec='none')
>>
>> when I use plt.show(),
>>
>> there is only blank frame with axis not no points.
>>
>> but plt.plot(np.arange(10),'ro') will give good plot with read filled
>> circles and black edges.
>>
>>
plt.scatter(np.arange(10),np.arange(10),c='r',marker='o',edgecolor='none')
>> is working fine.
>>
>> but I really think plt.plot is a very good and easy function if you
>> don't make complex scatter points. and the circles look much nicer than
>> that produced by plt.scatter (thought I don't know why
>> as they use the same symble....)
>>
>> does anyone else have found the same ?
>
> Confirmed with git master. This is a major bug.
>
> Eric
>
Hmmm, the bug that I once reported before about the errorbar plots having
black edges seems to be back for me as well... I wonder if this is related?
Ben Root
From: Eric F. <ef...@ha...> - 2011年11月24日 18:05:54
On 11/24/2011 07:04 AM, Chao YUE wrote:
> Dear all,
>
> I use matplotlib 1.1.0.
>
> import matplotlib.pyplot as plt
> plt.plot(np.arange(10),'ro',mec='none')
>
> when I use plt.show(),
>
> there is only blank frame with axis not no points.
>
> but plt.plot(np.arange(10),'ro') will give good plot with read filled
> circles and black edges.
>
> plt.scatter(np.arange(10),np.arange(10),c='r',marker='o',edgecolor='none')
> is working fine.
>
> but I really think plt.plot is a very good and easy function if you
> don't make complex scatter points. and the circles look much nicer than
> that produced by plt.scatter (thought I don't know why
> as they use the same symble....)
>
> does anyone else have found the same ?
Confirmed with git master. This is a major bug.
Eric
>
> thanks to all,
>
> Chao
>
> --
> ***********************************************************************************
> Chao YUE
> Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
> UMR 1572 CEA-CNRS-UVSQ
> Batiment 712 - Pe 119
> 91191 GIF Sur YVETTE Cedex
> Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
> ************************************************************************************
>
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Chao Y. <cha...@gm...> - 2011年11月24日 17:04:40
Dear all,
I use matplotlib 1.1.0.
import matplotlib.pyplot as plt
plt.plot(np.arange(10),'ro',mec='none')
when I use plt.show(),
there is only blank frame with axis not no points.
but plt.plot(np.arange(10),'ro') will give good plot with read filled
circles and black edges.
plt.scatter(np.arange(10),np.arange(10),c='r',marker='o',edgecolor='none')
is working fine.
but I really think plt.plot is a very good and easy function if you don't
make complex scatter points. and the circles look much nicer than that
produced by plt.scatter (thought I don't know why
as they use the same symble....)
does anyone else have found the same ?
thanks to all,
Chao
-- 
***********************************************************************************
Chao YUE
Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
From: Dale C. <da...@ld...> - 2011年11月24日 15:18:53
On Nov 23, 2011, at 7:58 , Sven Ahrens wrote:
> Dear mailinglist readers,
> 
> I have a problem by accessing the content
> 
> http://matplotlib.sourceforge.net/examples/pylab_examples/demo_tight_layout_00.html
This one works:
http://matplotlib.sourceforge.net/examples/pylab_examples/demo_tight_layout.html
I'm wondering where the "_00" came from in your link?
-Dale
> 
> whereas other contents, like for example
> 
> http://matplotlib.sourceforge.net/examples/pylab_examples/demo_ribbon_box.html
> 
> are well accessible. Is there a reason, why this content is not available?
> 
> I would be glad, if you might help.
> 
> Best regards,
> Sven Ahrens
> 
> 
> The error message:
> 
> An error has been encountered in accessing this page.
> 1. Server: matplotlib.sourceforge.net 
> 2. URL path: /examples/pylab_examples/demo_tight_layout_00.html 
> 3. Error notes: NONE 
> 4. Error type: 404 
> 5. Request method: GET 
> 6. Request query string: NONE 
> 7. Time: 2011年11月23日 12:45:59 UTC (1322052359)
> 
> 
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure 
> contains a definitive record of customers, application performance, 
> security threats, fraudulent activity, and more. Splunk takes this 
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d_______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Marianne C. <mar...@gm...> - 2011年11月24日 14:57:42
Hello,
I am sending my email again, with no attachment this time.
Thanks for reading!
Marianne
On Thu, Nov 24, 2011 at 3:48 PM, Marianne C. <mar...@gm...> wrote:
> Hi all,
>
> My name is Marianne, I am a beginner user of matplotlib.
> I am using imshow in pyplot. I am desperate to get rid of
> the ticks on both x and y axes (see attached picture). I
> do not need the black box around the data either. Should
> I use imshow in axes.Axes instead, to be able to call
>
> set_ticks_position("none")?
>
> Thank you for your help,
> Marianne
>
> Here is my script so far:
>
> import numpy
> from matplotlib import pyplot
>
> q=numpy.loadtxt('field.txt')
>
> myfield = pyplot.imshow(q,aspect=1)
> myfield.set_clim(vmin=0, vmax=0.6)
>
> pyplot.colorbar()
>
> pyplot.savefig('field_1.eps')
>
>
From: Arlindo da S. <da...@al...> - 2011年11月24日 14:30:57
The original message with attachments are still being held because of file
size, so I am reposting here without the attachments...
---------- Forwarded message ----------
From: Arlindo da Silva <da...@al...>
Date: Mon, Nov 21, 2011 at 10:45 PM
Subject: Bug or feature: bbox of maps
To: Mat...@li...
Cc: Jeff Whitaker <jef...@no...>
Hi,
 (A similar issue was reported back in 7/4/11 without a definite solution,
so I am reposting with some additional diagnostics. ) Up to Matplotlib 0.99
(EPD 6.3) the code snippet below produced a plot with an aligned colorbar
as in the attached "correct.png" plot:
 fig = plt.figure()
 ax = fig.add_axes(...)
 m = Basemap(..., ax=ax, ...)
 im = m.imshow(...)
 # show()
 # setup colorbar axes and draw colorbar
 bbox = ax.get_position()
 l,b,w,h = bbox.bounds
 cax = fig.add_axes([l+w+0.05, b, 0.05, h],frameon=False)
 fig.colorbar(im, cax=cax)
Starting with Matplotlib 1.0.0 this no longer works. The ax.get_position()
no longer returns the bounding box of the plot but the bbox of the window,
see the attached "wrong.png" attached. Some odd behavior:
1) I can get the code above to work correctly under MPL 1.0 if I uncomment
the show() line above. (This is not an acceptable solution because show()
blocks if not in interactive mode).
2) Under ipython, if after plotting I print gca().get_position().bounds I
get the correct bounding box, even when I just got the wrong colorbar
positioning.
3) If I run the code above twice in a row (without creating a new fig), the
second time around the correct bounding box is returned.
 Can someone explain to me what is going on? Is this one of those arcane
features of matplotlib transform caching? It appears that show() is
flushing some type of buffer. Is there any way of accomplishing this
without actually calling show()?
 Thank you,
 Arlindo
-- 
Arlindo da Silva
da...@al...
From: Ignas A. <ani...@gm...> - 2011年11月24日 13:43:27
Dear list,
I have been trying to build matplotlib with python2 *and* python3
support. I am using Gentoo and a custom ebuild which can be found on
gnlay overlay[1]. However, I had a build error while trying to compile
'src/ft2font.cpp' (see the log attached[2]). I was wondering weather
there are any preparation steps involved to make this file compile,
which might be different from the python2 version?
I found the 'CXX/Extensions.hxx' and the problem might be that it is
not loaded due to some reason?
I am afraid that this might have something to do with the my ebuild,
so could someone tell me more about how the building process works? Or
how much it is different for python3 compared with python2?
Thanks a lot,
Ignas
[1] - https://github.com/gns-ank/gnlay/tree/
[2] - http://pastebin.com/m9Lf3s0J
-- 
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?
From: Michka <mic...@gm...> - 2011年11月24日 10:22:14
johnmcpot wrote:
> 
> Hi JD, 
> 
> I'm having exactly the same problem. Did you find a solution?
> 
Hello
I have exactly the same problem while embedding matplotlib in PyQT4 on OS X
with backend_qt4agg.
I think I have found a solution : do you use frameon=False in this line : 
fig = Figure(figsize=(width, height), dpi=dpi, frameon=False)
I did, and went back to True ... and no more axes update problems !!!
You can check this behavior in this tutorial : add the frameon=False, and
the axes are no more updating correctly (on OS X, didn't test it on Linux).
http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_qt4.html
Perhaps this is normal. If not I think I'll submit a bug report in
matplotlib's bugtracker.
Michka
-- 
View this message in context: http://old.nabble.com/Clearing-the-axis-in-a-figure-embedded-in-Tkinter-tp32054762p32875027.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Chao Y. <cha...@gm...> - 2011年11月24日 08:28:56
now I updated to 1.1.0, it works. thanks to all.
chao
2011年11月23日 Chao YUE <cha...@gm...>
> Dear all,
>
> I am using matplotlib 0.99.3 (I think it's the default version when I use
> sudo apt-get install under ubuntu 11.04), but I don't have
> matplotlib.animation module. I think I need to reinstall it?
>
> thanks,
>
> chao
>
> --
>
> ***********************************************************************************
> Chao YUE
> Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
> UMR 1572 CEA-CNRS-UVSQ
> Batiment 712 - Pe 119
> 91191 GIF Sur YVETTE Cedex
> Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
>
> ************************************************************************************
>
>
-- 
***********************************************************************************
Chao YUE
Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
From: Jeffrey B. <jbl...@al...> - 2011年11月23日 21:48:01
On Nov 23, 2011, at 4:09 PM, C M wrote:
>
>
> On Tue, Nov 22, 2011 at 3:09 PM, Nicolas Rougier 
> <Nic...@in...> wrote:
>
> Is that what you want ?
>
> No ticks, no labels:
>
> import matplotlib.pyplot as plt
> plt.plot(np.arange(10), np.arange(10))
> plt.ylim(0,10)
> plt.yticks(np.linspace(3,10,8))
> plt.show()
>
> Thanks. That works in your example, but in my actual code, it 
> seems to override my custom formatter, and therefore messes up the 
> axis formatting, which isn't going to work.
>
> Maybe I can integrate it into the formatter somehow. If anyone has 
> related tips, please let me know.
I don't know if this will work for you, but in your situation I would 
probably just make another axis for the data with no y value. Like, a 
short squat axis directly below the main axis.
-Jeff
8 messages has been excluded from this view by a project administrator.

Showing results of 339

<< < 1 2 3 4 .. 14 > >> (Page 2 of 14)
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 によって変換されたページ (->オリジナル) /