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

Showing 9 results of 9

From: Duncan M. <dun...@gm...> - 2015年07月10日 21:38:44
Hey all,
I wanted to let folks know that there is a new matplotlib book available,
having just been published:
 *
https://www.packtpub.com/big-data-and-business-intelligence/mastering-matplotlib
The IPython notebooks are listed here (with links to NBViewer as well as
the individual chapter repos):
 * https://github.com/masteringmatplotlib/notebooks
The book didn't ship with an Acknowledgements section, so I am attempting
to make up for that here:
 *
http://oubiwann.blogspot.com/2015/07/mastering-matplotlib-acknowledgments.html
The ToC for the book hasn't been updated on the publisher's (or Amazon's)
site, so for your reading pleasure I have included the text from the
section "What this book covers" below:
Chapter 1, Getting Up to Speed, covers some history and background of
matplotlib, goes over some of the latest features of the library, provides
a refresher on Python 3 and IPython Notebooks, and whets the reader's
appetite with some advanced plotting examples.
Chapter 2, matplotlib Architecture, reviews the original design goals of
matplotlib and then proceeds to discuss its current architecture in detail,
providing visualizations of the conceptual structure and relationships
between the Python modules.
Chapter 3, matplotlib APIs and Integrations, walks the reader through the
matplotlib APIs adapting a single example accordingly, examines how the
third-party libraries are integrated with matplotlib, and gives migration
advice to the advanced users of the deprecated pylab API.
Chapter 4, Event Handling and Interactive Plots, provides a review of the
event-based systems, covers event loops in matplotlib and IPython, goes
over a selection of matplotlib events, and shows how to take advantage of
these to create interactive plots.
Chapter 5, High-level Plotting and Data Analysis, combines the interrelated
topics, providing a historical background of plotting, a discussion on the
grammar of graphics, and an overview of high-level plotting libraries. This
is then put to use in a detailed analysis of weather-related data that
spans 120 years.
Chapter 6, Customization and Configuration, covers the custom styles in
matplotlib and the use of grid specs to create a dashboard effect with the
combined plots. The lesser-known configuration options are also discussed
with an eye to optimization.
Chapter 7, Deploying matplotlib in Cloud Environments, explores a use case
for matplotlib in a remote deployment, which is followed by a detailed
programmatic batch-job example using Docker and Amazon AWS.
Chapter 8, matplotlib and Big Data, provides detailed examples of working
with large local data sets as well as the distributed ones, covering
options such as numpy.memmap, HDF5, and Hadoop. Plots with millions of
points will also be demonstrated.
Chapter 9, Clustering for matplotlib, introduces parallel programming and
clusters that are designed for use with matplotlib, demonstrating how to
distribute parts of a problem and then assemble the results for analysis in
matplotlib.
Hope everyone's having a good time at SciPy 2015!
d
From: Jonno <jon...@gm...> - 2015年07月10日 20:25:17
Thanks for all the ideas.
On Thu, Jul 9, 2015 at 8:09 PM, Joy merwin monteiro <joy...@gm...>
wrote:
> Maybe you could plot the ratio? That should give you rainfall per degree
> Celsius.
> On 9 Jul 2015 20:11, "Jonno" <jon...@gm...> wrote:
>
>> I was thinking of doing that or having 2 surface plots but I think it
>> would be visually quite confusing.
>> I was trying to think of an example since I'm sure someone has come up
>> with a nice way to display this kind of data.
>> Imagine if the data was average temperature (a) and average rainfall (b)
>> for a region in the world (lat/long = x,y). The goal is to display the data
>> such that it's obvious where the locations are that have closest to the
>> ideal temp/rain combination.
>> How would you go about that?
>>
>> On Thu, Jul 9, 2015 at 12:28 AM, Sterling Smith <sm...@fu...>
>> wrote:
>>
>>> In the x,y plane, could you overlay contours of a with contours of b?
>>> -Sterling
>>>
>>> On Jul 8, 2015, at 8:19PM, Jonno <jon...@gm...> wrote:
>>>
>>> > I have a bunch of experimental data points each of which has 2
>>> variables (x,y) and 2 results (a,b). Each pair or x,y values produces a
>>> pair of a,b resultant values.
>>> > There is a single optimal pair of a,b values and I'd like to figure
>>> out a way to illustrate the data to show the relationship between each x,y
>>> pair and how close each a,b pair is to the ideal.
>>> > I'm thinking about a dual surface/contour plot with 2 different
>>> z-axes. Ideally I would center both z-axes at the ideal values. I don't
>>> know if this is possible. Might be kinda messy.
>>> >
>>> > Any other thoughts? I'm sure there must be other examples where this
>>> is a problem.
>>> >
>>> ------------------------------------------------------------------------------
>>> > Don't Limit Your Business. Reach for the Cloud.
>>> > GigeNET's Cloud Solutions provide you with the tools and support that
>>> > you need to offload your IT needs and focus on growing your business.
>>> > Configured For All Businesses. Start Your Cloud Today.
>>> >
>>> https://www.gigenetcloud.com/_______________________________________________
>>> > Matplotlib-users mailing list
>>> > Mat...@li...
>>> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Don't Limit Your Business. Reach for the Cloud.
>> GigeNET's Cloud Solutions provide you with the tools and support that
>> you need to offload your IT needs and focus on growing your business.
>> Configured For All Businesses. Start Your Cloud Today.
>> https://www.gigenetcloud.com/
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
From: Benjamin R. <ben...@ou...> - 2015年07月10日 16:47:44
Your theta and phi were essentially 1D rather than 2D, so it didn't allow
for 2 degrees of freedom. And you don't need np.outer() for this:
theta = np.linspace(0, np.pi, 500)[:, None]
phi = np.linspace(0, 2*np.pi, 500)[None, :]
r = f(theta, phi)
x = r**2 * np.cos(phi) * np.sin(theta)
y = r**2 * np.sin(phi) * np.sin(theta)
z = r**2 * np.cos(theta)
The use of np.outer() in the original example acted a bit like a creating a
grid of u/v values in a 2D grid. However, your formulation required
computing a 2D grid of radius values in order to work correctly.
Cheers!
Ben Root
On Fri, Jul 10, 2015 at 7:54 AM, Romain Madar <rom...@ce...> wrote:
> Dear experts,
>
> I am trying to plot spherical harmonics with matplotlib and I have some
> troubles. I am starting from the example
> http://matplotlib.org/examples/mplot3d/surface3d_demo2.html where I
> change the factor 10 in a function of r=f(theta,phi) (or r=f(u,v) as they
> are named in the example). I observe very strange behaviours:
>
> (1) (x,y,z) = (r cos(phi) sin(theta) , r sin(phi) sin(theta) , r
> cos(theta)). But np.outer(a,b) is not commutative while the multiplication
> is. So how to choose the order in the np.outer() product? In fact,
> different order gives very different results.
>
> (2) It's seem impossible to reproduce the well known Ylm(theta,phi) plots.
> Using for example this document
> http://www.cs.dartmouth.edu/~wjarosz/publications/dissertation/appendixB.pdf
> :
>
>
>
>
>
> I don't know if I am doing something wrong or so, but I don't understand
> ... My full code is bellow.
>
> Thanks a lot in advance !
> Cheers,
> Romain
>
>
> PS:
>
> import math
> import numpy as np
> import pylab as p
> from mpl_toolkits.mplot3d import Axes3D
>
> def f(theta,phi):
> return np.sin(phi)*np.cos(phi)*np.sin(theta)**2
>
> fig = p.figure()
> ax = fig.add_subplot(111, projection='3d')
>
> theta = np.linspace(0, np.pi, 500)
> phi = np.linspace(0, 2*np.pi, 500)
>
> r = f(theta,phi)
> x = r**2 * np.outer( np.cos(phi) , np.sin(theta) )
> y = r**2 * np.outer( np.sin(phi) , np.sin(theta) )
> z = r**2 * np.outer(np.ones(phi.shape), np.cos(theta))
>
> #x = r**2 * np.outer( np.sin(theta) , np.cos(phi)
> )
>
> #y = r**2 * np.outer( np.sin(theta) , np.sin(phi) )
> #z = r**2 * np.outer( np.cos(theta), np.ones(theta.shape) )
>
> ax.plot_surface(x,y,z)
> ax.set_xlabel("X")
> ax.set_ylabel("Y")
> ax.set_zlabel("Z")
>
> p.show()
>
>
> --
> =========================================================
> 	Romain Madar
>
> Laboratoire de Physique Corpusculaire de Clermont-Ferrand
> Campus Universitaire des Cézeaux
> 4 avenue Blaise Pascal
> TSA 60026, CS 60026
> 63178 Aubière cedex, FRANCE
>
> Email: rom...@ce...
> Tel. : +33 (0)4 73 40 71 57
> Off. : 8204-8205
> =========================================================
>
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Benjamin R. <ben...@ou...> - 2015年07月10日 15:02:19
The way matplotlib does its MathText rendering is 1) incomplete (we don't
support all of MathTex), and 2) has *massive* overhead (relatively
speaking). Matplotlib is intended for producing figures with many disparate
components. The amount of code it takes to just generate a simple plot is
fairly significant (along with also firing up a python interpreter).
Meanwhile, MathJax is much lighter in the sense that all it needs to do is
parse a string and render out font characters.
As for matplotlib vs. MathJax, you will likely sending bitmaps to OpenGL
(if possible) anyway because that is pretty much what you will need to do
with matplotlib as well as MathJax. It is technically possible to obtain
the stroke data to send the font lines to OpenGL, but it will not look the
same as it would if you let a font renderer generate the bitmap. There are
a few reasons why matplotlib does not have an OpenGL backend yet, one of
them is because OpenGL does a terrible job in rendering text.
This is not to say that what you are thinking of doing is impossible to do.
It may be quite possible, but given that no one (that I am aware of) have
managed to get matplotlib running on a mobile OS, you have a huge
undertaking ahead of you just to get started. And, once you get there, it
is quite likely that the performance won't be what you need. In addition,
you might not like the resulting render. More power to you if you can get
it working, and I know many people who are interested in getting that stack
working on tablets and such.
On the other hand, there are plenty of documentation on how to build mobile
apps that take advantage of javascript-based technologies. Your startup
cost is very low here. And given that you will likely going to need to use
bitmaps anyway, it might not be all that bad of an option. I have no clue
what the performance penalty of firing up a javascript renderer on a mobile
OS, but in the face of the unknown, I avoid guessing. Don't fall victim to
premature optimization. I have been very surprised at how fast certain
(slow) technologies can be.
A minimalist LaTeX distro is an intriguing idea. I have no clue how much
effort it would take to do that, but that may be quite feasible.
Best of luck to you, and I look forward to finding out what you manage to
get working.
Cheers!
Ben Root
On Fri, Jul 10, 2015 at 4:37 AM, asiga <asi...@ya...> wrote:
> Why do you suggest MathJax? I assume Javascript will be less efficient than
> Python. Moreover, I'm not sure I can get the MathJax output as polygonal
> primitives that I can send to OpenGL. And, to complicate things, you cannot
> use JIT Javascript engines on iOS such as V8, due to sandboxing.
>
> In fact, I'm considering to build myself a minimal LaTeX distro. Maybe that
> would be the best option.
>
>
>
>
>
> --
> View this message in context:
> http://matplotlib.1069221.n5.nabble.com/Efficient-matplotlib-use-on-iOS-and-Android-apps-tp45901p45914.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Thomas C. <tca...@gm...> - 2015年07月10日 14:32:06
See
http://matplotlib.org/1.4.3/faq/installing_faq.html?highlight=install#linux-notes
On Fri, Jul 10, 2015, 9:10 AM Varada Anirudhan <var...@gm...>
wrote:
> Hello there
>
> When I was trying to install matplotlib, the output said that I needed to
> install freetype and png first
>
> How do I install freetype and png on my Ubuntu 14.04 powered-Linux system?
> Please help me with the lines of code for this installation
>
> Thanks in advance
>
>
>
>
> --
> View this message in context:
> http://matplotlib.1069221.n5.nabble.com/how-to-install-freetype-png-for-matplotlib-tp45916.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Varada A. <var...@gm...> - 2015年07月10日 14:07:25
Hello there
When I was trying to install matplotlib, the output said that I needed to
install freetype and png first
How do I install freetype and png on my Ubuntu 14.04 powered-Linux system?
Please help me with the lines of code for this installation
Thanks in advance
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/how-to-install-freetype-png-for-matplotlib-tp45916.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Romain M. <rom...@ce...> - 2015年07月10日 11:54:18
Dear experts,
I am trying to plot spherical harmonics with matplotlib and I have some 
troubles. I am starting from the example 
http://matplotlib.org/examples/mplot3d/surface3d_demo2.html where I 
change the factor 10 in a function of r=f(theta,phi) (or r=f(u,v) as 
they are named in the example). I observe very strange behaviours:
(1) (x,y,z) = (r cos(phi) sin(theta) , r sin(phi) sin(theta) , r 
cos(theta)). But np.outer(a,b) is not commutative while the 
multiplication is. So how to choose the order in the np.outer() product? 
In fact, different order gives very different results.
(2) It's seem impossible to reproduce the well known Ylm(theta,phi) 
plots. Using for example this document 
http://www.cs.dartmouth.edu/~wjarosz/publications/dissertation/appendixB.pdf 
:
I don't know if I am doing something wrong or so, but I don't understand 
... My full code is bellow.
Thanks a lot in advance !
Cheers,
Romain
PS:
import math
import numpy as np
import pylab as p
from mpl_toolkits.mplot3d import Axes3D
def f(theta,phi):
 return np.sin(phi)*np.cos(phi)*np.sin(theta)**2
fig = p.figure()
ax = fig.add_subplot(111, projection='3d')
theta = np.linspace(0, np.pi, 500)
phi = np.linspace(0, 2*np.pi, 500)
r = f(theta,phi)
x = r**2 * np.outer( np.cos(phi) , np.sin(theta) )
y = r**2 * np.outer( np.sin(phi) , np.sin(theta) )
z = r**2 * np.outer(np.ones(phi.shape), np.cos(theta))
#x = r**2 * np.outer( np.sin(theta) , np.cos(phi) )
#y = r**2 * np.outer( np.sin(theta) , np.sin(phi) )
#z = r**2 * np.outer( np.cos(theta), np.ones(theta.shape) )
ax.plot_surface(x,y,z)
ax.set_xlabel("X")
ax.set_ylabel("Y")
ax.set_zlabel("Z")
p.show()
-- 
=========================================================
	Romain Madar
Laboratoire de Physique Corpusculaire de Clermont-Ferrand
 Campus Universitaire des Cézeaux
 4 avenue Blaise Pascal
 TSA 60026, CS 60026
 63178 Aubière cedex, FRANCE
Email: rom...@ce...
Tel. : +33 (0)4 73 40 71 57
Off. : 8204-8205
=========================================================
From: asiga <asi...@ya...> - 2015年07月10日 08:37:53
Why do you suggest MathJax? I assume Javascript will be less efficient than
Python. Moreover, I'm not sure I can get the MathJax output as polygonal
primitives that I can send to OpenGL. And, to complicate things, you cannot
use JIT Javascript engines on iOS such as V8, due to sandboxing.
In fact, I'm considering to build myself a minimal LaTeX distro. Maybe that
would be the best option.
 
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Efficient-matplotlib-use-on-iOS-and-Android-apps-tp45901p45914.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Joy m. m. <joy...@gm...> - 2015年07月10日 01:09:22
Maybe you could plot the ratio? That should give you rainfall per degree
Celsius.
On 9 Jul 2015 20:11, "Jonno" <jon...@gm...> wrote:
> I was thinking of doing that or having 2 surface plots but I think it
> would be visually quite confusing.
> I was trying to think of an example since I'm sure someone has come up
> with a nice way to display this kind of data.
> Imagine if the data was average temperature (a) and average rainfall (b)
> for a region in the world (lat/long = x,y). The goal is to display the data
> such that it's obvious where the locations are that have closest to the
> ideal temp/rain combination.
> How would you go about that?
>
> On Thu, Jul 9, 2015 at 12:28 AM, Sterling Smith <sm...@fu...>
> wrote:
>
>> In the x,y plane, could you overlay contours of a with contours of b?
>> -Sterling
>>
>> On Jul 8, 2015, at 8:19PM, Jonno <jon...@gm...> wrote:
>>
>> > I have a bunch of experimental data points each of which has 2
>> variables (x,y) and 2 results (a,b). Each pair or x,y values produces a
>> pair of a,b resultant values.
>> > There is a single optimal pair of a,b values and I'd like to figure out
>> a way to illustrate the data to show the relationship between each x,y pair
>> and how close each a,b pair is to the ideal.
>> > I'm thinking about a dual surface/contour plot with 2 different z-axes.
>> Ideally I would center both z-axes at the ideal values. I don't know if
>> this is possible. Might be kinda messy.
>> >
>> > Any other thoughts? I'm sure there must be other examples where this is
>> a problem.
>> >
>> ------------------------------------------------------------------------------
>> > Don't Limit Your Business. Reach for the Cloud.
>> > GigeNET's Cloud Solutions provide you with the tools and support that
>> > you need to offload your IT needs and focus on growing your business.
>> > Configured For All Businesses. Start Your Cloud Today.
>> >
>> https://www.gigenetcloud.com/_______________________________________________
>> > Matplotlib-users mailing list
>> > Mat...@li...
>> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

Showing 9 results of 9

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 によって変換されたページ (->オリジナル) /