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
(12) |
2
(13) |
|
3
(4) |
4
(34) |
5
(14) |
6
(23) |
7
(26) |
8
(12) |
9
(7) |
|
10
(7) |
11
(9) |
12
(12) |
13
(20) |
14
(14) |
15
(13) |
16
(5) |
|
17
(4) |
18
(22) |
19
(29) |
20
(13) |
21
(9) |
22
(22) |
23
(3) |
|
24
(3) |
25
(29) |
26
(9) |
27
(10) |
28
(16) |
29
(16) |
30
(16) |
|
31
(9) |
|
|
|
|
|
|
|
From: Michael D. <md...@st...> - 2010-10-11 15:03:14
|
You have a choice of the built-in math layout engine (mathtext) and using the real LaTeX for this. The rcParam "text.usetex", when True, will use LaTeX. I'm not sure I fully understand the question, though. To get the Greek alpha character, Unicode will be used in the output. You've demonstrated that you don't have to use Unicode in the input, however, as you can say "$\alpha_0$". What is it you're trying to avoid? Mike On 10/11/2010 10:57 AM, Ruggero wrote: > Hello, how I can write a simple formula like this: $\alpha_0$ without > latex using unicode? My problem is how to write sub(super)script. > Thanks. > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2& L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA |
|
From: Ruggero <giu...@gm...> - 2010-10-11 14:58:23
|
Hello, how I can write a simple formula like this: $\alpha_0$ without latex using unicode? My problem is how to write sub(super)script. Thanks. |
|
From: Bartosz T. <b.t...@bi...> - 2010-10-11 09:44:37
|
Dear all, I am working on a custom toolbar with annotation tools (such as arrows, text etc.) which would be a replacement or addition to the standard navigation toolbar usually available at the bottom of the figure window. So far in order to add the toolbar I use the example embedding_in_gtk2.py. Unfortunately this works only with gtk backends. Is there a way to add the toolbar to the window in a backend-independent way? For example, the following syntax would be very convenient: fig = figure() tbar = NavigationToolbar() fig.add_toolbar(tbar) With such an API one could define on the runtime which toolbar should be avialable. Adding multiple toolbar would be also possible. Yours, Bartosz Bartosz Telenczuk Institute for Theoretical Biology Humboldt University of Berlin Germany http://neuroscience.telenczuk.pl |
|
From: Alessio C. <via...@gm...> - 2010-10-11 06:29:21
|
Thanks Goyo and Jae-Joon Lee. It worked! it worked! Goyo wrote: > > 2010/10/10 Alessio Civ <via...@gm...>: >> >> >> Please, can someone help me? I've been digging the documentation, but I >> can't find a way to do this. > > ¿Didn't you get my message on oct-5? I didn't send it to the list by > mistake: > > --%<---------------------------------------------------------------------------- > Make your variables numpy arrays and slice them using values in z: > > x = np.array([1, 2, 3, 4]) > y = np.array([2, 3, 4, 5]) > z = np.array([0, 1, 0, 1]) > > x0 = x[z == 0] > y0 = y[z == 1] > x1 = x[z == 0] > y1 = y[z == 1] > > plt.scatter(x0, y0, c='b') > plt.scatter(x1, y1, c='r') > > --%<------------------------------------------------------------------------ > > See the attached example, you can run it as a script or import it as a > module and use the function multi_scatter in your code. > > Goyo > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://old.nabble.com/Scatter-Plot-with-different-colors-tp29887701p29931461.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Burak T. <bz...@ps...> - 2010-10-11 01:54:57
|
I am trying to show the numbers at x and y axis in scientific notation but it does not work. Can anyone help me. Thank you in advance. Here is the code and fs is 60 000 000. from matplotlib.ticker import ScalarFormatter formatter = ScalarFormatter(useMathText=True) formatter.set_scientific(True) formatter.set_powerlimits((-1,3)) fig1 = plt.figure() ax1 = fig1.gca(projection='3d', azim=0) ax1.xaxis.set_major_formatter(formatter) ax1.yaxis.set_major_formatter(formatter) tau_val, freq_val = npy.meshgrid(npy.float64(tau_val)/fs, npy.float64(freq_val)*fs) ax1.plot_surface(tau_val, freq_val, caf, rstride=1, cstride=1, cmap=cm.jet, linewidth=0, antialiased=False) plt.show() |
|
From: Benoit G. <ben...@un...> - 2010-10-10 19:13:59
|
Hi,
How can one display Mandarin labels in a plot, as yticks_labels for example?
It looks to me that there is no font in matplotlib that can display Chinese
characters? I can display accentuation from 'utf8' but i could not find a
font family that would display Chinese characters.
Here is an example of plot that displays empty boxes instead of Chinese
characters. In comments you can see various failed attempts:
import matplotlib as mpl
from matplotlib import cm
from matplotlib import rc
#rc('font',**{'family':'sans-serif','sans-serif':['SimHei','Arial']})
#mpl.rcParams['font.sans-serif'] = ['SimHei','Arial']
import matplotlib.pyplot as plt
matrix=[[skey+tkey for skey in [1,2]] for tkey in [1,2]]
fig = plt.figure()
axim = fig.add_subplot(111)
#ytics: caractères chinois en utf8
ytics=['\xe6\x8a\xb1'.decode('utf8'),'\xe6\x93\x81'.decode('utf8')]
xtics=['d\xc3\xa9bo\xc3\xaeter'.decode('utf8'),'diviser'.decode('utf8')]
axim.imshow(matrix, cmap=cm.jet, interpolation='nearest',origin='lower')
axim.set_xticks(range(2))
axim.set_xticklabels(xtics,fontsize=15,rotation=25,ha='right',family='monospace')
axim.set_yticks(range(2))
axim.set_yticklabels(ytics,fontsize=15,family='fantasy')#,fontname='AR
PL ungtiL GB')
plt.show()
Thank you for your help,
Benoit
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
|
|
From: Alessio C. <via...@gm...> - 2010-10-10 18:50:25
|
Hi,
thanks for reply.
My problem is that I need to scatter data of different periods but in the
same x.
For example, the quantity x sold in March is 1 at price y of 2, the quantity
sold in April is 2 at price y of 3. I want the 2 points to have different
colors in the same graph!
Now I'm doing:
for i in list:
x.append(i[0])
y.append(i[1])
axScatter.scatter(x, y, c='r', marker='s')
This makes al the points red! I want to be able to put points of different
colors for different periods of time. Basically, I want to know how to
define a function in order to change the color of the points for specific
definitions.
Jae-Joon Lee wrote:
>
> On Tue, Oct 5, 2010 at 11:07 PM, Alessio Civ <via...@gm...>
> wrote:
>>
>> Hi,
>>
>> I'm trying to make a scatter plot of 2 variables using a thirds as filter
>> to
>> have different colors.
>>
>> Let's say I have those data:
>>
>> x=1,2,3,4
>> y=2,3,4,5
>> z=0,1,0,1
>>
>> Then I want the values of x and y corresponding to those of z=0 to be of
>> a
>> color and those corresponding to z=1 to be of another color.
>>
>> This is the code I manage to do until know:
>>
>>
>> import xlrd
>> import numpy as np
>> import matplotlib.pyplot as plt
>>
>> wb = xlrd.open_workbook('GBL2009.xls')
>> sh = wb.sheet_by_index(0)
>>
>> def column_pos():
>> first_row=sh.row_values(0)
>> net_p=""
>> for i in first_row:
>> if i=='net_price':
>> net_p=first_row.index(i) #In gets the column position
>> for i in first_row:
>> if i=='material':
>> mat_p=first_row.index(i) #In gets the column position
>> for i in first_row:
>> if i=='qty':
>> qty_p=first_row.index(i) #In gets the column position
>> print net_p, mat_p, qty_p
>> #filtering(net_p, mat_p, qty_p)
>> test(net_p, mat_p, qty_p)
>>
>>
>> def test(net_p, mat_p, qty_p):
>> list=[]
>> for rownum in range(sh.nrows):
>> if sh.cell(rownum,mat_p).value in (96433890, 96433886):
>> list.append(sh.row_values(rownum))
>>
>> x=[]
>> y=[]
>> z=[]
>> for i in list:
>> x.append(i[qty_p])
>> y.append(i[net_p])
>> z.append(i[mat_p])
>>
>> fig = plt.figure(1, figsize=(5.5,5.5))
>> axScatter = plt.subplot(111)
>>
>> colors = ('r', 'g', 'b', 'k')
>> for c in colors:
>> axScatter.scatter(x, y, c=c, marker='s')
>>
>> plt.show()
>>
>
> So, what is your problem?
> If you want to post a code, please post a complete (but simple!) code.
>
> If you want to map values of z to colors, a simple solution would be
> to use dict.
>
> z = [0,1,0,1]
> color_map = {0:"r", 1:"g"}
> z_as_colors = map(color_map.get, z)
>
> scatter supports colormap but it may not very useful for your case.
>
> Regards,
>
> -JJ
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
> Spend less time writing and rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
View this message in context: http://old.nabble.com/Scatter-Plot-with-different-colors-tp29887701p29928970.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Alessio C. <via...@gm...> - 2010-10-10 18:42:26
|
Hi Butterw, first of all, if you are working on data a lot, we could get in contact. I need to work better on my scripts and we could help each other. I've uploaded my script that imports from csv to sqlite. It's not a totally clean script, as I am working on something else now I couldn't clean what I did. Anyway, you should get an idea of what it does. Basically, the script cleans up the messed data from excel (take out the comas, puts point, convert numbers to floats). Then, the scripts writes the resulting tuple in an sqlite database. This script import over 200000 records in around 3 seconds. After this, you can access your data connecting to sqlite. Accessing sqlite data is extremely easy and efficient. I'm uploading a small script to plot from Sqlite and getting the values for a linear regression, it just works fine and smoothly. Let me know if are interested in helping each other. http://old.nabble.com/file/p29928938/SqlitePlot_GDF.py SqlitePlot_GDF.py http://old.nabble.com/file/p29928938/SqliteImportCsv.py SqliteImportCsv.py butterw wrote: > > Hi, > > > To load csv data, I use a modified version of csv2rec for which the > data type of each column is specified explicitly in the data file. > By removing the dtype guessing you get a speedup and you also avoid > potential mess-ups. > > > Alessio: sadly you right about it not being possible to trust Excel with > data. > Could you please give more details on the sqlite method you suggest ? > > > -- >>> by Alessio Civ Oct 10, 2010; 09:04am: > Hi, > > a strong advice from someone who is using excel format with tons of > data is to save them in csv and then import in Sqlite. > > Excel messes up the data types and gives a lot of troubles with > numbers. Sqlite is fast and data are secure. > The power of this system is that you can query your data and plot what > you need for example. > > I can share with you my script to import from csv to sqlite if you want. > > > -- > thanks, > peter butterworth > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://old.nabble.com/Best-way-to-use-Excel-Data-tp29908079p29928938.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Peter B. <bu...@gm...> - 2010-10-10 10:56:35
|
Hi, To load csv data, I use a modified version of csv2rec for which the data type of each column is specified explicitly in the data file. By removing the dtype guessing you get a speedup and you also avoid potential mess-ups. Alessio: sadly you right about it not being possible to trust Excel with data. Could you please give more details on the sqlite method you suggest ? -- >> by Alessio Civ Oct 10, 2010; 09:04am: Hi, a strong advice from someone who is using excel format with tons of data is to save them in csv and then import in Sqlite. Excel messes up the data types and gives a lot of troubles with numbers. Sqlite is fast and data are secure. The power of this system is that you can query your data and plot what you need for example. I can share with you my script to import from csv to sqlite if you want. -- thanks, peter butterworth |
|
From: Goyo <goy...@gm...> - 2010-10-10 10:05:44
|
2010/10/10 Alessio Civ <via...@gm...>: > > > Please, can someone help me? I've been digging the documentation, but I > can't find a way to do this. ¿Didn't you get my message on oct-5? I didn't send it to the list by mistake: --%<---------------------------------------------------------------------------- Make your variables numpy arrays and slice them using values in z: x = np.array([1, 2, 3, 4]) y = np.array([2, 3, 4, 5]) z = np.array([0, 1, 0, 1]) x0 = x[z == 0] y0 = y[z == 1] x1 = x[z == 0] y1 = y[z == 1] plt.scatter(x0, y0, c='b') plt.scatter(x1, y1, c='r') --%<------------------------------------------------------------------------ See the attached example, you can run it as a script or import it as a module and use the function multi_scatter in your code. Goyo |
|
From: Alessio C. <via...@gm...> - 2010-10-10 07:04:09
|
Hi, a strong advice from someone who is using excel format with tons of data is to save them in csv and then import in Sqlite. Excel messes up the data types and gives a lot of troubles with numbers. Sqlite is fast and data are secure. The power of this system is that you can query your data and plot what you need for example. I can share with you my script to import from csv to sqlite if you want. Jahan Mohiuddin wrote: > > Hi, > > I am an novice-intermediate user of python (I took a 1 semester course > in scientific programming with python). I wanted to know what the > best way is to manipulate, analyze, and plot Microsoft Excel data. > The methods I've looked into: > > 1. Save data in CSV file and use csv.dictreader to create a > dictionary. I actually couldn't figure this one out. > > 2. Read the CSV and extract the numerical data into an array of > floats so I can manipulate the data. This is alright but then I lose > the text for the header row. > > > > I have a fairly large biological data set, but I also really just want > to practice with a good method. Any advice is much appreciated. > Thanks! > > > > -Jahan > > > Jahan Mohiuddin > University of North Carolina at Chapel Hill, 2010 > Cell: (516) 480-4825 > > > > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://old.nabble.com/Best-way-to-use-Excel-Data-tp29908079p29926020.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Alessio C. <via...@gm...> - 2010-10-10 06:58:10
|
Please, can someone help me? I've been digging the documentation, but I
can't find a way to do this.
Alessio Civ wrote:
>
> Hi,
>
> I'm trying to make a scatter plot of 2 variables using a thirds as filter
> to have different colors.
>
> Let's say I have those data:
>
> x=1,2,3,4
> y=2,3,4,5
> z=0,1,0,1
>
> Then I want the values of x and y corresponding to those of z=0 to be of a
> color and those corresponding to z=1 to be of another color.
>
> This is the code I manage to do until know:
>
>
> import xlrd
> import numpy as np
> import matplotlib.pyplot as plt
>
> wb = xlrd.open_workbook('GBL2009.xls')
> sh = wb.sheet_by_index(0)
>
> def column_pos():
> first_row=sh.row_values(0)
> net_p=""
> for i in first_row:
> if i=='net_price':
> net_p=first_row.index(i) #In gets the column position
> for i in first_row:
> if i=='material':
> mat_p=first_row.index(i) #In gets the column position
> for i in first_row:
> if i=='qty':
> qty_p=first_row.index(i) #In gets the column position
> print net_p, mat_p, qty_p
> #filtering(net_p, mat_p, qty_p)
> test(net_p, mat_p, qty_p)
>
>
> def test(net_p, mat_p, qty_p):
> list=[]
> for rownum in range(sh.nrows):
> if sh.cell(rownum,mat_p).value in (96433890, 96433886):
> list.append(sh.row_values(rownum))
>
> x=[]
> y=[]
> z=[]
> for i in list:
> x.append(i[qty_p])
> y.append(i[net_p])
> z.append(i[mat_p])
>
> fig = plt.figure(1, figsize=(5.5,5.5))
> axScatter = plt.subplot(111)
>
> colors = ('r', 'g', 'b', 'k')
> for c in colors:
> axScatter.scatter(x, y, c=c, marker='s')
>
> plt.show()
>
>
--
View this message in context: http://old.nabble.com/Scatter-Plot-with-different-colors-tp29887701p29926014.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Benjamin R. <ben...@ou...> - 2010-10-09 17:46:52
|
On Sat, Oct 9, 2010 at 7:41 AM, Paul Leopardi <pau...@ii...>wrote: > On Saturday 09 October 2010 22:58:04 Paul Leopardi wrote: > > Hello all > > I am seeing a problem similar to that seen by Jorge Scandaliaris. > > I downgraded from matplotlib 1.0.0 to matplotlib 0.99 and my original > problem > no longer appears: > > leopardi@linfinit:~/src/Working/Working-0.5.1/glucat/pyclical> rpm -q -a | > grep matplotlib | sort > python-matplotlib-0.99.1.1-0.pm.1.8.x86_64 > leopardi@linfinit:~/src/Working/Working-0.5.1/glucat/pyclical> ipython > -pylab > Your PyGtk has set_interactive(), so you can use the > more stable single-threaded Gtk mode. > See https://bugs.launchpad.net/ipython/+bug/270856 > Python 2.6.2 (r262:71600, Jun 17 2010, 13:37:45) > Type "copyright", "credits" or "license" for more information. > > IPython 0.10 -- An enhanced Interactive Python. > ? -> Introduction and overview of IPython's features. > %quickref -> Quick reference. > help -> Python's own help system. > object? -> Details about 'object'. ?object also works, ?? prints more. > > Welcome to pylab, a matplotlib-based Python environment. > For more information, type 'help(pylab)'. > > In [1]: from mpl_toolkits.mplot3d import Axes3D > > In [2]: import matplotlib.pyplot as plt > > In [3]: fig=plt.figure() > /usr/lib64/python2.6/site-packages/matplotlib/backends/backend_gtk.py:621: > DeprecationWarning: Use the new widget gtk.Tooltip > self.tooltips = gtk.Tooltips() > > In [4]: ax=Axes3D(fig) > > In [5]: plt.show() > > In [6]: quit() > Do you really want to exit ([y]/n)? y > Closing threads... Done. > > After upgrading to Matplotlib 0.99: > > leopardi@linfinit:~/src/Working/Working-0.5.1/glucat/pyclical> rpm -q -a | > grep matplotlib | sort > python-matplotlib-1.0.0-9.2.x86_64 > python-matplotlib-tk-1.0.0-9.2.x86_64 > python-matplotlib-wx-1.0.0-9.2.x86_64 > > leopardi@linfinit:~/src/Working/Working-0.5.1/glucat/pyclical> ipython > -pylab > Python 2.6.2 (r262:71600, Jun 17 2010, 13:37:45) > Type "copyright", "credits" or "license" for more information. > > IPython 0.10 -- An enhanced Interactive Python. > ? -> Introduction and overview of IPython's features. > %quickref -> Quick reference. > help -> Python's own help system. > object? -> Details about 'object'. ?object also works, ?? prints more. > > Welcome to pylab, a matplotlib-based Python environment. > For more information, type 'help(pylab)'. > > In [1]: from mpl_toolkits.mplot3d import Axes3D > > In [2]: import matplotlib.pyplot as plt > > In [3]: fig=plt.figure() > > In [4]: ax=Axes3D(fig) > > In [5]: plt.show() > ^CERROR: An unexpected error occurred while tokenizing input > The following traceback may be corrupted or invalid > The error message is: ('EOF in multi-line statement', (206, 0)) > > --------------------------------------------------------------------------- > KeyboardInterrupt Traceback (most recent call last) > > /home/leopardi/src/Working/Working-0.5.1/glucat/pyclical/<ipython console> > in > <module>() > > /usr/lib64/python2.6/site-packages/matplotlib/backends/backend_tkagg.pyc in > show() > 72 for manager in Gcf.get_all_fig_managers(): > 73 manager.show() > ---> 74 Tk.mainloop() > 75 > 76 def new_figure_manager(num, *args, **kwargs): > > /usr/lib64/python2.6/lib-tk/Tkinter.pyc in mainloop(n) > 323 def mainloop(n=0): > 324 """Run the main loop of Tcl.""" > --> 325 _default_root.tk.mainloop(n) > 326 > 327 getint = int > > KeyboardInterrupt: > > In [6]: > In [6]: quit() > Do you really want to exit ([y]/n)? y > > I believe this was a known issue that came about from some fixes made to the behavior of show() for the 1.0 release. It was patched shortly thereafter and the maintenance branch was also patched. As a workaround, I believe you can try one of the other backends or install matplotlib from source. Does anybody know who maintains the packages for OpenSUSE? It would probably be prudent to poke them to update. Ben Root |
|
From: Paul L. <pau...@ii...> - 2010-10-09 12:42:03
|
On Saturday 09 October 2010 22:58:04 Paul Leopardi wrote: > Hello all > I am seeing a problem similar to that seen by Jorge Scandaliaris. I downgraded from matplotlib 1.0.0 to matplotlib 0.99 and my original problem no longer appears: leopardi@linfinit:~/src/Working/Working-0.5.1/glucat/pyclical> rpm -q -a | grep matplotlib | sort python-matplotlib-0.99.1.1-0.pm.1.8.x86_64 leopardi@linfinit:~/src/Working/Working-0.5.1/glucat/pyclical> ipython -pylab Your PyGtk has set_interactive(), so you can use the more stable single-threaded Gtk mode. See https://bugs.launchpad.net/ipython/+bug/270856 Python 2.6.2 (r262:71600, Jun 17 2010, 13:37:45) Type "copyright", "credits" or "license" for more information. IPython 0.10 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. Welcome to pylab, a matplotlib-based Python environment. For more information, type 'help(pylab)'. In [1]: from mpl_toolkits.mplot3d import Axes3D In [2]: import matplotlib.pyplot as plt In [3]: fig=plt.figure() /usr/lib64/python2.6/site-packages/matplotlib/backends/backend_gtk.py:621: DeprecationWarning: Use the new widget gtk.Tooltip self.tooltips = gtk.Tooltips() In [4]: ax=Axes3D(fig) In [5]: plt.show() In [6]: quit() Do you really want to exit ([y]/n)? y Closing threads... Done. After upgrading to Matplotlib 0.99: leopardi@linfinit:~/src/Working/Working-0.5.1/glucat/pyclical> rpm -q -a | grep matplotlib | sort python-matplotlib-1.0.0-9.2.x86_64 python-matplotlib-tk-1.0.0-9.2.x86_64 python-matplotlib-wx-1.0.0-9.2.x86_64 leopardi@linfinit:~/src/Working/Working-0.5.1/glucat/pyclical> ipython -pylab Python 2.6.2 (r262:71600, Jun 17 2010, 13:37:45) Type "copyright", "credits" or "license" for more information. IPython 0.10 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. Welcome to pylab, a matplotlib-based Python environment. For more information, type 'help(pylab)'. In [1]: from mpl_toolkits.mplot3d import Axes3D In [2]: import matplotlib.pyplot as plt In [3]: fig=plt.figure() In [4]: ax=Axes3D(fig) In [5]: plt.show() ^CERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (206, 0)) --------------------------------------------------------------------------- KeyboardInterrupt Traceback (most recent call last) /home/leopardi/src/Working/Working-0.5.1/glucat/pyclical/<ipython console> in <module>() /usr/lib64/python2.6/site-packages/matplotlib/backends/backend_tkagg.pyc in show() 72 for manager in Gcf.get_all_fig_managers(): 73 manager.show() ---> 74 Tk.mainloop() 75 76 def new_figure_manager(num, *args, **kwargs): /usr/lib64/python2.6/lib-tk/Tkinter.pyc in mainloop(n) 323 def mainloop(n=0): 324 """Run the main loop of Tcl.""" --> 325 _default_root.tk.mainloop(n) 326 327 getint = int KeyboardInterrupt: In [6]: In [6]: quit() Do you really want to exit ([y]/n)? y |
|
From: Paul L. <pau...@ii...> - 2010-10-09 11:58:15
|
Hello all
I am seeing a problem similar to that seen by Jorge Scandaliaris.
When I run python or ipython -pylab, show() apparently hangs. When I enter
CTRL-C, the cursor re-appars, but show() now gives an error message, until I
call figure(). This behaviour is repeatable. See trace below.
Matplotlib version 1.0.0 from openSUSE RPMs. Other versions:
libpython2_6-1_0-2.6.2-6.5.1.x86_64
libpython2_6-1_0-32bit-2.6.2-6.5.1.x86_64
python-2.6.2-6.5.1.x86_64
python-base-2.6.2-6.5.1.x86_64
python-matplotlib-1.0.0-5.1.x86_64
python-matplotlib-tk-1.0.0-5.1.x86_64
python-matplotlib-wx-1.0.0-5.1.x86_64
python-numpy-1.5.0-17.1.x86_64
python-scipy-0.8.0-12.1.x86_64
python-tk-2.6.2-6.5.1.x86_64
tk-8.5.7-3.1.x86_64
Best, Paul
Python 2.6.2 (r262:71600, Jun 17 2010, 13:37:45)
[GCC 4.4.1 [gcc-4_4-branch revision 150839]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.pyplot as plt
>>> fig=plt.figure()
>>> plt.show()
^CTraceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.6/site-
packages/matplotlib/backends/backend_tkagg.py", line 74, in show
Tk.mainloop()
File "/usr/lib64/python2.6/lib-tk/Tkinter.py", line 325, in mainloop
_default_root.tk.mainloop(n)
KeyboardInterrupt
>>> plt.show()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.6/site-
packages/matplotlib/backends/backend_tkagg.py", line 74, in show
Tk.mainloop()
File "/usr/lib64/python2.6/lib-tk/Tkinter.py", line 325, in mainloop
_default_root.tk.mainloop(n)
AttributeError: 'NoneType' object has no attribute 'tk'
>>> fig=plt.figure()
>>> plt.show()
^CTraceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.6/site-
packages/matplotlib/backends/backend_tkagg.py", line 74, in show
Tk.mainloop()
File "/usr/lib64/python2.6/lib-tk/Tkinter.py", line 325, in mainloop
_default_root.tk.mainloop(n)
KeyboardInterrupt
>>> import matplotlib
>>> matplotlib.__version__
'1.0.0'
|
|
From: Sebastian B. <web...@th...> - 2010-10-09 10:53:06
|
hey pau! On 10/09/2010 08:04 AM, Pau wrote: > ... > ImportError: No module named scipy.special > ... do you have scipy installed? i.e. does import scipy work? if so, what is scipy.__version__ ? here, it's 0.7.0... if scipy is not installed, i think you need to install it in order to access ellipk. good luck :) sebastian. |
|
From: Pau <vim...@go...> - 2010-10-09 06:05:02
|
Hi, didn't work... ImportError: No module named scipy.special this is fedora13... thanks! Pau 2010/10/8, Sebastian Busch <web...@th...>: > hey pau, > > ellipk is in scipy.special: > > #!/usr/bin/env python > from pylab import * > from scipy.special import ellipk > > e=1. > a_mpc = 4.0 > p = a_mpc * (1 - e**2.) > Phase = 4.*sqrt(p/(p -6. - 2.*e)) * ellipk(-4.*e/(p - 6. -2.*e)) > > > greetings, > sebastian. > > 2010/10/8, Sebastian Busch <web...@th...>: > hey pau, > > ellipk is in scipy.special: > > #!/usr/bin/env python > from pylab import * > from scipy.special import ellipk > > e=1. > a_mpc = 4.0 > p = a_mpc * (1 - e**2.) > Phase = 4.*sqrt(p/(p -6. - 2.*e)) * ellipk(-4.*e/(p - 6. -2.*e)) > > > greetings, > sebastian. > > |
|
From: Jae-Joon L. <lee...@gm...> - 2010-10-09 04:33:14
|
Eric,
ax = subplot(111)
ax.tick_params(labelsize='x-small')
print ax.xaxis.majorTicks[0]._size
it sets Tick._size instead of Tick._labelsize, which seems to be a bug.
I think the below patch fixes this. Can you check (and commit if correct)?
Regards,
-JJ
diff --git a/lib/matplotlib/axis.py b/lib/matplotlib/axis.py
index 585c1a2..05e7bec 100644
--- a/lib/matplotlib/axis.py
+++ b/lib/matplotlib/axis.py
@@ -299,7 +299,7 @@ class Tick(artist.Artist):
label_kw = dict([(k[5:], v) for (k, v) in label_list])
self.label1.set(**label_kw)
self.label2.set(**label_kw)
- for k, v in label_kw.items():
+ for k, v in label_list:
setattr(self, '_'+k, v)
On Sat, Oct 9, 2010 at 12:10 PM, Jae-Joon Lee <lee...@gm...> wrote:
> The label_mode need to be capital "L", instead of "l". I guess this
> will fix your first problem.
> While we make "l" same as "L", but I think it actually degrade the
> readability of the code, and I;m inclined to leave it as is. Let me
> know if you have any suggestions though.
>
> On Sat, Oct 9, 2010 at 5:43 AM, Justin McCann <jn...@gm...> wrote:
>> # Let's try explicitly setting all of the xtick sizes. Kablooie.
>> for ax in grid.axes_all:
>> ax.tick_params(direction='out', labelsize='x-small')
>>
>
> The second one is not actually related with axes_grid1 toolkit. The
> error can be reproduced with the code below.
>
> ax = subplot(111)
> ax.tick_params(direction='out', labelsize='x-small')
> ax.tick_params(direction='out', labelsize='x-small')
>
> The 1st tick_params is okay, but the 2nd one raises an error.
> I'll take a look into it soon. Meanwhile, you may use a numeric
> argument for the labelsize.
>
> Regards,
>
> -JJ
>
|
|
From: Jae-Joon L. <lee...@gm...> - 2010-10-09 03:10:47
|
The label_mode need to be capital "L", instead of "l". I guess this will fix your first problem. While we make "l" same as "L", but I think it actually degrade the readability of the code, and I;m inclined to leave it as is. Let me know if you have any suggestions though. On Sat, Oct 9, 2010 at 5:43 AM, Justin McCann <jn...@gm...> wrote: > # Let's try explicitly setting all of the xtick sizes. Kablooie. > for ax in grid.axes_all: > ax.tick_params(direction='out', labelsize='x-small') > The second one is not actually related with axes_grid1 toolkit. The error can be reproduced with the code below. ax = subplot(111) ax.tick_params(direction='out', labelsize='x-small') ax.tick_params(direction='out', labelsize='x-small') The 1st tick_params is okay, but the 2nd one raises an error. I'll take a look into it soon. Meanwhile, you may use a numeric argument for the labelsize. Regards, -JJ |
|
From: Justin M. <jn...@gm...> - 2010-10-08 20:43:50
|
I just refactored some custom code to make use of
axes_grid1.ImageGrid, and I think I've come across a bug (see below).
It looks like the tick labelsize doesn't get passed properly to the
parasite axes.
I'm using Python2.6, matplotlib-1.0.0 release, and the Qt4Agg backend.
Also, I noticed that the Grid.__init__ super-class constructor isn't
called in the ImageGrid.__init__ constructor; should it be?
By way of feature request, I'd prefer to be able to specify share_x
and share_y in the constructor, but that's not available in ImageGrid,
only in Grid.
If there's agreement that this is bug, I'll file it on the sourceforge
tracker. Is this fixed in SVN, or does anyone have workaround, e.g.,
some way to convert 'x-small' to the correct integer size, or a
different method to call?
Thanks,
Justin
========
from mpl_toolkits.axes_grid1 import ImageGrid
import pylab
import numpy
row_height = 10
fi = pylab.figure()
grid = ImageGrid(fi, 111, nrows_ncols=(5,1), share_all=False, label_mode='l')
for i in range(5):
a = abs(numpy.random.randn(5,100))
im = grid[i].imshow(a)
cb = grid.cbar_axes[0].colorbar(im)
for ax in grid.axes_all:
ax.set_yticks([])
# oops - this only changes the lowest Axes formatting
grid.axes_llc.tick_params(direction='out', labelsize='x-small')
pylab.show()
# Now pan to the left a bit-- you'll see the large 0 from the 100 xtick_label
# Let's try explicitly setting all of the xtick sizes. Kablooie.
for ax in grid.axes_all:
ax.tick_params(direction='out', labelsize='x-small')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/tmp/<ipython console> in <module>()
.../matplotlib/axes.pyc in tick_params(self, axis, **kwargs)
2215 xkw.pop('labelleft', None)
2216 xkw.pop('labelright', None)
-> 2217 self.xaxis.set_tick_params(**xkw)
2218 if axis in ['y', 'both']:
2219 ykw = dict(kwargs)
.../matplotlib/axis.pyc in set_tick_params(self, which, reset, **kw)
795 if which == 'major' or which == 'both':
796 for tick in self.majorTicks:
--> 797 tick._apply_params(**self._major_tick_kw)
798 if which == 'minor' or which == 'both':
799 for tick in self.minorTicks:
.../matplotlib/axis.pyc in _apply_params(self, **kw)
274 if dirpad:
275 self._base_pad = kw.pop('pad', self._base_pad)
--> 276 self.apply_tickdir(kw.pop('tickdir', self._tickdir))
277 trans = self._get_text1_transform()[0]
278 self.label1.set_transform(trans)
.../matplotlib/axis.pyc in apply_tickdir(self, tickdir)
331 else:
332 self._tickmarkers = (mlines.TICKDOWN, mlines.TICKUP)
--> 333 self._pad = self._base_pad + self._size
334
335
TypeError: unsupported operand type(s) for +: 'int' and 'str'
|
|
From: Russell E. O. <ro...@uw...> - 2010-10-08 16:25:42
|
The Mac installer for matplotlib that I recently announced had a bug: a file in dateutil had bad permissions. I think I've finally got that straightened out and there's a new installer here: <http://www.astro.washington.edu/users/rowen/python/> My apologies for the error. -- Russell |
|
From: Tony S Yu <ts...@gm...> - 2010-10-08 13:31:30
|
On Oct 8, 2010, at 6:52 AM, Waléria Antunes David wrote: > I don't understand what you did, i'm reading error data from a file. > > def gera_grafico(N=200, eps=1): > > x = np.abs(np.random.randn(N)) > y = 10*np.log((30*x + 1.)**(0.5)) + 34 + eps * np.random.randn(N) > yerr = eps * np.random.randn(N) > > I don't understand what you did in this code > > ?? > > Thanks, > Waleria. Hey Waleria, That was just some code to make up fake data with roughly the same shape and range as the data you plotted. As I mentioned, I needed to put something there to run your code. Where do you get an error? If it's from the code above, you can just replace it with your data. In any case, you don't need to use the code I pasted; just make the changes I suggested: Fix the number passed to majorLocator and remove (or fix the initialization of) majorFormatter. -T > > > On Thu, Oct 7, 2010 at 5:06 PM, Tony S Yu <ts...@gm...> wrote: > > On Oct 7, 2010, at 3:38 PM, Waléria Antunes David wrote: > >> Hi, >> >> I did like the links below, but seeing as it was my chart. >> >> See >> >> My code: http://pastebin.com/KcjHAPLN >> >> On Thu, Oct 7, 2010 at 3:08 PM, John Hunter <jd...@gm...> wrote: >> On Thu, Oct 7, 2010 at 1:01 PM, Waléria Antunes David >> <wal...@gm...> wrote: >> > I need to know how do these vertical lines on the graph. See the picture, >> > the lines circled. >> >> We call these major and minor ticks. The major ticks are the taller >> ones, the minor ticks are the smaller ones. Their location is >> controlled by the major and minor Locator instances, and the text >> printed beside them is controlled by the major and minor formatter. >> >> See >> >> http://matplotlib.sourceforge.net/examples/pylab_examples/major_minor_demo1.html >> http://matplotlib.sourceforge.net/examples/pylab_examples/major_minor_demo2.html >> >> and >> >> http://matplotlib.sourceforge.net/search.html?q=codex+set_minor_locator >> >> To control the tick properties themselves, see the Tick section in >> >> http://matplotlib.sourceforge.net/users/artists.html >> >> JDH >> >> <graph.png> > > As John mentioned, the major and minor ticks were the taller and shorter ticks, respectively. In your pasted example, you only change the minor ticks; by setting the majorLocator to same value as in the original example (i.e. 20), you only get the major tick at 0 because your data only goes to 1.5 (i.e. 20 is outside your plot range). > > Also, the majorFormatter in the example is set to work with integers, but your major tick labels should be float values (since most of them are between 0 and 1). Thus, the majorFormatter code is unnecessary (commented out below). > > Finally, a pet peeve: when posting example code, please make the effort to generate data for the plot so that others can easily run the code (see attached). > > -Tony > > #--- > > import numpy as np > import matplotlib.pyplot as plt > from matplotlib.ticker import MultipleLocator, FormatStrFormatter > > def gera_grafico(N=200, eps=1): > > x = np.abs(np.random.randn(N)) > y = 10*np.log((30*x + 1.)**(0.5)) + 34 + eps * np.random.randn(N) > yerr = eps * np.random.randn(N) > > majorLocator = MultipleLocator(0.2) > # majorFormatter = FormatStrFormatter('%d') > minorLocator = MultipleLocator(0.02) > > fig, ax = plt.subplots() > plt.errorbar(x, y, yerr, fmt='ob', label='date') > > plt.xlim(0.0, 1.5) > #plt.xscale('log') > #grid(True) > > ax.xaxis.set_major_locator(majorLocator) > # ax.xaxis.set_major_formatter(majorFormatter) > > ax.xaxis.set_minor_locator(minorLocator) > > return fig > > if __name__ == '__main__': > gera_grafico() > plt.show() > > > |
|
From: Sebastian B. <web...@th...> - 2010-10-08 11:40:20
|
hey pau, ellipk is in scipy.special: #!/usr/bin/env python from pylab import * from scipy.special import ellipk e=1. a_mpc = 4.0 p = a_mpc * (1 - e**2.) Phase = 4.*sqrt(p/(p -6. - 2.*e)) * ellipk(-4.*e/(p - 6. -2.*e)) greetings, sebastian. |
|
From: Pau <vim...@go...> - 2010-10-08 11:06:08
|
Hi, I am trying to calculate a function with a complete elliptic integral of the 1st kind I have defined Phase = 4.*sqrt(p/(p -6. - 2.*e)) * ellipk(-4.*e/(p - 6. -2.*e)) where a_mpc = 4.0 p = a_mpc * (1 - e**2.) and I have of course done this #!/usr/bin/env python from pylab import * But when calling the script, I get: NameError: name 'ellipk' is not defined What am I doing wrong? Any help will be very much appreciated. Thanks a lot, Pau |
|
From: Waléria A. D. <wal...@gm...> - 2010-10-08 10:52:30
|
I don't understand what you did, i'm reading error data from a file.
def gera_grafico(N=200, eps=1):
x = np.abs(np.random.randn(N))
y = 10*np.log((30*x + 1.)**(0.5)) + 34 + eps * np.random.randn(N)
yerr = eps * np.random.randn(N)
I don't understand what you did in this code
??
Thanks,
Waleria.
On Thu, Oct 7, 2010 at 5:06 PM, Tony S Yu <ts...@gm...> wrote:
>
> On Oct 7, 2010, at 3:38 PM, Waléria Antunes David wrote:
>
> Hi,
>
> I did like the links below, but seeing as it was my chart.
>
> See
>
> My code: http://pastebin.com/KcjHAPLN
>
> On Thu, Oct 7, 2010 at 3:08 PM, John Hunter <jd...@gm...> wrote:
>
>> On Thu, Oct 7, 2010 at 1:01 PM, Waléria Antunes David
>> <wal...@gm...> wrote:
>> > I need to know how do these vertical lines on the graph. See the
>> picture,
>> > the lines circled.
>>
>> We call these major and minor ticks. The major ticks are the taller
>> ones, the minor ticks are the smaller ones. Their location is
>> controlled by the major and minor Locator instances, and the text
>> printed beside them is controlled by the major and minor formatter.
>>
>> See
>>
>>
>> http://matplotlib.sourceforge.net/examples/pylab_examples/major_minor_demo1.html
>>
>> http://matplotlib.sourceforge.net/examples/pylab_examples/major_minor_demo2.html
>>
>> and
>>
>> http://matplotlib.sourceforge.net/search.html?q=codex+set_minor_locator
>>
>> To control the tick properties themselves, see the Tick section in
>>
>> http://matplotlib.sourceforge.net/users/artists.html
>>
>> JDH
>>
>
> <graph.png>
>
>
> As John mentioned, the major and minor ticks were the taller and shorter
> ticks, respectively. In your pasted example, you only change the minor
> ticks; by setting the majorLocator to same value as in the original example
> (i.e. 20), you only get the major tick at 0 because your data only goes to
> 1.5 (i.e. 20 is outside your plot range).
>
> Also, the majorFormatter in the example is set to work with integers, but
> your major tick labels should be float values (since most of them are
> between 0 and 1). Thus, the majorFormatter code is unnecessary (commented
> out below).
>
> Finally, a pet peeve: when posting example code, please make the effort to
> generate data for the plot so that others can easily run the code (see
> attached).
>
> -Tony
>
> #---
>
> import numpy as np
> import matplotlib.pyplot as plt
> from matplotlib.ticker import MultipleLocator, FormatStrFormatter
>
> def gera_grafico(N=200, eps=1):
>
> x = np.abs(np.random.randn(N))
> y = 10*np.log((30*x + 1.)**(0.5)) + 34 + eps * np.random.randn(N)
> yerr = eps * np.random.randn(N)
>
> majorLocator = MultipleLocator(0.2)
> # majorFormatter = FormatStrFormatter('%d')
> minorLocator = MultipleLocator(0.02)
>
> fig, ax = plt.subplots()
> plt.errorbar(x, y, yerr, fmt='ob', label='date')
>
> plt.xlim(0.0, 1.5)
> #plt.xscale('log')
> #grid(True)
>
> ax.xaxis.set_major_locator(majorLocator)
> # ax.xaxis.set_major_formatter(majorFormatter)
>
> ax.xaxis.set_minor_locator(minorLocator)
>
> return fig
>
> if __name__ == '__main__':
> gera_grafico()
> plt.show()
>
>
>
|