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




Showing results of 394

<< < 1 2 3 4 .. 16 > >> (Page 2 of 16)
From: Ryan M. <rm...@gm...> - 2009年03月31日 04:28:56
On Mon, Mar 30, 2009 at 1:34 PM, C M <cmp...@gm...> wrote:
> I've got the NavigationToolbar2 going nicely on my app
> (OO, embedded in wx, mpl 0.98.5), and was wondering
> how difficult it might be to change how the pan works,
> in the following way...
>
> Right now, when I show a plot, I am grabbing a subset
> of data from the database. Panning within that plot
> allows exploration of *just that data*. E.g., if I have
> values between x = 100 and x = 200, I can pan past
> either of these values, but there are no more data points
> beyond that, because I didn't fetch those points when I
> created the plot.
>
> What would be nice is if, on panning, I could fetch
> new points, namely those that are found in that part of
> the x axis. This would be just like Google Maps' ability
> to allow one to pan the map over and see new land area,
> because it fetches those land patches of the map.
>
> I could of course just fetch all the data I have first
> and set the x limits to show the requested subset
> of data initially, but I thought maybe it would
> be more efficient to only get what is requested and
> then grab more data on pans. I thought I'd ask if
> anyone had done something like this already.
In SVN trunk, there is an example in examples/event_handling/viewlims.py
that redraws a fractal when you zoom in. You could probably adopt a similar
approach to grab new data points, though the details would depend on the
type of plot.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Enterprise, Alabama, United States
From: Deltarodigy <Del...@gm...> - 2009年03月30日 23:45:38
Me and my team are almost to the finishing point. Our final problem is
getting the graph to update. 
When we run the graph the get the following issue: "
Traceback (most recent call last):
 File "/home/gnelson/scc08whole/branch/realistic2d/gtkgui.py", line 100, in
update
 self.ax.draw_artist(plt.contourf)
 File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 1535, in
draw_artist
 a.draw(self._cachedRenderer)
AttributeError: 'function' object has no attribute 'draw'"
Our Code is at: " http://code.google.com/p/scc08/ " 
and we are using the gtkgui.py
import time
import gtk, gobject
import matplotlib
matplotlib.use('GTKAgg')
import matplotlib.pyplot as plt
from driver import Driver
import numpy as np
class Gui:
 def updateData(self):
 self.updateTemps()
 self.getMats()
 self.addTimeSteps()
 self.getAirPts()
 self.getGroundPts()
 self.getBridgePts()
 def updateTemps(self):
 self.temps = []
 temp = self.dr.myGrid.fields
 for i in range(len(temp)):
 self.temps.append([])
 for j in range(len(temp[i])):
 self.temps[i].append(temp[i][j].temperature)
 def getMats(self):
 self.mats = []
 temp = self.dr.myGrid.fields
 for i in range(len(temp)):
 self.mats.append([])
 for j in range(len(temp[i])):
 self.mats[i].append(temp[i][j].density)
 self.mats
 def setUserInput(self):
 str = raw_input("What do you want: Ground or Air? (The default is
air) \n")
 if(str == "Ground" or str == "ground"):
 self.type = 1
 else:
 self.type = 2
 def getAirPts(self):
 temp = self.dr.myGrid.fields
 for i in range(len(temp)):
 for j in range(len(temp[i])):
 if(temp[i][j].material == 'air'):
 self.airData.append(temp[i][j].temperature)
 return
 def getBridgePts(self):
 temp = self.dr.myGrid.fields
 for i in range(len(temp)):
 for j in range(len(temp[i])):
 if(temp[i][j].material == 'concrete'):
 self.bridgeData.append(temp[i][j].temperature)
 return
 def getGroundPts(self):
 if (type == 1):
 return None
 else:
 temp = self.dr.myGrid.fields
 for i in range(len(temp)):
 for j in range(len(temp[i])):
 if(temp[i][j].material == 'soil'):
 self.groundData.append(temp[i][j].temperature)
 return
 def addTimeSteps(self):
 self.time.append(self.step)
 def update(self, *args):
 print "WTF Delta?!?"
 self.step = 0
 if self.background is None:
 self.background = self.canvas.copy_from_bbox(self.ax.bbox)
 self.updateData()
 # restore the clean slate background
 self.canvas.restore_region(self.background)
 # update the data
 print "GROUND DATA:"
 print len(self.groundData)
 print "TIME DATA"
 print len(self.time)
 if(self.type != 2):
 self.groundLine = self.ax.plot(self.groundData , self.time,
'g-+')
 self.bridgeLine = self.ax.plot(self.bridgeData , self.time,
'r-o')
 self.airLine = self.ax.plot(self.airData, self.time, 'b-s')
 self.contour = self.ax2.contourf(self.temps)
 self.colorbar = self.fig.colorbar(self.contour)
 # just draw the animated artist
 self.ax.draw_artist(self.groundLine)
 self.ax.draw_artist(self.airLine)
 self.ax.draw_artist(self.bridgeLine)
 self.ax.draw_artist(plt.contourf)
# self.ax.draw_artist(colorbar)
 # just redraw the axes rectangle
 self.canvas.blit(self.ax.bbox)
 self.cnt += 1
 self.step += .004
 self.dr.run(10)
 self.time.append(self.step*10)
 return True
 update.cnt = 0
 update.background = None
 def setup(self):
 self.fig = plt.figure()
 self.ax = self.fig.add_subplot(211)
 self.ax2 = self.fig.add_subplot(212)
 self.canvas = self.fig.canvas
 self.ax.grid() # to ensure proper background restore
 self.canvas.draw()
 # create some globals
 self.airData = []
 self.groundData = []
 self.bridgeData = []
 self.time = []
 self.step = 0
 self.setUserInput()
 self.temps = []
 self.mats = []
 self.dr = Driver(.5, .5, 0.0004, type, (7,7,9,9), (16,16))
 self.cnt = 0
 self.background = None
 # don't use time steps over 4 * 10 ** -4
 self.updateTemps()
 self.gmats = self.getMats()
 # create the initial graphs
 self.contour = self.ax2.contourf(self.temps)
 self.colorbar = self.fig.colorbar(self.contour)
 self.groundLine, = self.ax.plot(self.groundData , self.time, 'g-+')
 self.bridgeLine, = self.ax.plot(self.bridgeData , self.time, 'r-o')
 self.airLine, = self.ax.plot(self.airData , self.time, 'b-s')
 
if __name__ == "__main__":
 mygui = Gui()
 def start_anim(event):
 gobject.idle_add(mygui.update)
 mygui.canvas.mpl_disconnect(start_anim.cid)
 
 mygui.setup()
 start_anim.cid = mygui.canvas.mpl_connect('draw_event', start_anim)
 plt.show()
-- 
View this message in context: http://www.nabble.com/We-are-on-the-Home-strech-and-NEED-help-tp22795527p22795527.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: sigeti <si...@la...> - 2009年03月30日 21:48:50
Dear Matplotlib Folks,
When I run pylab.plot, I get a weird warning:
** (python:20754): WARNING **: Couldn't connect to system bus
** (python:20754): WARNING **: Couldn't connect to system bus
<matplotlib.lines.Line2D object at 0x1225850>
(Note that this was copied by hand because the system on which I run
Matplotlib is currently unable to connect to the global internet.)
The first line really is repeated.
The number after "python:" changes from one instance of the warning to
another.
I am running:
Red Hat Enterprise Linux ES release 4 (Nahant Update 3)
At least, that is what is in /etc/redhat-release.
The warning is not fatal and I can display what I attempted to plot with
pylab.show. However, the warning has a significant impact on the
interactive usability of Python and matplotlib as a replacement for Matlab.
Anyone have any suggestions or observations?
Yours,
David Sigeti
-- 
View this message in context: http://www.nabble.com/Warning-from-pylab.plot-on-Linux-tp22793709p22793709.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Michael H. <mh...@us...> - 2009年03月30日 20:33:25
Jeff - Copying the rest of the files solved the problem. Thanks!
--Mike
Jeff Whitaker wrote:
> Michael Hearne wrote:
>> I am experimenting with the Enthought Python Distribution (EPD) on 
>> MacOS 10.5, which includes BaseMap version 0.99.1. I have existing 
>> modules that use the 'full' resolution data. These modules are 
>> currently failing with the error message below.
>>
>> I have tried copying what looked like the full resolution data sets 
>> (gshhs_f.dat and gshhsmeta_f.dat) from my 0.99.2 source installation 
>> into the EPD basemap data directory, and rerun my scripts, with no 
>> success.
>>
>> I looked at my most recent copy of the basemap README and cannot find 
>> any reference to the boundary datasets.
>>
>> So, a question for Jeff, and a request for Enthought:
>> 1) How do I update the EPD with the full resolution data
>> 2) Can the EPD be updated to include the full resolution boundary data?
>>
>> Thanks,
>>
>> Mike
>>
>> ***************************
>> IOError: Unable to open boundary dataset file. Only the 'crude', 'low',
>> 'intermediate' and 'high' resolution datasets are installed by default.
>> If you are requesting a 'full' resolution dataset, you may need to
>> download and install those files separately
>> (see the basemap README for details).
>> Exception caught: Unable to open boundary dataset file. Only the 
>> 'crude', 'low',
>> 'intermediate' and 'high' resolution datasets are installed by default.
>> If you are requesting a 'full' resolution dataset, you may need to
>> download and install those files separately
>> (see the basemap README for details).
>> ***************************
>>
>> ------------------------------------------------------------------------------ 
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> 
> Mike: To save space, the EPD folks took out the full resolution 
> datasets. Manually copying the files should work - are you sure you 
> got them in the right place (the mpl_toolkits/basemap/data 
> directory)? You probably have to copy more than the gshhs file (the 
> states, rivers and countries too).
>
> -Jeff
>
From: Jeff W. <js...@fa...> - 2009年03月30日 19:54:15
Michael Hearne wrote:
> I am experimenting with the Enthought Python Distribution (EPD) on MacOS 
> 10.5, which includes BaseMap version 0.99.1. I have existing modules 
> that use the 'full' resolution data. These modules are currently 
> failing with the error message below.
>
> I have tried copying what looked like the full resolution data sets 
> (gshhs_f.dat and gshhsmeta_f.dat) from my 0.99.2 source installation 
> into the EPD basemap data directory, and rerun my scripts, with no success.
>
> I looked at my most recent copy of the basemap README and cannot find 
> any reference to the boundary datasets.
>
> So, a question for Jeff, and a request for Enthought:
> 1) How do I update the EPD with the full resolution data
> 2) Can the EPD be updated to include the full resolution boundary data?
>
> Thanks,
>
> Mike
>
> ***************************
> IOError: Unable to open boundary dataset file. Only the 'crude', 'low',
> 'intermediate' and 'high' resolution datasets are installed by default.
> If you are requesting a 'full' resolution dataset, you may need to
> download and install those files separately
> (see the basemap README for details).
> Exception caught: Unable to open boundary dataset file. Only the 
> 'crude', 'low',
> 'intermediate' and 'high' resolution datasets are installed by default.
> If you are requesting a 'full' resolution dataset, you may need to
> download and install those files separately
> (see the basemap README for details).
> ***************************
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
Mike: To save space, the EPD folks took out the full resolution 
datasets. Manually copying the files should work - are you sure you got 
them in the right place (the mpl_toolkits/basemap/data directory)? You 
probably have to copy more than the gshhs file (the states, rivers and 
countries too).
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Michael H. <mh...@us...> - 2009年03月30日 19:31:04
I am experimenting with the Enthought Python Distribution (EPD) on MacOS 
10.5, which includes BaseMap version 0.99.1. I have existing modules 
that use the 'full' resolution data. These modules are currently 
failing with the error message below.
I have tried copying what looked like the full resolution data sets 
(gshhs_f.dat and gshhsmeta_f.dat) from my 0.99.2 source installation 
into the EPD basemap data directory, and rerun my scripts, with no success.
I looked at my most recent copy of the basemap README and cannot find 
any reference to the boundary datasets.
So, a question for Jeff, and a request for Enthought:
1) How do I update the EPD with the full resolution data
2) Can the EPD be updated to include the full resolution boundary data?
Thanks,
Mike
***************************
IOError: Unable to open boundary dataset file. Only the 'crude', 'low',
'intermediate' and 'high' resolution datasets are installed by default.
If you are requesting a 'full' resolution dataset, you may need to
download and install those files separately
(see the basemap README for details).
Exception caught: Unable to open boundary dataset file. Only the 
'crude', 'low',
'intermediate' and 'high' resolution datasets are installed by default.
If you are requesting a 'full' resolution dataset, you may need to
download and install those files separately
(see the basemap README for details).
***************************
From: C M <cmp...@gm...> - 2009年03月30日 18:34:16
I've got the NavigationToolbar2 going nicely on my app
(OO, embedded in wx, mpl 0.98.5), and was wondering
how difficult it might be to change how the pan works,
in the following way...
Right now, when I show a plot, I am grabbing a subset
of data from the database. Panning within that plot
allows exploration of *just that data*. E.g., if I have
values between x = 100 and x = 200, I can pan past
either of these values, but there are no more data points
beyond that, because I didn't fetch those points when I
created the plot.
What would be nice is if, on panning, I could fetch
new points, namely those that are found in that part of
the x axis. This would be just like Google Maps' ability
to allow one to pan the map over and see new land area,
because it fetches those land patches of the map.
I could of course just fetch all the data I have first
and set the x limits to show the requested subset
of data initially, but I thought maybe it would
be more efficient to only get what is requested and
then grab more data on pans. I thought I'd ask if
anyone had done something like this already.
Thanks,
Che
From: Roban H. K. <ro...@as...> - 2009年03月30日 16:33:54
As Darren said, normed=1 means that the integral of the histogram is
normalized to one, not the height. In other words, the total area under the
histogram curve is set to one.
Imagine a histogram with a single bin. If the width of the bin is less than
one, the height must be greater than one in order for the area to equal one.
Therefore the y-axis scale can be greater than one even when normed=1.
-Roban
On Mon, Mar 30, 2009 at 12:11 PM, Bala subramanian <
bal...@gm...> wrote:
> There was a typo in my previous mail.
> y axis goes scale is more than one when i use normed=1. I am not getting
> why this happens.
>
>
> On Mon, Mar 30, 2009 at 6:10 PM, Bala subramanian <
> bal...@gm...> wrote:
>
>>
>>
>>
>> Darren,
>>> But y axis goes scale is than one when i use normed=1. I am not getting
>>> why this happens.
>>>
>>>
>>> On Mon, Mar 30, 2009 at 5:39 PM, Darren Dale <dsd...@gm...> wrote:
>>>
>>>> On Mon, Mar 30, 2009 at 11:25 AM, Bala subramanian <
>>>> bal...@gm...> wrote:
>>>>
>>>>> Friends,
>>>>>
>>>>> I tried to plot a histogram and pdf of my data (data file attached
>>>>> 1.dat). When i see the figure (attached file test.png) , i see y axis more
>>>>> than 1 (although it should not when i use normed=1. I am not getting why
>>>>> this happens.
>>>>>
>>>>> Somebody kindly write me i) Why the y-axis scales more than 1 ii) after
>>>>> plotting histogram and pdf, how to delete the histogram and show only the
>>>>> normal curve.
>>>>>
>>>>> The following are the commands i used.
>>>>> data=load('1.dat')
>>>>> x=[:,1]
>>>>> mu=mean(x);st=std(x)
>>>>> n,bins,patch=hist(x,50,normed=1,histtype='stepfilled')
>>>>> y = normpdf( bins, mu, st)
>>>>> plot(bins, y, 'k--', linewidth=1.5)
>>>>>
>>>>
>>>> hist plots a distribution whose integral is 1.
>>>>
>>>
>>>
>>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Bala s. <bal...@gm...> - 2009年03月30日 16:11:49
There was a typo in my previous mail.
y axis goes scale is more than one when i use normed=1. I am not getting why
this happens.
On Mon, Mar 30, 2009 at 6:10 PM, Bala subramanian <bal...@gm...
> wrote:
>
>
>
> Darren,
>> But y axis goes scale is than one when i use normed=1. I am not getting
>> why this happens.
>>
>>
>> On Mon, Mar 30, 2009 at 5:39 PM, Darren Dale <dsd...@gm...> wrote:
>>
>>> On Mon, Mar 30, 2009 at 11:25 AM, Bala subramanian <
>>> bal...@gm...> wrote:
>>>
>>>> Friends,
>>>>
>>>> I tried to plot a histogram and pdf of my data (data file attached
>>>> 1.dat). When i see the figure (attached file test.png) , i see y axis more
>>>> than 1 (although it should not when i use normed=1. I am not getting why
>>>> this happens.
>>>>
>>>> Somebody kindly write me i) Why the y-axis scales more than 1 ii) after
>>>> plotting histogram and pdf, how to delete the histogram and show only the
>>>> normal curve.
>>>>
>>>> The following are the commands i used.
>>>> data=load('1.dat')
>>>> x=[:,1]
>>>> mu=mean(x);st=std(x)
>>>> n,bins,patch=hist(x,50,normed=1,histtype='stepfilled')
>>>> y = normpdf( bins, mu, st)
>>>> plot(bins, y, 'k--', linewidth=1.5)
>>>>
>>>
>>> hist plots a distribution whose integral is 1.
>>>
>>
>>
>
From: Bala s. <bal...@gm...> - 2009年03月30日 16:10:54
Darren,
> But y axis goes scale is than one when i use normed=1. I am not getting why
> this happens.
>
>
> On Mon, Mar 30, 2009 at 5:39 PM, Darren Dale <dsd...@gm...> wrote:
>
>> On Mon, Mar 30, 2009 at 11:25 AM, Bala subramanian <
>> bal...@gm...> wrote:
>>
>>> Friends,
>>>
>>> I tried to plot a histogram and pdf of my data (data file attached
>>> 1.dat). When i see the figure (attached file test.png) , i see y axis more
>>> than 1 (although it should not when i use normed=1. I am not getting why
>>> this happens.
>>>
>>> Somebody kindly write me i) Why the y-axis scales more than 1 ii) after
>>> plotting histogram and pdf, how to delete the histogram and show only the
>>> normal curve.
>>>
>>> The following are the commands i used.
>>> data=load('1.dat')
>>> x=[:,1]
>>> mu=mean(x);st=std(x)
>>> n,bins,patch=hist(x,50,normed=1,histtype='stepfilled')
>>> y = normpdf( bins, mu, st)
>>> plot(bins, y, 'k--', linewidth=1.5)
>>>
>>
>> hist plots a distribution whose integral is 1.
>>
>
>
From: Tyler B <bo...@gm...> - 2009年03月30日 15:57:39
that fixed it.. thanks!
On Mon, Mar 30, 2009 at 11:02 AM, John Hunter <jd...@gm...> wrote:
>
>
> On Mon, Mar 30, 2009 at 8:22 AM, Tyler B <bo...@gm...> wrote:
>
>> My graph, which had been working just fine, randomly decided to stop
>> filling the width of the x-axis: http://screencast.com/t/vr3AaXIq
>>
>> Here's the code I'm using (nothing fancy.. I took out all unnecessary
>> formatting and it didn't help):
>>
>> fig = plt.figure(facecolor ='w', frameon=False)
>> ax = plt.subplot(111)
>> lines = ax.plot(r_dates, r_inbox, 'w-')
>>
>> I'm out of ideas.. what could be causing this?
>
>
>
> Sorry, I'm not sure what "filling the width of the x-axis" means or what
> you are expecting to see. If you want to the x and y limits to be collapsed
> to your data limits, you need to do
>
> ax.axis('tight')
>
> JDH
>
>
From: Darren D. <dsd...@gm...> - 2009年03月30日 15:39:33
On Mon, Mar 30, 2009 at 11:25 AM, Bala subramanian <
bal...@gm...> wrote:
> Friends,
>
> I tried to plot a histogram and pdf of my data (data file attached 1.dat).
> When i see the figure (attached file test.png) , i see y axis more than 1
> (although it should not when i use normed=1. I am not getting why this
> happens.
>
> Somebody kindly write me i) Why the y-axis scales more than 1 ii) after
> plotting histogram and pdf, how to delete the histogram and show only the
> normal curve.
>
> The following are the commands i used.
> data=load('1.dat')
> x=[:,1]
> mu=mean(x);st=std(x)
> n,bins,patch=hist(x,50,normed=1,histtype='stepfilled')
> y = normpdf( bins, mu, st)
> plot(bins, y, 'k--', linewidth=1.5)
>
hist plots a distribution whose integral is 1.
From: John H. <jd...@gm...> - 2009年03月30日 15:02:50
On Mon, Mar 30, 2009 at 8:22 AM, Tyler B <bo...@gm...> wrote:
> My graph, which had been working just fine, randomly decided to stop
> filling the width of the x-axis: http://screencast.com/t/vr3AaXIq
>
> Here's the code I'm using (nothing fancy.. I took out all unnecessary
> formatting and it didn't help):
>
> fig = plt.figure(facecolor ='w', frameon=False)
> ax = plt.subplot(111)
> lines = ax.plot(r_dates, r_inbox, 'w-')
>
> I'm out of ideas.. what could be causing this?
Sorry, I'm not sure what "filling the width of the x-axis" means or what you
are expecting to see. If you want to the x and y limits to be collapsed to
your data limits, you need to do
 ax.axis('tight')
JDH
From: Tyler B <bo...@gm...> - 2009年03月30日 13:22:54
My graph, which had been working just fine, randomly decided to stop filling
the width of the x-axis: http://screencast.com/t/vr3AaXIq
Here's the code I'm using (nothing fancy.. I took out all unnecessary
formatting and it didn't help):
fig = plt.figure(facecolor ='w', frameon=False)
ax = plt.subplot(111)
lines = ax.plot(r_dates, r_inbox, 'w-')
I'm out of ideas.. what could be causing this?
Thanks!
Tyler
From: Cohen-Tanugi J. <co...@lp...> - 2009年03月28日 21:34:22
which kind of data file? ascii? If yes, numpy.loadtxt will be your friend.
Johann
Bala subramanian wrote:
> Friends,
>
> Kindly give me some tips on how to import data from a data file to 
> make the plot.
>
> Thanks,
> Bala
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
From: Cohen-Tanugi J. <joh...@gm...> - 2009年03月28日 21:34:00
which kind of data file? ascii? If yes, numpy.loadtxt will be your friend.
Johann
Bala subramanian wrote:
> Friends,
>
> Kindly give me some tips on how to import data from a data file to 
> make the plot.
>
> Thanks,
> Bala
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
From: Gideon S. <si...@ma...> - 2009年03月28日 21:13:56
I don't know if this is because I upgraded to the current developement 
version of numpy or not, but I when I tried rebuilding matplotlib, I 
generated the following error:
gcc -fno-strict-aliasing -mno-fused-madd -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I/opt/lib/python2.5/site-packages/numpy/core/ 
include -I/sw/include/python2.5 -c src/_macosx.m -o build/ 
temp.macosx-10.5-i386-2.5/src/_macosx.o
In file included from /System/Library/Frameworks/Foundation.framework/ 
Headers/NSAffineTransform.h:5,
 from /System/Library/Frameworks/Foundation.framework/ 
Headers/Foundation.h:13,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:12,
 from src/_macosx.m:1:
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h: 
122: error: expected ‘;’ before ‘__attribute__’
In file included from /System/Library/Frameworks/Foundation.framework/ 
Headers/NSGeometry.h:7,
 from /System/Library/Frameworks/Foundation.framework/ 
Headers/NSAffineTransform.h:6,
 from /System/Library/Frameworks/Foundation.framework/ 
Headers/Foundation.h:13,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:12,
 from src/_macosx.m:1:
/System/Library/Frameworks/Foundation.framework/Headers/NSCoder.h:79: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSCoder.h:87: 
error: expected ‘;’ before ‘__attribute__’
In file included from /System/Library/Frameworks/Foundation.framework/ 
Headers/Foundation.h:15,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:12,
 from src/_macosx.m:1:
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:62: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:66: 
error: expected ‘;’ before ‘__attribute__’
In file included from /System/Library/Frameworks/Foundation.framework/ 
Headers/NSAttributedString.h:5,
 from /System/Library/Frameworks/Foundation.framework/ 
Headers/Foundation.h:16,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:12,
 from src/_macosx.m:1:
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h: 
345: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h: 
346: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h: 
347: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h: 
348: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h: 
349: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h: 
350: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h: 
352: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h: 
353: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h: 
355: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h: 
356: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h: 
357: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h: 
358: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h: 
360: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h: 
361: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h: 
362: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h: 
363: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h: 
364: error: expected ‘;’ before ‘__attribute__’
In file included from /System/Library/Frameworks/Foundation.framework/ 
Headers/NSAttributedString.h:6,
 from /System/Library/Frameworks/Foundation.framework/ 
Headers/Foundation.h:16,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:12,
 from src/_macosx.m:1:
/System/Library/Frameworks/Foundation.framework/Headers/NSDictionary.h: 
45: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSDictionary.h: 
50: error: expected ‘;’ before ‘__attribute__’
In file included from /System/Library/Frameworks/Foundation.framework/ 
Headers/NSHashTable.h:5,
 from /System/Library/Frameworks/Foundation.framework/ 
Headers/Foundation.h:43,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:12,
 from src/_macosx.m:1:
/System/Library/Frameworks/Foundation.framework/Headers/ 
NSPointerFunctions.h:59: error: stray ‘@’ in program
/System/Library/Frameworks/Foundation.framework/Headers/ 
NSPointerFunctions.h:59: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘NSUInteger’
/System/Library/Frameworks/Foundation.framework/Headers/ 
NSPointerFunctions.h:60: error: stray ‘@’ in program
/System/Library/Frameworks/Foundation.framework/Headers/ 
NSPointerFunctions.h:60: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘BOOL’
/System/Library/Frameworks/Foundation.framework/Headers/ 
NSPointerFunctions.h:61: error: stray ‘@’ in program
/System/Library/Frameworks/Foundation.framework/Headers/ 
NSPointerFunctions.h:61: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘NSUInteger’
/System/Library/Frameworks/Foundation.framework/Headers/ 
NSPointerFunctions.h:62: error: stray ‘@’ in program
/System/Library/Frameworks/Foundation.framework/Headers/ 
NSPointerFunctions.h:62: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘NSString’
/System/Library/Frameworks/Foundation.framework/Headers/ 
NSPointerFunctions.h:65: error: stray ‘@’ in program
/System/Library/Frameworks/Foundation.framework/Headers/ 
NSPointerFunctions.h:65: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘void’
/System/Library/Frameworks/Foundation.framework/Headers/ 
NSPointerFunctions.h:66: error: stray ‘@’ in program
/System/Library/Frameworks/Foundation.framework/Headers/ 
NSPointerFunctions.h:66: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘void’
/System/Library/Frameworks/Foundation.framework/Headers/ 
NSPointerFunctions.h:69: error: stray ‘@’ in program
/System/Library/Frameworks/Foundation.framework/Headers/ 
NSPointerFunctions.h:69: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘BOOL’
/System/Library/Frameworks/Foundation.framework/Headers/ 
NSPointerFunctions.h:70: error: stray ‘@’ in program
/System/Library/Frameworks/Foundation.framework/Headers/ 
NSPointerFunctions.h:70: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘BOOL’
In file included from /System/Library/Frameworks/Foundation.framework/ 
Headers/NSKeyValueCoding.h:9,
 from /System/Library/Frameworks/Foundation.framework/ 
Headers/Foundation.h:49,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:12,
 from src/_macosx.m:1:
/System/Library/Frameworks/Foundation.framework/Headers/NSSet.h:45: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSSet.h:50: 
error: expected ‘;’ before ‘__attribute__’
In file included from /System/Library/Frameworks/Foundation.framework/ 
Headers/Foundation.h:76,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:12,
 from src/_macosx.m:1:
/System/Library/Frameworks/Foundation.framework/Headers/NSRunLoop.h: 
44: error: expected ‘;’ before ‘__attribute__’
In file included from /System/Library/Frameworks/Foundation.framework/ 
Headers/NSURL.h:6,
 from /System/Library/Frameworks/Foundation.framework/ 
Headers/Foundation.h:88,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:12,
 from src/_macosx.m:1:
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
52: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
53: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
54: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
55: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
56: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
67: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
68: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
70: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
71: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
73: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
74: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
76: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
77: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
79: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
80: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
83: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
86: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
89: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
90: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
93: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
94: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
95: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
97: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
98: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
99: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
100: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
102: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
103: error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: 
104: error: expected ‘;’ before ‘__attribute__’
In file included from /System/Library/Frameworks/Foundation.framework/ 
Headers/Foundation.h:88,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:12,
 from src/_macosx.m:1:
/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:75: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:76: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:77: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:78: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:83: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:84: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:85: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:88: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:89: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:91: 
error: expected ‘;’ before ‘__attribute__’
In file included from /System/Library/Frameworks/AppKit.framework/ 
Headers/AppKit.h:19,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:13,
 from src/_macosx.m:1:
/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h: 
68: error: expected specifier-qualifier-list before ‘__weak’
In file included from /System/Library/Frameworks/AppKit.framework/ 
Headers/AppKit.h:27,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:13,
 from src/_macosx.m:1:
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:215: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:216: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:217: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:218: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:219: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:220: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:221: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:222: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:223: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:224: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:227: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:228: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:229: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:230: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:231: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:232: 
error: expected ‘;’ before ‘__attribute__’
In file included from /System/Library/Frameworks/AppKit.framework/ 
Headers/NSPanel.h:8,
 from /System/Library/Frameworks/AppKit.framework/ 
Headers/NSFontPanel.h:8,
 from /System/Library/Frameworks/AppKit.framework/ 
Headers/AppKit.h:30,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:13,
 from src/_macosx.m:1:
/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:471: 
error: expected ‘;’ before ‘__attribute__’
/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:472: 
error: expected ‘;’ before ‘__attribute__’
In file included from /System/Library/Frameworks/AppKit.framework/ 
Headers/AppKit.h:78,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:13,
 from src/_macosx.m:1:
/System/Library/Frameworks/AppKit.framework/Headers/NSPrintPanel.h:57: 
error: stray ‘@’ in program
/System/Library/Frameworks/AppKit.framework/Headers/NSPrintPanel.h:61: 
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘-’ token
In file included from /System/Library/Frameworks/AppKit.framework/ 
Headers/AppKit.h:95,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:13,
 from src/_macosx.m:1:
/System/Library/Frameworks/AppKit.framework/Headers/NSTrackingArea.h: 
44: error: expected specifier-qualifier-list before ‘__weak’
In file included from /System/Library/Frameworks/AppKit.framework/ 
Headers/NSTextView.h:16,
 from /System/Library/Frameworks/AppKit.framework/ 
Headers/AppKit.h:112,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:13,
 from src/_macosx.m:1:
/System/Library/Frameworks/AppKit.framework/Headers/ 
NSTextInputClient.h:17: error: stray ‘@’ in program
/System/Library/Frameworks/AppKit.framework/Headers/ 
NSTextInputClient.h:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘-’ token
/System/Library/Frameworks/AppKit.framework/Headers/ 
NSTextInputClient.h:62: error: stray ‘@’ in program
/System/Library/Frameworks/AppKit.framework/Headers/ 
NSTextInputClient.h:65: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘-’ token
In file included from /System/Library/Frameworks/AppKit.framework/ 
Headers/AppKit.h:153,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:13,
 from src/_macosx.m:1:
/System/Library/Frameworks/AppKit.framework/Headers/NSATSTypesetter.h: 
46: error: expected ‘;’ before ‘__attribute__’
In file included from /System/Library/Frameworks/AppKit.framework/ 
Headers/NSObjectController.h:10,
 from /System/Library/Frameworks/AppKit.framework/ 
Headers/AppKit.h:158,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:13,
 from src/_macosx.m:1:
/System/Library/Frameworks/CoreData.framework/Headers/NSFetchRequest.h: 
24: error: expected specifier-qualifier-list before ‘__weak’
In file included from /System/Library/Frameworks/CoreData.framework/ 
Headers/NSAttributeDescription.h:10,
 from /System/Library/Frameworks/AppKit.framework/ 
Headers/NSPredicateEditorRowTemplate.h:13,
 from /System/Library/Frameworks/AppKit.framework/ 
Headers/AppKit.h:175,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:13,
 from src/_macosx.m:1:
/System/Library/Frameworks/CoreData.framework/Headers/ 
NSPropertyDescription.h:25: error: expected specifier-qualifier-list 
before ‘__weak’
In file included from /System/Library/Frameworks/AppKit.framework/ 
Headers/AppKit.h:176,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:13,
 from src/_macosx.m:1:
/System/Library/Frameworks/AppKit.framework/Headers/NSPathCell.h:148: 
error: stray ‘@’ in program
/System/Library/Frameworks/AppKit.framework/Headers/NSPathCell.h:152: 
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘-’ token
In file included from /System/Library/Frameworks/AppKit.framework/ 
Headers/AppKit.h:177,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:13,
 from src/_macosx.m:1:
/System/Library/Frameworks/AppKit.framework/Headers/NSPathControl.h: 
73: error: stray ‘@’ in program
/System/Library/Frameworks/AppKit.framework/Headers/NSPathControl.h: 
77: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘-’ 
token
In file included from /System/Library/Frameworks/CoreData.framework/ 
Headers/CoreData.h:14,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:14,
 from src/_macosx.m:1:
/System/Library/Frameworks/CoreData.framework/Headers/ 
NSEntityDescription.h:28: error: expected specifier-qualifier-list 
before ‘__weak’
/System/Library/Frameworks/CoreData.framework/Headers/ 
NSEntityDescription.h:32: error: expected specifier-qualifier-list 
before ‘__weak’
/System/Library/Frameworks/CoreData.framework/Headers/ 
NSEntityDescription.h:33: error: expected specifier-qualifier-list 
before ‘__weak’
In file included from /System/Library/Frameworks/CoreData.framework/ 
Headers/CoreData.h:17,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:14,
 from src/_macosx.m:1:
/System/Library/Frameworks/CoreData.framework/Headers/ 
NSRelationshipDescription.h:28: error: expected specifier-qualifier- 
list before ‘__weak’
In file included from /System/Library/Frameworks/CoreData.framework/ 
Headers/CoreData.h:22,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:14,
 from src/_macosx.m:1:
/System/Library/Frameworks/CoreData.framework/Headers/ 
NSManagedObject.h:26: error: expected specifier-qualifier-list before 
‘__weak’
In file included from /System/Library/Frameworks/CoreData.framework/ 
Headers/CoreData.h:25,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:14,
 from src/_macosx.m:1:
/System/Library/Frameworks/CoreData.framework/Headers/ 
NSPersistentStoreCoordinator.h:172: error: expected ‘;’ before 
‘__attribute__’
In file included from /System/Library/Frameworks/CoreData.framework/ 
Headers/CoreData.h:27,
 from /System/Library/Frameworks/Cocoa.framework/ 
Headers/Cocoa.h:14,
 from src/_macosx.m:1:
/System/Library/Frameworks/CoreData.framework/Headers/ 
NSPersistentStore.h:16: error: expected specifier-qualifier-list 
before ‘__weak’
error: command 'gcc' failed with exit status 1
The settings detected by the script are:
BUILDING MATPLOTLIB
 matplotlib: 0.98.5.2
 python: 2.5.4 (r254:67916, Mar 18 2009, 09:51:51) [GCC
 4.0.1 (Apple Inc. build 5490)]
 platform: darwin
REQUIRED DEPENDENCIES
 numpy: 1.4.0.dev6729
 freetype2: 9.19.3
OPTIONAL BACKEND DEPENDENCIES
 libpng: 1.2.33
 Tkinter: Tkinter: 67737, Tk: 8.4, Tcl: 8.4
 wxPython: no
 * wxPython not found
Xlib: extension "Generic Event Extension" missing on display "/tmp/ 
launch-EgEkbJ/:0".
Xlib: extension "Generic Event Extension" missing on display "/tmp/ 
launch-EgEkbJ/:0".
Xlib: extension "Generic Event Extension" missing on display "/tmp/ 
launch-EgEkbJ/:0".
 Gtk+: gtk+: 2.14.7, glib: 2.18.4, pygtk: 2.12.1,
 pygobject: 2.15.4
 Mac OS X native: yes
 Qt: Qt: 3.3.8, PyQt: 3.17.5
 Qt4: Qt: 4.4.1, PyQt4: 4.4.4
 Cairo: 1.8.2
OPTIONAL DATE/TIMEZONE DEPENDENCIES
 datetime: present, version unknown
 dateutil: matplotlib will provide
 pytz: 2008c
OPTIONAL USETEX DEPENDENCIES
 dvipng: 1.5
 ghostscript: 8.61
 latex: 3.141592
-gideon
From: Nathaniel T. <loc...@ya...> - 2009年03月28日 19:15:14
Hi,
I'm using the code copied straight from the simple tkagg animation example at:
http://matplotlib.sourceforge.net/examples/animation/simple_anim_tkagg.html
It starts up fine and I can see the moving sine wave, however, after about 15 to 20 seconds the plotting window freezes showing "Figure 1 (Not Responding)" and that's that. Adding an additional line, "print i" just before "line.set_ydata(...)" shows that even once the window has frozen the code is still being executed. Has anyone had this problem and solved it?
I'm on Windows Vista running:
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32
Matplotlib v0.98.3
numpy v1.2.0
Tkinter $Revision: 50704 $
Thanks
From: Markus H. <mar...@st...> - 2009年03月28日 16:47:19
Am Freitag, den 27.03.2009, 07:58 -0500 schrieb John Hunter:
> 
> 
> On Fri, Mar 27, 2009 at 5:00 AM, marcusantonius
> <mar...@st...> wrote:
> 
> Hi,
> 
> I have a problem when saving my plot as a png. The horizontal
> lines, which I
> inserted via
> axhline(y=0.136, xmin=0., xmax=1, color='black',ls=':')
> axhline(y=0.094, xmin=0., xmax=1, color='black',ls=':')
> are not displayed right in the png file. Saving in pdf works
> perfectly. I
> enclosed the two files in this email.
> http://www.nabble.com/file/p22738740/p25.pdf p25.pdf
> http://www.nabble.com/file/p22738740/p25.png p25.png
> 
> Is there a way to fix this problem?
> 
> 
> This appears to be working fine for me with svn matplotlib -- what
> version are you using? See also:
> http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#report-a-problem for information about how to obtain version and other configuration information.
> 
I am using 0.98.3-3, which is in the Ubuntu packages.
Cheers,
Markus
From: Sandro T. <mo...@de...> - 2009年03月28日 15:20:17
On Sat, Mar 28, 2009 at 15:45, Bala subramanian
<bal...@gm...> wrote:
> Friends,
> In the following. I am not able to understand how this plot.show() works. I
> have commented the problem in the following examples.
You have to call plt.show() only when you want to actually show the
figure. That's because you're using python command interpreter.
Try:
plt.plot(x,y,'b-')
plt.ylim( (1.5,4.5) )
plt.show()
If you want to do interactive plotting, I suggest using ipython.
ipython -pylab
already import the pylab module, that provide all the pyplot functions.
I prefer to do something like
$ipython
 import matplotlib.pyplot as plt
 plt.ion() # incase it's not already in interactive mode
 <do my printing>
This way, it will open the figure window and you'll be able to
"decorate" the plot in the ipython shell and see the result applied to
the "background" figure with no need to execute "plt.show()" or close
the windows between a command and a "show()".
Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
From: Bala s. <bal...@gm...> - 2009年03月28日 14:45:48
Friends,
In the following. I am not able to understand how this plot.show() works. I
have commented the problem in the following examples.
>>> plt.plot(x,y,'b-')
[<matplotlib.lines.Line2D object at 0x9e50ecc>]
>>> plt.show() *# shows the plot of x Vs y*
>>> plt.ylim( (1.5,4.5) )
(1.5, 4.5)
>>> plt.show() *# Does nt show the plot*
>>> plt.ylim( ymin=1.5,ymax=4.5 )
(1.5, 4.5)
>>> plt.show() *# Does nt show the plot*
Thanks,
Bala
From: Bala s. <bal...@gm...> - 2009年03月28日 13:47:47
Friends,
Kindly give me some tips on how to import data from a data file to make the
plot.
Thanks,
Bala
From: Xavier G. <xav...@gm...> - 2009年03月27日 19:25:57
> Hello,
>
> I have a demo application integrating a dynamic mpl plot into a PyQt GUI.
> The plot is dynamic in the sense that the user can manipulate it through the
> use of the GUI's (PyQt) widgets and controls. The code is in:
> http://eli.thegreenplace.net/files/prog_code/qt_mpl_bars.py.txt
>
> Now, I have a slight problem. When the plot is zoomed with the toolbar's
> standard "zoom to rectangle" tool, and then the window is switched in an out
> of focus, the zoom level disappears and the plot comes bac k to "home" mode. 
>
> How can I make it persist? Can I somehow query the zoom state of the plot
> and restore it?
>
> Thanks
> Eli
> 
Ok so at least you can reproduce with bug ;)
Maybe we should ask matplolib to render into a buffer widget...but I not
sure.
However, I'm pretty sure we should not call matplotlib on every draw event.
Any ideas??
Xavier
From: Fabrice S. <si...@lm...> - 2009年03月27日 18:00:29
Le vendredi 27 mars 2009 à 18:15 +0100, Bala subramanian a écrit :
> I have to make multiple plot on the same page. Six row and three
> column. Kindly suggest me some tips to do the same.
I suggest you to have a look to the matplotlib gallery, in particular
this example 
http://matplotlib.sourceforge.net/examples/pylab_examples/psd_demo2.html
You need to define subplots using the pyplot interface
http://matplotlib.sourceforge.net/api/pyplot_api.html?#matplotlib.pyplot.subplot
or the matplotlib API 
http://matplotlib.sourceforge.net/api/axes_api.html?#matplotlib.axes.Subplot
With many subplots, you may pay attention with the figure size, that you
can define with the 'figsize' and 'dpi' keyword arguments of the figure
function :
http://matplotlib.sourceforge.net/api/pyplot_api.html?#matplotlib.pyplot.figure
-- 
Fabrice Silva <si...@lm...>
LMA UPR CNRS 7051
From: John H. <jd...@gm...> - 2009年03月27日 17:44:46
On Fri, Mar 27, 2009 at 12:15 PM, Bala subramanian <
bal...@gm...> wrote:
>
> I have to make multiple plot on the same page. Six row and three column.
> Kindly suggest me some tips to do the same.
This is covered in the tutorial I referred you to in my first response,
 http://matplotlib.sourceforge.net/users/pyplot_tutorial.html
specifically the section "Working with multiple figures and axes"
http://matplotlib.sourceforge.net/users/pyplot_tutorial.html#working-with-multiple-figures-and-axes
To make six rows and three columns, you do
 subplot(6,3,1)
 subplot(6,3,2)
 ...
 subplot(6,3,18)
See also the documentation for the subplot command
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.subplot
JDH
15 messages has been excluded from this view by a project administrator.

Showing results of 394

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