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


Showing results of 170

<< < 1 2 3 4 .. 7 > >> (Page 2 of 7)
From: Magician <f_m...@ma...> - 2013年01月29日 15:51:28
Hi JJ,
Thanks for your advice.
I didn't use text.usetex option, and text.latex.preview made same results.
So my cases may depend on other issues.
I found the problems may be happened only when I output my plots as PDF or EPS.
If I output as SVG or PNG, all characters are aligned on their baselines.
I'd like to put plots on my TeX documents, so I want to output them as EPS.
I also tried converting SVG into EPS with Inkscape, but the XY labels are disappeared
on PDF-TeX documents from dvipdfm.
Magician
On 2013年01月29日, at 10:48, Jae-Joon Lee wrote:
> I guess you have text.usetex=True?
> In this case, the baselines are not correct unless you also set "text.latex.preview" as True.
> For example, try to add following line in your rc file.
> 
> text.latex.preview : True
> 
> (You also need preview.sty installed)
> 
> If this does not solve the problem, please post a screenshot that demonstrating the problem with your rc file.
> 
> Regards,
> 
> -JJ
> 
> 
> 
> On Sun, Jan 20, 2013 at 5:24 PM, Magician <f_m...@ma...> wrote:
> Hi all,
> 
> 
> I'm using matplotlib 1.1.0 for Python27 on Windows 7.
> 
> I'd like to apply TeX fonts at legends and labels.
> But if I try to do, the texts' baselines become upper,
> and the layouts get out of shapes.
> For example, I set legend titles as below:
> - 'Plot 1'
> - r'Plot 2 ($\alpha$)'
> -'Plot 3'
> then only the second one was raised.
> Both Computer Modern and \mathdefault fonts have same issues.
> 
> I want to fix all the baselines as default positions.
> Does anyone have good ideas?
> 
> 
> Magician
From: Dieter <die...@ed...> - 2013年01月29日 11:37:58
Hi all,
I need to produce figures with CMYK colours, preferably vector-based.
There are two old threads, one from November 2007 and one from August 2010,
regarding this topic:
- http://matplotlib.1069221.n5.nabble.com/rgb-versus-cmyk-tp32391.html
- http://matplotlib.1069221.n5.nabble.com/CMYK-images-td16339.html
However, they only provide some hacks and workarounds, no
matplotlib-integrated solution. Furthermore, some links in these threads are
broken, and other solutions require Adobe products.
I was wondering if anything changed regarding this within the last 2.5 years
since the last thread. Is there a way to produce CMYK with matplotlib?
Many thanks,
Dieter
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/CMYK-tp40352.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Boris V. C. <gl...@co...> - 2013年01月29日 05:41:21
#! /usr/bin/python
 import numpy as np
 data = np.loadtxt('path-tracks.csv',dtype=np.str,delimiter=',',skiprows=1)
 print data
 [['19.70' '-95.20' '2/5/04 6:45 AM' '1' '-38' 'CCM']
 ['19.70' '-94.70' '2/5/04 7:45 AM' '1' '-48' 'CCM']
 ['19.30' '-93.90' '2/5/04 8:45 AM' '1' '-60' 'CCM']
 ['19.00' '-93.50' '2/5/04 9:45 AM' '1' '-58' 'CCM']
 ['19.00' '-92.80' '2/5/04 10:45 AM' '1' '-50' 'CCM']
 ['19.20' '-92.60' '2/5/04 11:45 AM' '1' '-40' 'CCM']
 ['19.90' '-93.00' '2/5/04 12:45 PM' '1' '-43' 'CCM']
 ['20.00' '-92.80' '2/5/04 1:15 PM' '1' '-32' 'CCM']
 ['23.10' '-100.20' '30/5/04 4:45 AM' '2' '-45' 'SCME']
 ['23.20' '-100.00' '30/5/04 5:45 AM' '2' '-56' 'SCME']
 ['23.30' '-100.00' '30/5/04 6:45 AM' '2' '-48' 'SCME']
 ['23.30' '-100.20' '30/5/04 7:45 AM' '2' '-32' 'SCME']
 ['23.40' '-99.00' '31/5/04 3:15 AM' '3' '-36' 'SCM']
 ['23.50' '-98.90' '31/5/04 4:15 AM' '3' '-46' 'SCM']
 ['23.60' '-98.70' '31/5/04 5:15 AM' '3' '-68' 'SCM']
 ['23.70' '-98.80' '31/5/04 6:15 AM' '3' '-30' 'SCM']]
 with the above code I get an array whose columns represent: [Lat, Lon, Date, Identifier, Temperatures, Category]. Now, I will put a code that allows me to plot the first and second column on the map of Mexico:
 #!/usr/bin/python
 #Project Storm: Plot trajectories of convective systems
 #import libraries
 import numpy as np
 from mpl_toolkits.basemap import Basemap
 import matplotlib.pyplot as pl
 # Plot a map for Mexico
 m = Basemap(projection='cyl', llcrnrlat=12, urcrnrlat=35,llcrnrlon=-120, urcrnrlon=-80, resolution='c', area_thresh=1000.)
 m.bluemarble()
 m.drawcoastlines(linewidth=0.5)
 m.drawcountries(linewidth=0.5)
 m.drawstates(linewidth=0.5)
 #Draw parallels and meridians
 m.drawparallels(np.arange(10.,35.,5.))
 m.drawmeridians(np.arange(-120.,-80.,10.))
 m.drawmapboundary(fill_color='aqua')
 #Open file whit numpy
 data = np.loadtxt('path-tracks.csv', dtype=np.str,delimiter=' , ', skiprows=1)
 latitude = data[:,0]
 longitude = data[:,1]
 #Convert latitude and longitude to coordinates X and Y
 x, y = m(longitude, latitude)
 #Plot the points on the map
 pl.plot(x,y,'ro-')
 pl.show()
The points plotted on the map, corresponding to three different paths with a line connecting all points. Mi final idea is to draw a line connecting the points associated with each path, How I can do this? or How should I structure my data to plot the different paths?
is posible draw an identifier or a mark for each path?
how I can set the size of the figure so that it can distinguish the separation between the points?
From: Jae-Joon L. <lee...@gm...> - 2013年01月29日 02:09:01
The divider thing from axes_grid toolkit is primarily designed for a static
layout. So, it may become quite tricky when you want to adjust the layout
dynamically.
Here is a modified version your code that I think does what you want.
from matplotlib.figure import Figure
from mpl_toolkits.axes_grid.axes_divider import make_axes_locatable
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as
FigureCanvas
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import sys
class Test(QWidget):
 def __init__(self):
 QWidget.__init__(self)
 self.resize(1000, 600)
 self.fig = Figure(figsize=(100,100), dpi=75)
 axes1 = self.fig.add_subplot(121)
 axes2 = self.fig.add_subplot(122)
 self.subaxes = []
 self.main_axes = [axes1, axes2]
 self.locators_orig = []
 for ax in [axes1, axes2]:
 make_axes_locatable(ax)
 self.locators_orig.append(ax.get_axes_locator())
 self.divider = make_axes_locatable(ax)
 self.subaxes.append(self.divider.append_axes("right", "40%",
"20%"))
 b = QPushButton("Remove subaxes")
 b.clicked.connect(self.OnBtnClicked)
 l = QHBoxLayout()
 l.addWidget(FigureCanvas(self.fig))
 l.addWidget(b)
 self.setLayout(l)
 def OnBtnClicked(self):
 for sa in self.subaxes:
 self.fig.delaxes(sa)
 del sa
 for ax, locator in zip(self.main_axes, self.locators_orig):
 ax.set_axes_locator(locator)
 self.fig.canvas.draw()
app = QApplication(sys.argv)
win = Test()
win.show()
sys.exit(app.exec_())
IHTH,
-JJ
On Fri, Jan 18, 2013 at 6:57 AM, gad <mas...@ms...> wrote:
> Hi everyone,
>
> I'm getting in trouble trying to delete a couple of subaxes from my canvas.
> The problem is shown by the example script below:
>
> from matplotlib.figure import Figure
> from mpl_toolkits.axes_grid.axes_divider import make_axes_locatable
> from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as
> FigureCanvas
> from PyQt4.QtCore import *
> from PyQt4.QtGui import *
> import sys
>
> class Test(QWidget):
> def __init__(self):
> QWidget.__init__(self)
> self.resize(1000, 600)
> self.fig = Figure(figsize=(100,100), dpi=75)
> axes1 = self.fig.add_subplot(121)
> axes2 = self.fig.add_subplot(122)
>
> self.subaxes = []
> for ax in [axes1, axes2]:
> self.divider = make_axes_locatable(ax)
> self.subaxes.append(self.divider.append_axes("right", "40%",
> "20%"))
>
> b = QPushButton("Remove subaxes")
> b.clicked.connect(self.OnBtnClicked)
> l = QHBoxLayout()
> l.addWidget(FigureCanvas(self.fig))
> l.addWidget(b)
> self.setLayout(l)
>
> def OnBtnClicked(self):
> for sa in self.subaxes:
> self.fig.delaxes(sa)
> del sa
> self.fig.canvas.draw()
>
> app = QApplication(sys.argv)
> win = Test()
> win.show()
> sys.exit(app.exec_())
>
>
> The main window is made up of two main axes an two subaxes placed on their
> right side. If you click the button in the window, the two subaxes
> disappear
> as I expect, but the orignal axes don't resize. Is there something I am
> missing? Or can anyone point me out if there is a better way to achieve
> this?
>
> Thanks in advance!
>
>
>
> --
> View this message in context:
> http://matplotlib.1069221.n5.nabble.com/Subaxes-deletion-issue-tp40268.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122712
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Jae-Joon L. <lee...@gm...> - 2013年01月29日 01:48:31
I guess you have text.usetex=True?
In this case, the baselines are not correct unless you also set
"text.latex.preview" as True.
For example, try to add following line in your rc file.
text.latex.preview : True
(You also need preview.sty installed)
If this does not solve the problem, please post a screenshot
that demonstrating the problem with your rc file.
Regards,
-JJ
On Sun, Jan 20, 2013 at 5:24 PM, Magician <f_m...@ma...> wrote:
> Hi all,
>
>
> I'm using matplotlib 1.1.0 for Python27 on Windows 7.
>
> I'd like to apply TeX fonts at legends and labels.
> But if I try to do, the texts' baselines become upper,
> and the layouts get out of shapes.
> For example, I set legend titles as below:
> - 'Plot 1'
> - r'Plot 2 ($\alpha$)'
> -'Plot 3'
> then only the second one was raised.
> Both Computer Modern and \mathdefault fonts have same issues.
>
> I want to fix all the baselines as default positions.
> Does anyone have good ideas?
>
>
> Magician
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_123012
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Orgun <am...@gm...> - 2013年01月28日 20:51:35
Hi,
yeah, during my system re-install I used the built-dep option but maybe I
was to busy to notice that I forgot the p3-dev's. Now everything is running
fine and the last two hours were enlighting.
Christian
--
A little learning never caused anyone's head to explode.
No trees were killed in sending this message. However, a large number of
electrons were seriously inconvenienced.....
On Mon, Jan 28, 2013 at 9:20 PM, Sandro Tosi [via matplotlib] <
ml-...@n5...> wrote:
> On Mon, Jan 28, 2013 at 9:05 PM, Michael Droettboom <[hidden email]<http://user/SendEmail.jtp?type=node&node=40347&i=0>>
> wrote:
> > sudo apt-get build_dep python-matplotlib
>
> small typo fix: the option name is 'build-dep'.
>
> Cheers,
> --
> Sandro Tosi (aka morph, morpheus, matrixhasu)
> My website: http://matrixhasu.altervista.org/
> Me at Debian: http://wiki.debian.org/SandroTosi
>
> ------------------------------------------------------------------------------
>
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
> _______________________________________________
> Matplotlib-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=40347&i=1>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://matplotlib.1069221.n5.nabble.com/Problems-installing-matplotlib-compiling-error-tp40343p40347.html
> To unsubscribe from Problems installing matplotlib - compiling error, click
> here<http://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=40343&code=YW1icm9zY0BnbWFpbC5jb218NDAzNDN8LTExNDczMTA5Njg=>
> .
> NAML<http://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Problems-installing-matplotlib-compiling-error-tp40343p40348.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Sandro T. <san...@gm...> - 2013年01月28日 20:18:52
On Mon, Jan 28, 2013 at 9:05 PM, Michael Droettboom <md...@st...> wrote:
> sudo apt-get build_dep python-matplotlib
small typo fix: the option name is 'build-dep'.
Cheers,
--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
From: Michael D. <md...@st...> - 2013年01月28日 20:09:28
As a shortcut, you can also install all of the build dependencies for a 
package (without installing the package itself) using:
 sudo apt-get build_dep python-matplotlib
Mike
On 01/28/2013 01:40 PM, Orgun wrote:
> Thanks, that helped a lot! I don't know why the dev-package hasn't been
> installed. That has been the first think I thought I did when re-installing
> after my latest hardware change in December.
>
> Thanks a lot. That saved my day.
>
> Christian
>
>
>
> --
> View this message in context: http://matplotlib.1069221.n5.nabble.com/Problems-installing-matplotlib-compiling-error-tp40343p40345.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Orgun <am...@gm...> - 2013年01月28日 18:40:25
Thanks, that helped a lot! I don't know why the dev-package hasn't been
installed. That has been the first think I thought I did when re-installing
after my latest hardware change in December.
Thanks a lot. That saved my day.
Christian
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Problems-installing-matplotlib-compiling-error-tp40343p40345.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Paul H. <pmh...@gm...> - 2013年01月28日 18:26:39
On Mon, Jan 28, 2013 at 10:20 AM, Orgun <am...@gm...> wrote:
> Hi guy,
>
> as I'm new to matplotlib I tried to install it following the instructions
> on
> http://matplotlib.org/faq/installing_faq.html#source-install-from-git
> <http://matplotlib.org/faq/installing_faq.html#source-install-from-git> .
> After downloading and changing the directory properly I get the following
> error:
>
>
> building 'matplotlib.ft2font' extension
> gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -D_FORTIFY_SOURCE=2 -g
> -fstack-protector --param=ssp-buffer-size=4 -Wformat
> -Werror=format-security
> -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
> -DPYCXX_PYTHON_2TO3=1 -I/usr/local/include -I/usr/include
> -I/usr/lib/python3/dist-packages/numpy/core/include
> -I/usr/include/freetype2
> -I/usr/local/include -I/usr/include -I. -I/usr/include/python3.2mu -c
> src/ft2font.cpp -o build/temp.linux-x86_64-3.2/src/ft2font.o
> In file included from ./CXX/Extensions.hxx:37:0,
> from src/ft2font.h:6,
> from src/ft2font.cpp:3:
> ./CXX/WrapPython.h:58:20: fatal error: Python.h: No such file or directory
> compilation terminated.
> error: command 'gcc' failed with exit status 1
This error leads me to think that you need the Python3 development headers.
$ sudo apt-get install python3-dev # from memory, so yeah
Let us know if that works.
-p
> I'm using Linux Mint Nadia 14.2 Kernel 3.5.0.17, Python 3.2.3 (Oct 19 2012)
> and gcc 4.7.2. Numpy, Simpy & Scipy are up to date.
>
> What did I do wrong?
> I have to use python3 because every other task was written specifficly with
> python3.
>
> cheers,
> Christian
>
From: Orgun <am...@gm...> - 2013年01月28日 18:21:10
Hi guy,
as I'm new to matplotlib I tried to install it following the instructions on 
http://matplotlib.org/faq/installing_faq.html#source-install-from-git
<http://matplotlib.org/faq/installing_faq.html#source-install-from-git> .
After downloading and changing the directory properly I get the following
error: 
building 'matplotlib.ft2font' extension
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -D_FORTIFY_SOURCE=2 -g
-fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
-fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
-DPYCXX_PYTHON_2TO3=1 -I/usr/local/include -I/usr/include
-I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/freetype2
-I/usr/local/include -I/usr/include -I. -I/usr/include/python3.2mu -c
src/ft2font.cpp -o build/temp.linux-x86_64-3.2/src/ft2font.o
In file included from ./CXX/Extensions.hxx:37:0,
 from src/ft2font.h:6,
 from src/ft2font.cpp:3:
./CXX/WrapPython.h:58:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
I'm using Linux Mint Nadia 14.2 Kernel 3.5.0.17, Python 3.2.3 (Oct 19 2012)
and gcc 4.7.2. Numpy, Simpy & Scipy are up to date.
What did I do wrong?
I have to use python3 because every other task was written specifficly with
python3.
cheers,
Christian
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Problems-installing-matplotlib-compiling-error-tp40343.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Pierre H. <pie...@cr...> - 2013年01月28日 09:10:10
Attachments: signature.asc
Hi,
Le 27/01/2013 00:35, Skipper Seabold a écrit :
> This has been asked before, and I just filed a ticket [1]. Can anyone
> think of a better way to do something like this? The fill_between
> below is pretty suboptimal IMO.
I feel that adding a filled step plot would indeed be useful.
Just thinking at a possible API, would it make sense to add the
"drawstyle" argument which already exists for plot() to fill_between() ?
best,
Pierre
From: Boris V. C. <gl...@co...> - 2013年01月28日 05:54:52
#! /usr/bin/python
 import numpy as np
 data = np.loadtxt('path-tracks.csv',dtype=np.str,delimiter=',',skiprows=1)
 print data
 [['19.70' '-95.20' '2/5/04 6:45 AM' '1' '-38' 'CCM']
 ['19.70' '-94.70' '2/5/04 7:45 AM' '1' '-48' 'CCM']
 ['19.30' '-93.90' '2/5/04 8:45 AM' '1' '-60' 'CCM']
 ['19.00' '-93.50' '2/5/04 9:45 AM' '1' '-58' 'CCM']
 ['19.00' '-92.80' '2/5/04 10:45 AM' '1' '-50' 'CCM']
 ['19.20' '-92.60' '2/5/04 11:45 AM' '1' '-40' 'CCM']
 ['19.90' '-93.00' '2/5/04 12:45 PM' '1' '-43' 'CCM']
 ['20.00' '-92.80' '2/5/04 1:15 PM' '1' '-32' 'CCM']
 ['23.10' '-100.20' '30/5/04 4:45 AM' '2' '-45' 'SCME']
 ['23.20' '-100.00' '30/5/04 5:45 AM' '2' '-56' 'SCME']
 ['23.30' '-100.00' '30/5/04 6:45 AM' '2' '-48' 'SCME']
 ['23.30' '-100.20' '30/5/04 7:45 AM' '2' '-32' 'SCME']
 ['23.40' '-99.00' '31/5/04 3:15 AM' '3' '-36' 'SCM']
 ['23.50' '-98.90' '31/5/04 4:15 AM' '3' '-46' 'SCM']
 ['23.60' '-98.70' '31/5/04 5:15 AM' '3' '-68' 'SCM']
 ['23.70' '-98.80' '31/5/04 6:15 AM' '3' '-30' 'SCM']]
 with the above code I get an array whose columns represent: [Lat, Lon, Date, Identifier, Temperatures, Category]. Now, I will put a code that allows me to plot the first and second column on the map of Mexico:
 #!/usr/bin/python
 #Project Storm: Plot trajectories of convective systems
 #import libraries
 import numpy as np
 from mpl_toolkits.basemap import Basemap
 import matplotlib.pyplot as pl
 # Plot a map for Mexico
 m = Basemap(projection='cyl', llcrnrlat=12, urcrnrlat=35,llcrnrlon=-120, urcrnrlon=-80, resolution='c', area_thresh=1000.)
 m.bluemarble()
 m.drawcoastlines(linewidth=0.5)
 m.drawcountries(linewidth=0.5)
 m.drawstates(linewidth=0.5)
 #Draw parallels and meridians
 m.drawparallels(np.arange(10.,35.,5.))
 m.drawmeridians(np.arange(-120.,-80.,10.))
 m.drawmapboundary(fill_color='aqua')
 #Open file whit numpy
 data = np.loadtxt('path-tracks.csv', dtype=np.str,delimiter=' , ', skiprows=1)
 latitude = data[:,0]
 longitude = data[:,1]
 #Convert latitude and longitude to coordinates X and Y
 x, y = m(longitude, latitude)
 #Plot the points on the map
 pl.plot(x,y,'ro-')
 pl.show()
with this I get the figure in attachment
The points plotted on the map, corresponding to three different paths. Mi final idea is to draw a line connecting the points associated with each path, How I can do this?
is posible draw an identifier or a mark for each path?
how I can set the size of the figure so that it can distinguish the separation between the points?
Ok, finally, to get the scaling to work, I rewrote the c density plotter to
accept a scaleFactor argument to affect a new max/min y-axis on that end and
pass it to the python script which reads the background as an mhd dataset.
Then I had to update my python to include the new scaled y-axis limits in
both the extent in the imshow() function *and* the set_ylim() commands. Now
I have a nice scalable buffer on the price band. Cheers~ 
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-INSISTS-on-using-scientific-notation-how-do-I-make-it-STOP-tp40320p40338.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
Hmmmmm. This stretches the background image (mhd data) to fit, leaving the
price line-plot not lining up with the background density plot. Now I have
to figure out how to make the density plot scale to fit...
 
 
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-INSISTS-on-using-scientific-notation-how-do-I-make-it-STOP-tp40320p40330.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
for the record I had to put the buffer on the set_limit commands, not the
"extent" of the image, like so:
 priceDiff = max(price)-min(price)
 diffQuant = priceDiff / 4
 minQuant = min(price)-diffQuant
 maxQuant = max(price)+diffQuant
 pl.set_ylim([minQuant,maxQuant])
and also include: 
 pl.set_xlim([min(date),max(date)])
to get it working just right. Just for posterity. Thanks again~
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-INSISTS-on-using-scientific-notation-how-do-I-make-it-STOP-tp40320p40329.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
Thank you! Success!
Yeah, I learned a little from this little exercise. I will set the "extent"
on the image to include a buffer in the y-axis, a certain percentage of
max(price)-min(price), for some durations. 
If there is only a single trade during any duration, well... I need handle
that as a special case, now that you mention it. It doesn't like that,
basically. I need to go back and get the second-latest trade, and plot it
*outside* the graph, or some variant or hack of that, so that it draws a
line to the most recent trade, and then create another artificial point at
the same price at the current time, to indicate a flat market...
Thanks again for your help. I've been at wit's end trying to fix that...
Cheers~
 
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-INSISTS-on-using-scientific-notation-how-do-I-make-it-STOP-tp40320p40328.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Eric F. <ef...@ha...> - 2013年01月27日 06:39:40
Attachments: test_y.py
On 2013年01月26日 7:59 PM, Todamont wrote:
> Ok, here is the distilled code that displays the scientific formatting
> failure I'm trying to fix. I had to wait until the market gave me a snapshot
> that triggered this bug. Here is a quick link to the image I get when I run
> this program: http://imgur.com/77DUbZp
What you were seeing is not an exponent, it is an offset. The attached 
modification tells mpl not to use an offset, and it also simplifies 
things by omitting the twinx, which is not needed, and by omitting all 
the extra fussing with formatters, likewise not needed.
The algorithm for automatically choosing an offset (when an offset is 
desired) is known to be over-eager, but it turns out to be surprisingly 
difficult to come up with a better algorithm that works in a wide range 
of circumstances.
Now, are you sure you really always want to set the y limits to exactly 
your y data limits? You will never have only a single point? Or only 
identical y values?
Eric
>
> I greatly appreciate your help with this. Any suggestions are welcome. Also,
> this code will become FOSS when it is completed. Do you think it is related
> to the way I'm loading in the data with the "extent" command and then making
> a subplot? I'm generating a custom heatmap of the market density for the
> background, so I sort of need that...
>
> #!/usr/bin/env python2.7
> # coding: utf-8
> import matplotlib
> from matplotlib.figure import Figure
> from matplotlib.backends.backend_agg import FigureCanvasAgg
> from datetime import datetime
> import matplotlib.dates as dates
> import matplotlib.pyplot as plt
> import numpy as np
> from matplotlib.ticker import ScalarFormatter, FormatStrFormatter,
> FuncFormatter
> import matplotlib.image as mpimg
>
> date = [ 734894.994583, 734894.995313, 734894.996042, 734894.997384,
> 734894.998032 ]
> price = [ 17.37, 17.30001, 17.30001, 17.39, 17.39 ]
> graphdate = []
> for i in date:
> graphdate.append(i)
>
> graph = np.zeros((100,100,3))
> fig=Figure(figsize=(5.5,2.4))
> pl=fig.add_subplot(111)
> image=pl.imshow(graph,aspect="auto",extent=(min(date),max(date),min(price),max(price)))
> fig.subplots_adjust(top=0.92,bottom=0.15,left=0.1,right=0.95)
>
> # add plot of value across time
> pl.plot_date(zip(graphdate),zip(price),'-',color='blue',lw='1',alpha=1)
> matplotlib.rcParams.update({'font.size': 5})
>
> locator = dates.AutoDateLocator()
> pl.set_ylim([min(price),max(price)])
> ax2=pl.twinx()
> ax2.set_ylim([min(price),max(price)])
>
> formatter = ScalarFormatter()
> formatter.set_scientific(False)
> formatter.set_powerlimits((-1000000000,10000))
> pl.yaxis.set_major_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
> pl.yaxis.set_major_formatter(formatter)
> pl.yaxis.set_minor_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
> pl.yaxis.set_minor_formatter(formatter)
> pl.set_autoscaley_on(False)
> yfm = pl.yaxis.get_major_formatter()
> yfm.set_powerlimits([ -100000000000, 10000])
>
> ax2.yaxis.set_major_formatter(formatter)
> ax2.yaxis.set_major_formatter(ScalarFormatter(useOffset=False))
> ax2.yaxis.set_major_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
> ax2.yaxis.set_major_formatter(formatter)
> ax2.yaxis.set_minor_formatter(ScalarFormatter(useOffset=False))
> ax2.yaxis.set_minor_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
> ax2.yaxis.set_major_formatter(formatter)
> ax2.set_autoscaley_on(False)
> yfm = ax2.yaxis.get_major_formatter()
> yfm.set_powerlimits([ -100000000000, 10000])
>
> period = 298; # duration in seconds for this graph
> seconds = dates.SecondLocator(interval=30) # plot by 30-second increment
> secondsFmt = dates.DateFormatter('%-I:%M:%S%P',tz=None)
> pl.xaxis.set_major_locator(seconds)
> pl.xaxis.set_major_formatter(secondsFmt)
>
> labels = pl.get_xticklabels()
> for label in labels:
> label.set_rotation(45)
>
> pl.xaxis.grid(which='major',color='white', linestyle='--', linewidth=0.5,
> alpha=0.15)
> pl.xaxis.grid(which='minor',color='white', linestyle='--', linewidth=0.5,
> alpha=0.15)
> pl.yaxis.grid(which='major',color='white', linestyle='--', linewidth=0.5,
> alpha=0.15)
> pl.yaxis.grid(which='minor',color='white', linestyle='--', linewidth=0.5,
> alpha=0.15)
>
> canvas=FigureCanvasAgg(fig)
> bigName = "sci_formatting_fail.png" # image name
> canvas.print_figure(bigName,dpi=200) # create date/timestamped file
> print "grapher completed"
>
>
>
> --
> View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-INSISTS-on-using-scientific-notation-how-do-I-make-it-STOP-tp40320p40326.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
Ok, here is the distilled code that displays the scientific formatting
failure I'm trying to fix. I had to wait until the market gave me a snapshot
that triggered this bug. Here is a quick link to the image I get when I run
this program: http://imgur.com/77DUbZp
I greatly appreciate your help with this. Any suggestions are welcome. Also,
this code will become FOSS when it is completed. Do you think it is related
to the way I'm loading in the data with the "extent" command and then making
a subplot? I'm generating a custom heatmap of the market density for the
background, so I sort of need that...
#!/usr/bin/env python2.7
# coding: utf-8
import matplotlib
from matplotlib.figure import Figure
from matplotlib.backends.backend_agg import FigureCanvasAgg
from datetime import datetime
import matplotlib.dates as dates
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.ticker import ScalarFormatter, FormatStrFormatter,
FuncFormatter
import matplotlib.image as mpimg
date = [ 734894.994583, 734894.995313, 734894.996042, 734894.997384,
734894.998032 ]
price = [ 17.37, 17.30001, 17.30001, 17.39, 17.39 ]
graphdate = []
for i in date:
 graphdate.append(i)
graph = np.zeros((100,100,3))
fig=Figure(figsize=(5.5,2.4))
pl=fig.add_subplot(111)
image=pl.imshow(graph,aspect="auto",extent=(min(date),max(date),min(price),max(price)))
fig.subplots_adjust(top=0.92,bottom=0.15,left=0.1,right=0.95)
# add plot of value across time 
pl.plot_date(zip(graphdate),zip(price),'-',color='blue',lw='1',alpha=1)
matplotlib.rcParams.update({'font.size': 5})
locator = dates.AutoDateLocator()
pl.set_ylim([min(price),max(price)])
ax2=pl.twinx() 
ax2.set_ylim([min(price),max(price)])
formatter = ScalarFormatter()
formatter.set_scientific(False)
formatter.set_powerlimits((-1000000000,10000))
pl.yaxis.set_major_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
pl.yaxis.set_major_formatter(formatter)
pl.yaxis.set_minor_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
pl.yaxis.set_minor_formatter(formatter)
pl.set_autoscaley_on(False)
yfm = pl.yaxis.get_major_formatter()
yfm.set_powerlimits([ -100000000000, 10000])
ax2.yaxis.set_major_formatter(formatter)
ax2.yaxis.set_major_formatter(ScalarFormatter(useOffset=False))
ax2.yaxis.set_major_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
ax2.yaxis.set_major_formatter(formatter)
ax2.yaxis.set_minor_formatter(ScalarFormatter(useOffset=False))
ax2.yaxis.set_minor_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
ax2.yaxis.set_major_formatter(formatter)
ax2.set_autoscaley_on(False)
yfm = ax2.yaxis.get_major_formatter()
yfm.set_powerlimits([ -100000000000, 10000])
period = 298; # duration in seconds for this graph
seconds = dates.SecondLocator(interval=30) # plot by 30-second increment
secondsFmt = dates.DateFormatter('%-I:%M:%S%P',tz=None)
pl.xaxis.set_major_locator(seconds)
pl.xaxis.set_major_formatter(secondsFmt) 
labels = pl.get_xticklabels()
for label in labels:
 label.set_rotation(45) 
pl.xaxis.grid(which='major',color='white', linestyle='--', linewidth=0.5,
alpha=0.15)
pl.xaxis.grid(which='minor',color='white', linestyle='--', linewidth=0.5,
alpha=0.15)
pl.yaxis.grid(which='major',color='white', linestyle='--', linewidth=0.5,
alpha=0.15)
pl.yaxis.grid(which='minor',color='white', linestyle='--', linewidth=0.5,
alpha=0.15)
canvas=FigureCanvasAgg(fig)
bigName = "sci_formatting_fail.png" # image name 
canvas.print_figure(bigName,dpi=200) # create date/timestamped file
print "grapher completed"
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-INSISTS-on-using-scientific-notation-how-do-I-make-it-STOP-tp40320p40326.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Eduardo B. T. <eeb...@uc...> - 2013年01月27日 04:29:54
Hi Skipper,
I think you are missing one bin in your plot... but anyway, this is how I'd
do the same plot (filled step plot):
import matplotlib.pyplot as plt
import numpy as np
t_sec = np.arange(6)
velocity = np.array([24., 33., 40., 45., 48., 49.])
width = t_sec[1] - t_sec[0]
plt.bar(t_sec, velocity, width=width, facecolor='b', edgecolor='')
xx = np.ravel(zip(t_sec, t_sec + width))
yy = np.ravel(zip(velocity, velocity))
plt.plot(xx, yy, 'k')
plt.show()
I think this is a bit simpler
Cheers,
Eduardo Banados
On Sun, Jan 27, 2013 at 12:35 AM, Skipper Seabold <jss...@gm...>wrote:
> This has been asked before, and I just filed a ticket [1]. Can anyone
> think of a better way to do something like this? The fill_between below is
> pretty suboptimal IMO.
>
> import matplotlib.pyplot as plt
> import numpy as np
>
> t_sec = np.arange(6)
> velocity = np.array([24., 33., 40., 45., 48., 49.])
>
> fig, ax = plt.subplots(figsize=(10,6))
> lines = ax.plot(t_sec, velocity, 'mo')
> ax.margins(.01)
> ax.grid(False)
> ax.set_ylim(0, 53);
> steps = ax.step(t_sec, velocity, where='post', color='black')
> filed = ax.fill_between(np.linspace(0, 5, 1001), 0,
> np.r_[np.repeat(velocity[:-1], 200), 5.])
>
> Skipper
>
> [1] https://github.com/matplotlib/matplotlib/issues/1709
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
-- 
Eduardo Bañados Torres
I'm trying to boil this thing down to a simple example program for you, it's
part of a big project so it's kind of tough, all the data is stored in RAM,
never in files...
It seems like there should be some way to just tell matplotlib to NEVER use
scientific notation for the axes... I'd be willing to alter my matplotlibrc
or even my matplotlib build itself, because this is the only application I
use it for. I can't even seem to find the part of the code backend that is
responsible for this weird behavior, though.
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-INSISTS-on-using-scientific-notation-how-do-I-make-it-STOP-tp40320p40324.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
On 2013年01月26日 5:33 PM, Todamont wrote:
> This is the relevant code:
Thanks, but what would really help is not what you think is the relevant 
code, but a completely self-contained *minimal* script, so that I can 
run it as-is, then modify it (probably only slightly), and return the 
modified version.
I suspect that using plot_date and a few fake data points, you can 
reproduce the problem. I doubt that it matters whether you use pyplot 
with an interactive backend, or use the OO form with FigureCanvasAgg.
Eric
>
> import sys, shutil
> import matplotlib
> from matplotlib.figure import Figure
> from matplotlib.backends.backend_agg import FigureCanvasAgg
> from mhd_scipy import load_mhd
> from datetime import datetime
> import matplotlib.dates as dates
> import matplotlib.pyplot as plt
> import numpy as np
> import matplotlib.font_manager
> from matplotlib.ticker import ScalarFormatter, FormatStrFormatter,
> FuncFormatter
>
> ...
>
> fig=Figure(figsize=(5.5,2.4))
> pl=fig.add_subplot(111)
>
> pl.plot_date(zip(graphdate),zip(price),'-',color='white',lw='0.5',alpha=0.25)
> pl.set_ylim([min(price),max(price)])
> ax2=pl.twinx()
> ax2.set_ylim([min(price),max(price)])
>
> # here is my attempt to force NON-SCIENTIFIC axes
> formatter = ScalarFormatter()
> formatter.set_scientific(False)
> formatter.set_powerlimits((-1000000000,10000))
> pl.yaxis.set_major_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
> pl.yaxis.set_major_formatter(formatter)
> pl.yaxis.set_minor_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
> pl.yaxis.set_minor_formatter(formatter)
> pl.set_autoscaley_on(False)
> yfm = pl.yaxis.get_major_formatter()
> yfm.set_powerlimits([ -100000000000, 10000])
>
> #finally, render...
> canvas=FigureCanvasAgg(fig) bigName = pyArgs[4] + "_big.png" # create
> image name string..
> canvas.print_figure(bigName,dpi=200) # create date/timestamped file
> print "Large line-graph Created"
>
>
> So, if I pass this thing price data that includes only 1 trade, or just a
> few trades that are within a cent or two of each other, that's when the
> bizarre axis scaling happens...
>
>
>
>
>
>
> --
> View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-INSISTS-on-using-scientific-notation-how-do-I-make-it-STOP-tp40320p40322.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
This is the relevant code:
import sys, shutil
import matplotlib
from matplotlib.figure import Figure
from matplotlib.backends.backend_agg import FigureCanvasAgg
from mhd_scipy import load_mhd
from datetime import datetime
import matplotlib.dates as dates
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.font_manager
from matplotlib.ticker import ScalarFormatter, FormatStrFormatter,
FuncFormatter
...
 fig=Figure(figsize=(5.5,2.4))
 pl=fig.add_subplot(111)
 
pl.plot_date(zip(graphdate),zip(price),'-',color='white',lw='0.5',alpha=0.25)
 pl.set_ylim([min(price),max(price)])
 ax2=pl.twinx() 
 ax2.set_ylim([min(price),max(price)])
# here is my attempt to force NON-SCIENTIFIC axes
 formatter = ScalarFormatter()
 formatter.set_scientific(False)
 formatter.set_powerlimits((-1000000000,10000))
 pl.yaxis.set_major_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
 pl.yaxis.set_major_formatter(formatter)
 pl.yaxis.set_minor_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
 pl.yaxis.set_minor_formatter(formatter)
 pl.set_autoscaley_on(False)
 yfm = pl.yaxis.get_major_formatter()
 yfm.set_powerlimits([ -100000000000, 10000])
#finally, render...
 canvas=FigureCanvasAgg(fig) bigName = pyArgs[4] + "_big.png" # create
image name string..
 canvas.print_figure(bigName,dpi=200) # create date/timestamped file
 print "Large line-graph Created"
So, if I pass this thing price data that includes only 1 trade, or just a
few trades that are within a cent or two of each other, that's when the
bizarre axis scaling happens...
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-INSISTS-on-using-scientific-notation-how-do-I-make-it-STOP-tp40320p40322.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
On 2013年01月26日 5:16 PM, Todamont wrote:
> I'm charting financial data, so scientific notation is unwanted in ALL cases.
> Sometimes if I pass it data with just a few trades right near each other, it
> scales so the y-axis get set to some bizare exponent, like 1.7321e1. By the
> way, why would anyone ever want a plot in scientific notation where the
> exponent is not a power of 10? It makes absolutely no sense whatsoever that
> it would do that, it is a bug.
>
> So, here is the code I'm trying to use to force matplotlib to NOT use
> scientific notation on the y-axis, unsuccesfully:
>
> formatter = ScalarFormatter()
> formatter.set_scientific(False)
> formatter.set_powerlimits((-10000,10000))
> pl.yaxis.set_major_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
> pl.yaxis.set_major_formatter(formatter)
> pl.yaxis.set_minor_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
> pl.yaxis.set_minor_formatter(formatter)
> pl.set_autoscaley_on(False)
> yfm = pl.yaxis.get_major_formatter()
> yfm.set_powerlimits([ -10000, 10000])
>
>
> None of these attempts to turn off scientific notation is working. Any
> suggestions? Please?
Please provide a minimal script illustrating the problem, that is, 
triggering the unwanted axis handling.
Eric
>
>
>
> --
> View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-INSISTS-on-using-scientific-notation-how-do-I-make-it-STOP-tp40320.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
I'm charting financial data, so scientific notation is unwanted in ALL cases.
Sometimes if I pass it data with just a few trades right near each other, it
scales so the y-axis get set to some bizare exponent, like 1.7321e1. By the
way, why would anyone ever want a plot in scientific notation where the
exponent is not a power of 10? It makes absolutely no sense whatsoever that
it would do that, it is a bug.
So, here is the code I'm trying to use to force matplotlib to NOT use
scientific notation on the y-axis, unsuccesfully:
 formatter = ScalarFormatter()
 formatter.set_scientific(False)
 formatter.set_powerlimits((-10000,10000))
 pl.yaxis.set_major_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
 pl.yaxis.set_major_formatter(formatter)
 pl.yaxis.set_minor_formatter(FuncFormatter(lambda x, pos: '%.0f'%x))
 pl.yaxis.set_minor_formatter(formatter)
 pl.set_autoscaley_on(False)
 yfm = pl.yaxis.get_major_formatter()
 yfm.set_powerlimits([ -10000, 10000])
None of these attempts to turn off scientific notation is working. Any
suggestions? Please? 
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Matplotlib-INSISTS-on-using-scientific-notation-how-do-I-make-it-STOP-tp40320.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Showing results of 170

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