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 results of 77

<< < 1 2 3 4 > >> (Page 3 of 4)
From: Sterling S. <sm...@fu...> - 2015年07月09日 16:19:09
Works for me with TkAgg backend on 1.4.3.
-Sterling
On Jul 9, 2015, at 3:52AM, Mark Bakker <ma...@gm...> wrote:
> Hello list,
> 
> I am trying to set the backgroundcolor of a textbox:
> 
> from pylab import *
> plot([1, 2, 3])
> text(1, 2, 'Hello', backgroundcolor = 'red')
> 
> This plots a nice red box but no text. It looks like the backgroundcolor is set as the foreground. Am I doing something wrong or is this a bug? mpl version 1.4.3
> 
> Thanks, Mark
> 
> ------------------------------------------------------------------------------
> 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月09日 14:52:21
Which backend are you using? It works fine for me with a recent-ish master
using Qt4Agg backend.
Ben Root
On Thu, Jul 9, 2015 at 6:52 AM, Mark Bakker <ma...@gm...> wrote:
> Hello list,
>
> I am trying to set the backgroundcolor of a textbox:
>
> from pylab import *
> plot([1, 2, 3])
> text(1, 2, 'Hello', backgroundcolor = 'red')
>
> This plots a nice red box but no text. It looks like the backgroundcolor
> is set as the foreground. Am I doing something wrong or is this a bug? mpl
> version 1.4.3
>
> Thanks, Mark
>
>
>
> ------------------------------------------------------------------------------
> 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月09日 14:46:42
why not use MathJax?
On Thu, Jul 9, 2015 at 8:03 AM, asiga <asi...@ya...> wrote:
> Hi,
>
> I need to render LaTeX math formulas on mobile apps (iOS/Android), with
> high
> quality, and as efficiently as possible.
>
> I'm considering matplotlib as the best candidate at the moment. Maybe it
> might be a bit overkill because I don't need plotting, just math formulas
> rendering, but it has a "copycenter" license (very welcome when you target
> iOS), and it seems to render LaTeX math with high quality. So I think it
> beats other options I found (MathGL: copyleft license; and MathJax: setting
> a complete Javascript engine just for rendering math does seem overkill to
> me).
>
> However, I still have some doubts before choosing matplotlib:
>
> 1) Can I redirect the output of math rendering to OpenGL calls, or convert
> it into a 2D triangle mesh for example? (if the drawing commands issued by
> matplotlib when rendering math are a relatively small set, I can translate
> them to OpenGL myself, but I need to know where should I do that
> translation
> (I've zero idea about matplotlib internals, and I'm a Python newbie -I'm
> here because I need math rendering, not because I use Python).
>
> (note that I wish to render through OpenGL because I want to be able to
> interactively pan and zoom math very efficiently: the best approach would
> be
> to cache the matplotlib output as a -for example- 2D triangle mesh, and
> then
> just send the triangles to OpenGL, without having to call matplotlib on
> each
> screen redraw, which would kill performance)
>
> 2) In order to get matplotlib running as efficient as possible on mobile
> devices, would you recommend that I translate matplotlib to C/C++ using any
> of the translators available? If affirmative, what translator would you
> suggest me to use?
>
> Thanks a lot!!
>
>
>
>
>
> --
> View this message in context:
> http://matplotlib.1069221.n5.nabble.com/Efficient-matplotlib-use-on-iOS-and-Android-apps-tp45901.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: Jonno <jon...@gm...> - 2015年07月09日 14:44:32
It might just have to be 2 separate contour/surface plots side by side,
perhaps with a linked cursor between them.
The other thing I considered was combining the a,b data into a single value
(combined % deviation from ideal?) but that reduces the data which I'd
rather not do if possible.
On Thu, Jul 9, 2015 at 9:40 AM, 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
>>
>>
>
From: Jonno <jon...@gm...> - 2015年07月09日 14:40:51
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
>
>
From: asiga <asi...@ya...> - 2015年07月09日 12:03:52
Hi,
I need to render LaTeX math formulas on mobile apps (iOS/Android), with high
quality, and as efficiently as possible.
I'm considering matplotlib as the best candidate at the moment. Maybe it
might be a bit overkill because I don't need plotting, just math formulas
rendering, but it has a "copycenter" license (very welcome when you target
iOS), and it seems to render LaTeX math with high quality. So I think it
beats other options I found (MathGL: copyleft license; and MathJax: setting
a complete Javascript engine just for rendering math does seem overkill to
me).
However, I still have some doubts before choosing matplotlib:
1) Can I redirect the output of math rendering to OpenGL calls, or convert
it into a 2D triangle mesh for example? (if the drawing commands issued by
matplotlib when rendering math are a relatively small set, I can translate
them to OpenGL myself, but I need to know where should I do that translation
(I've zero idea about matplotlib internals, and I'm a Python newbie -I'm
here because I need math rendering, not because I use Python).
(note that I wish to render through OpenGL because I want to be able to
interactively pan and zoom math very efficiently: the best approach would be
to cache the matplotlib output as a -for example- 2D triangle mesh, and then
just send the triangles to OpenGL, without having to call matplotlib on each
screen redraw, which would kill performance)
2) In order to get matplotlib running as efficient as possible on mobile
devices, would you recommend that I translate matplotlib to C/C++ using any
of the translators available? If affirmative, what translator would you
suggest me to use?
Thanks a lot!!
 
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Efficient-matplotlib-use-on-iOS-and-Android-apps-tp45901.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Mark B. <ma...@gm...> - 2015年07月09日 10:52:51
Hello list,
I am trying to set the backgroundcolor of a textbox:
from pylab import *
plot([1, 2, 3])
text(1, 2, 'Hello', backgroundcolor = 'red')
This plots a nice red box but no text. It looks like the backgroundcolor is
set as the foreground. Am I doing something wrong or is this a bug? mpl
version 1.4.3
Thanks, Mark
From: Sterling S. <sm...@fu...> - 2015年07月09日 05:28:11
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
From: Jonno <jon...@gm...> - 2015年07月09日 03:19:44
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.
From: Chad W. <ch...@ch...> - 2015年07月08日 22:40:24
Hi,
I'm trying to use a custom font that is set dynamically at runtime, if available. (I don't want this font to be the default in the config file.) But matplotlib keeps defaulting to the generic sans-serif font if I include that as an option later in the font family list.
In the process of troubleshooting, I found there was a commit which already addressed this issue (https://github.com/matplotlib/matplotlib/commit/314a0cf), although unfortunately it didn't solve it in my particular case, when the font being scored is first in the rcParams font alias list.
Seems like it could be an easy fix for someone familiar with the scoring algorithm. I don't see quite what the expected scores *should* be (the docstring for that function looks to be out of sync) but it shouldn't be 0 for default fonts not explicitly named first in the family list. I'll put this in the bug tracker and try to workaround for now.
Thanks,
cw
From: Benjamin R. <ben...@ou...> - 2015年07月08日 15:36:49
Your code example is incomplete. Even if I add in the typical imports and
"fig, ax = plt.subplots()" and "plt.show()", The x tick labels aren't
rotated, and I certainly don't have too many tick labels. Could you provide
a complete working example that demonstrate the problem?
Ben Root
On Wed, Jul 8, 2015 at 9:15 AM, manik971 <nec...@ho...> wrote:
> <code>
> date_range = (735599.0, 735745.0)
> x = (735610.5, 735647.0, 735647.5, 735648.5, 735669.0, 735699.0, 735701.5,
> 735702.5, 735709.5, 735725.5, 735728.5, 735735.5, 735736.0)
> y = (227891.25361545716, 205090.4880046467, 208352.59317388065,
> 175462.99296699322, 98209.836461969651, 275063.37219361769,
> 219456.93600708069, 230731.12613806152, 209043.19805037521,
> 218297.51486296533, 208036.88967207001, 206311.71988471842,
> 216036.56824433553)
> y0 = 218206.79192
> x_after = (735610.5, 735647.0, 735647.5, 735701.5, 735702.5, 735709.5,
> 735725.5, 735728.5, 735735.5, 735736.0)
> y_after = (227891.25361545716, 205090.4880046467, 208352.59317388065,
> 219456.93600708069, 230731.12613806152, 209043.19805037521,
> 218297.51486296533, 208036.88967207001, 206311.71988471842,
> 216036.56824433553)
> ax.plot_date(x, numpy.array(y) / y0, color='r', xdate=True, marker='x')
> linex = -39.1175584541
> liney = 28993493.5251
>
> ax.set_xlim(date_range)
> steps = list(ax.get_xlim())
> steps.append(steps[-1] + 2)
> steps = [steps[0] - 2] + steps
> ax.plot(steps, numpy.array([linex * a + liney for a in steps]) / y0,
> color='b')
> </code>
>
>
>
> --
> View this message in context:
> http://matplotlib.1069221.n5.nabble.com/Plot-Too-many-ticks-on-X-axe-tp45893p45894.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: manik971 <nec...@ho...> - 2015年07月08日 13:15:25
<code>
date_range = (735599.0, 735745.0)
x = (735610.5, 735647.0, 735647.5, 735648.5, 735669.0, 735699.0, 735701.5,
735702.5, 735709.5, 735725.5, 735728.5, 735735.5, 735736.0)
y = (227891.25361545716, 205090.4880046467, 208352.59317388065,
175462.99296699322, 98209.836461969651, 275063.37219361769,
219456.93600708069, 230731.12613806152, 209043.19805037521,
218297.51486296533, 208036.88967207001, 206311.71988471842,
216036.56824433553)
y0 = 218206.79192
x_after = (735610.5, 735647.0, 735647.5, 735701.5, 735702.5, 735709.5,
735725.5, 735728.5, 735735.5, 735736.0)
y_after = (227891.25361545716, 205090.4880046467, 208352.59317388065,
219456.93600708069, 230731.12613806152, 209043.19805037521,
218297.51486296533, 208036.88967207001, 206311.71988471842,
216036.56824433553)
ax.plot_date(x, numpy.array(y) / y0, color='r', xdate=True, marker='x')
linex = -39.1175584541
liney = 28993493.5251
ax.set_xlim(date_range)
steps = list(ax.get_xlim())
steps.append(steps[-1] + 2)
steps = [steps[0] - 2] + steps
ax.plot(steps, numpy.array([linex * a + liney for a in steps]) / y0,
color='b')
</code>
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Plot-Too-many-ticks-on-X-axe-tp45893p45894.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: manik971 <nec...@ho...> - 2015年07月08日 12:49:32
Hello,
The first loaded plot have too many ticks on X axe (see image01).
<http://matplotlib.1069221.n5.nabble.com/file/n45893/help-01.jpg> 
If I use the zoom action on X axe, the plot is now well loaded.
<http://matplotlib.1069221.n5.nabble.com/file/n45893/help-02.jpg> 
Can you give me some advise where I can search because The Plot constructor
parameters seems good.
Thank you for your help.
Manuel
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Plot-Too-many-ticks-on-X-axe-tp45893.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Jean-Luc S. <jls...@ed...> - 2015年07月06日 23:19:21
We are pleased to announce the fourth public release of HoloViews,
a Python package for simplifying the exploration of scientific data:
 http://holoviews.org
HoloViews provides composable, sliceable, declarative data
structures for building even complex visualizations easily.
The goal of HoloViews is to let your data just visualize itself,
allowing you to work with large datasets as easily as you work
with simple datatypes at the Python prompt.
You can obtain the new version using conda or pip:
 conda install -c ioam holoviews
 pip install --upgrade 'holoviews[recommended]'
This release includes a substantial number of new features and
API improvements, most of which have been suggested by our growing
userbase:
- Major optimizations throughout, both for working with HoloViews
 data structures and for visualization.
- Improved widget appearance and greatly reduced flickering
 issues when interactively exploring data in the browser.
- Improved handling of unicode and LaTeX text throughout,
 using Python 3's better unicode support (when available).
- New Polygons, ErrorBars, and Spread Element types.
- Support for multiple matplotlib backends (vanilla matplotlib, mpld3
 and nbagg) with support for other plotting systems (such as Bokeh)
 in development. Easily switching between backends allows you to take
 advantage of the unique features of each one, such as good SVG/PDF
 output, interactive zooming and panning, or 3D viewpoint control.
- Streamlined the API based on user feedback; now even more things
 "just work". This includes new, easy to use constructors for
 common Element types as well as easy conversion between them.
- More customizability of plot and style options, including easier
 control over font sizes, legend positions, background color, and
 multiple color bars. Polar projections now supported throughout.
- More flexible and customizable Layouts, allowing the user to
 define blank spaces (using the Empty object) as well as more
 control over positioning and aspect ratios.
- Support for a holoviews.rc file, integration with IPython Notebook
 interact widgets, improvements to the Pandas interface, easy
 saving and loading of data via pickling, and much more.
And of course we have fixed a number of bugs found by our very
dedicated users; please keep filing Github issues if you find any!
For the full list of changes, see:
 https://github.com/ioam/holoviews/releases
HoloViews remains freely available under a BSD license, is Python 2
and 3 compatible, and has minimal external dependencies, making it
easy to integrate into your workflow. Try out the extensive tutorials
at holoviews.org today, and check out our upcoming SciPy and EuroSciPy
talks in Austin and Cambridge (or read the paper at http://goo.gl/NH9FTB)!
Philipp Rudiger
Jean-Luc R. Stevens
James A. Bednar
The University of Edinburgh
School of Informatics
-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
From: Neal B. <ndb...@gm...> - 2015年07月06日 13:15:54
Christian Alis wrote:
> Have you tried making the string unicode?
> 
> ax.set_xlabel (u' ')
> 
> 
------------------------------------------------------------------------------
Oh, thanks. That works now on py2 and py3.
From: Christian A. <ia...@gm...> - 2015年07月06日 13:05:07
Have you tried making the string unicode?
ax.set_xlabel (u' ')
From: Neal B. <ndb...@gm...> - 2015年07月06日 12:50:12
This code runs on python3, but on python2 I get:
Traceback (most recent call last):
 File "per_vs_lambda.py", line 35, in <module>
 ax.set_xlabel (' ')
 File "/usr/lib64/python2.7/site-packages/matplotlib/axes/_axes.py", line 
179, in set_xlabel
 return self.xaxis.set_label_text(xlabel, fontdict, **kwargs)
 File "/usr/lib64/python2.7/site-packages/matplotlib/axis.py", line 1480, 
in set_label_text
 self.label.set_text(label)
 File "/usr/lib64/python2.7/site-packages/matplotlib/text.py", line 1028, 
in set_text
 self._text = '%s' % (s,)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 0: 
ordinal not in range(128)
#!/usr/bin/python
# -*- coding: utf-8 -*-
data='''carriers,lambda,per
1,7,1.3e-4
1,8,3.0e-4
1,9,.0014
8,7,4.8e-4
8,8,1.3e-3
8,9,.0075
'''
import pandas as pd
try:
 from StringIO import StringIO
except ImportError:
 from io import StringIO
df = pd.read_csv (StringIO (data))
g = df.groupby ('carriers')
import matplotlib.pyplot as plt
import matplotlib as mpl
#mpl.rcParams['font.family'] = 'stix'
mpl.rc('font', family='DejaVu Sans')
#mpl.rc('font', family='stix')
import itertools
markers = itertools.cycle(['o','s','v']) 
fig = plt.figure() 
ax = fig.add_subplot(111)
for c, stuff in g:
 plt.semilogy (stuff['lambda'].values, stuff['per'].values, 
label='carriers=%s'%c, marker=next(markers))
plt.legend (loc='best')
ax.set_xlabel (' ') <<< this invisible character is a small greek lambda
ax.set_ylabel ('per')
plt.grid(which='major', linestyle='solid')
plt.grid(which='minor', linestyle='dashed') 
plt.savefig ('per_vs_lambda.pdf')
From: Neal B. <ndb...@gm...> - 2015年07月06日 12:42:29
Neal Becker wrote:
> Using mpl 1.4.3 on Fedora 22, I'm trying to use stix font (so I can render
> the unicode lambda label on the x-axis). I have every fedora package
> related to 'stix', I think. It displays ok in qtagg4, but if I try to save
> to pdf if fails with
> 
> RuntimeError Traceback (most recent call
> last) <ipython-input-2-7dee58c07264> in <module>()
> ----> 1 exec(open(r'/usr/tmp/python-8710q1Y.py').read()) # PYTHON-MODE
> 
> <string> in <module>()
> 
> /usr/lib64/python3.4/site-packages/matplotlib/pyplot.py in savefig(*args,
> **kwargs)
> 575 def savefig(*args, **kwargs):
> 576 fig = gcf()
> --> 577 res = fig.savefig(*args, **kwargs)
> 578 draw() # need this if 'transparent=True' to reset colors
> 579 return res
> 
> /usr/lib64/python3.4/site-packages/matplotlib/figure.py in savefig(self,
> *args, **kwargs)
> 1474 self.set_frameon(frameon)
> 1475
> -> 1476 self.canvas.print_figure(*args, **kwargs)
> 1477
> 1478 if frameon:
> 
> /usr/lib64/python3.4/site-packages/matplotlib/backend_bases.py in
> print_figure(self, filename, dpi, facecolor, edgecolor, orientation,
> format, **kwargs)
> 2209 orientation=orientation,
> 2210 bbox_inches_restore=_bbox_inches_restore,
> -> 2211 **kwargs)
> 2212 finally:
> 2213 if bbox_inches and restore_bbox:
> 
> /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in
> print_pdf(self, filename, **kwargs)
> 2489 file.endStream()
> 2490 else: # we opened the file above; now
> finish
> it off
> -> 2491 file.close()
> 2492
> 2493
> 
> /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in
> close(self)
> 523 self.endStream()
> 524 # Write out the various deferred objects
> --> 525 self.writeFonts()
> 526 self.writeObject(self.alphaStateObject,
> 527 dict([(val[0], val[1])
> 
> /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in
> writeFonts(self)
> 626 chars = self.used_characters.get(stat_key)
> 627 if chars is not None and len(chars[1]):
> --> 628 fonts[Fx] = self.embedTTF(realpath, chars[1])
> 629 self.writeObject(self.fontObject, fonts)
> 630
> 
> /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in
> embedTTF(self, filename, characters)
> 1101
> 1102 if fonttype == 3:
> -> 1103 return embedTTFType3(font, characters, descriptor)
> 1104 elif fonttype == 42:
> 1105 return embedTTFType42(font, characters, descriptor)
> 
> /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in
> embedTTFType3(font, characters, descriptor)
> 887 # actual outlines)
> 888 rawcharprocs = ttconv.get_pdf_charprocs(
> --> 889 filename.encode(sys.getfilesystemencoding()),
> glyph_ids)
> 890 charprocs = {}
> 891 for charname, stream in six.iteritems(rawcharprocs):
> 
> RuntimeError: TrueType font is missing table
> 
forgot to attach the code.
#!/usr/bin/python
# -*- coding: utf-8 -*-
data='''carriers,lambda,per
1,7,1.3e-4
1,8,3.0e-4
1,9,.0014
8,7,4.8e-4
8,8,1.3e-3
8,9,.0075
'''
import pandas as pd
try:
 from StringIO import StringIO
except ImportError:
 from io import StringIO
df = pd.read_csv (StringIO (data))
g = df.groupby ('carriers')
import matplotlib.pyplot as plt
import matplotlib as mpl
#mpl.rcParams['font.family'] = 'stix'
mpl.rc('font', family='DejaVu Sans')
#mpl.rc('font', family='stix')
import itertools
markers = itertools.cycle(['o','s','v']) 
fig = plt.figure() 
ax = fig.add_subplot(111)
for c, stuff in g:
 plt.semilogy (stuff['lambda'].values, stuff['per'].values, 
label='carriers=%s'%c, marker=next(markers))
plt.legend (loc='best')
ax.set_xlabel (' ')
ax.set_ylabel ('per')
plt.grid(which='major', linestyle='solid')
plt.grid(which='minor', linestyle='dashed') 
plt.savefig ('per_vs_lambda.pdf')
From: Neal B. <ndb...@gm...> - 2015年07月06日 12:26:31
Using mpl 1.4.3 on Fedora 22, I'm trying to use stix font (so I can render 
the unicode lambda label on the x-axis). I have every fedora package 
related to 'stix', I think. It displays ok in qtagg4, but if I try to save 
to pdf if fails with
RuntimeError Traceback (most recent call last)
<ipython-input-2-7dee58c07264> in <module>()
----> 1 exec(open(r'/usr/tmp/python-8710q1Y.py').read()) # PYTHON-MODE
<string> in <module>()
/usr/lib64/python3.4/site-packages/matplotlib/pyplot.py in savefig(*args, 
**kwargs)
 575 def savefig(*args, **kwargs):
 576 fig = gcf()
--> 577 res = fig.savefig(*args, **kwargs)
 578 draw() # need this if 'transparent=True' to reset colors
 579 return res
/usr/lib64/python3.4/site-packages/matplotlib/figure.py in savefig(self, 
*args, **kwargs)
 1474 self.set_frameon(frameon)
 1475 
-> 1476 self.canvas.print_figure(*args, **kwargs)
 1477 
 1478 if frameon:
/usr/lib64/python3.4/site-packages/matplotlib/backend_bases.py in 
print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, 
**kwargs)
 2209 orientation=orientation,
 2210 bbox_inches_restore=_bbox_inches_restore,
-> 2211 **kwargs)
 2212 finally:
 2213 if bbox_inches and restore_bbox:
/usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in 
print_pdf(self, filename, **kwargs)
 2489 file.endStream()
 2490 else: # we opened the file above; now finish 
it off
-> 2491 file.close()
 2492 
 2493 
/usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in 
close(self)
 523 self.endStream()
 524 # Write out the various deferred objects
--> 525 self.writeFonts()
 526 self.writeObject(self.alphaStateObject,
 527 dict([(val[0], val[1])
/usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in 
writeFonts(self)
 626 chars = self.used_characters.get(stat_key)
 627 if chars is not None and len(chars[1]):
--> 628 fonts[Fx] = self.embedTTF(realpath, chars[1])
 629 self.writeObject(self.fontObject, fonts)
 630 
/usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in 
embedTTF(self, filename, characters)
 1101 
 1102 if fonttype == 3:
-> 1103 return embedTTFType3(font, characters, descriptor)
 1104 elif fonttype == 42:
 1105 return embedTTFType42(font, characters, descriptor)
/usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in 
embedTTFType3(font, characters, descriptor)
 887 # actual outlines)
 888 rawcharprocs = ttconv.get_pdf_charprocs(
--> 889 filename.encode(sys.getfilesystemencoding()), 
glyph_ids)
 890 charprocs = {}
 891 for charname, stream in six.iteritems(rawcharprocs):
RuntimeError: TrueType font is missing table
From: Gael G. <gae...@gm...> - 2015年07月04日 02:52:19
Thank you very for helping with this issue. I am using the last version 1.4.3 (if it is the last one).
 
Gaël
 
De : ben...@gm... [mailto:ben...@gm...] De la part de Benjamin Root
Envoyé : 3 juillet 2015 22:41
À : Gael Grissonnanche
Cc : Matplotlib Users
Objet : Re: [Matplotlib-users] Zorder and Clip_on issues
 
Which version of matplotlib? This is familiar.... I could have sworn we fixed this.
Ben Root
On Jul 3, 2015 10:25 PM, "Gael Grissonnanche" <gae...@gm... <mailto:gae...@gm...> > wrote:
Hi everyone,
 
I had recently experienced a frustration regarding zorder and clip_on in Matplotlib.
 
In figure 1 attached here, I would like to put blue horizontal error bars above the x-axis. As you can see right now, half of it is cut by the x-axis (for the blue point at H = 0). I used:
 
axes.errorbar(data[:,0], data[:,1], xerr=data[:,2], fmt='', ls ="", c = ‘b’, capthick=2, elinewidth=2, clip_on = False, zorder = 10)
 
But even if I change zorder = 1000, the error bar never goes above the axis. Is it a bug?
 
Regarding the same topic, I also discovered that when using axes.twinx() in Figure 2 (A : axes; B : axes2 = axes.twinx()). The blue curve (A) never goes above the red curve (B), whatever zorder I use. I even tried axes2.set_axisbelow(True), but it doesn’t change anything. I really want "axes2" to be below the "axes". Is it a bug? I had to change it manually with Illustrator and it worked, but it is of course really not convenient.
 
Thank you very much for your help !
 
 
------------------------------------------------------------------------------
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... <mailto:Mat...@li...> 
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Benjamin R. <ben...@ou...> - 2015年07月04日 02:41:29
Which version of matplotlib? This is familiar.... I could have sworn we
fixed this.
Ben Root
On Jul 3, 2015 10:25 PM, "Gael Grissonnanche" <gae...@gm...>
wrote:
> Hi everyone,
>
>
>
> I had recently experienced a frustration regarding zorder and clip_on in
> Matplotlib.
>
>
>
> In figure 1 attached here, I would like to put blue horizontal error bars
> above the x-axis. As you can see right now, half of it is cut by the x-axis
> (for the blue point at H = 0). I used:
>
>
>
> axes.errorbar(data[:,0], data[:,1], xerr=data[:,2], fmt='', ls ="", c =
> ‘b’, capthick=2, elinewidth=2, clip_on = False, zorder = 10)
>
>
>
> But even if I change zorder = 1000, the error bar never goes above the
> axis. Is it a bug?
>
>
>
> Regarding the same topic, I also discovered that when using axes.twinx()
> in Figure 2 (A : axes; B : axes2 = axes.twinx()). The blue curve (A) never
> goes above the red curve (B), whatever zorder I use. I even tried
> axes2.set_axisbelow(True), but it doesn’t change anything. I really want
> "axes2" to be below the "axes". Is it a bug? I had to change it manually
> with Illustrator and it worked, but it is of course really not convenient.
>
>
>
> Thank you very much for your help !
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> 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: Yunjiang Q. <ser...@gm...> - 2015年07月03日 02:41:37
Such as example below. I want to put a new ax at data coordinates
[(45,45),(50,50)], but the transform fail to transform data coordinates to
axes.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib as mpl
from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.transforms as mtrans
%matplotlib inline
fig = plt.figure()
ax = fig.add_subplot(121,aspect=0.5)
ax.plot(np.linspace(0,100))
ax.set_ylim(0,50)
pbcb = mtrans.Bbox(ax.transLimits.transform([(45,45),(50,50)]))
cbax = fig.add_axes(pbcb)
This has been discussed and the consensus was that getting the heuristics
right is probably impossible (I work with dark-current subtracted image
data so it can have negative values, but using a diverging color map is
_very_ wrong, taking 0 as the center only makes sense some of the time).
Defaulting to a linear norm and sequential color map is in the worst case
not helpful, where as using the wrong center (or incorrectly using a
diverging color map) can be misleading. We are prioritizing not being
misleading over being slightly more convenient in the core library.
A function with a call signature like you describe should definitely be in
the examples.
Also see PR https://github.com/matplotlib/matplotlib/pull/3858 which is
adding a new normalizer to make setting up non-symmetric diverging color
maps easier.
Tom
On Thu, Jul 2, 2015 at 11:49 AM George Nurser <gn...@gm...> wrote:
> Hi,
> I've been following the discussions about the new default colormaps.
> I think it might be really helpful if the default behaviour were that
> matplotlib simply examined your data (Z, say), and if
> (1) Z.max() & Z.min() had the same sign then used a sequential colormap
> whereas if
> (2) Z.max() & Z.min() had opposite signs then it used a diverging
> colormap, centered on zero.
> Keywords e.g. Anomaly=True & centre = 10. could be extra arguments to
> override this behaviour.
>
> I realise that
> a) this really only requires a user to write a simple helper application.
> But 99% of users will never do this.
>
> b) it may not always be desired; but again 99% of the time it probably is.
>
> This would enable people just starting to use matplotlib perhaps to see
> that it can give 'better' plots than matlab
>
> Anyway, just a thought.
>
> George Nurser.
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> 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: George N. <gn...@gm...> - 2015年07月02日 15:48:29
Hi,
I've been following the discussions about the new default colormaps.
I think it might be really helpful if the default behaviour were that
matplotlib simply examined your data (Z, say), and if
(1) Z.max() & Z.min() had the same sign then used a sequential colormap
whereas if
(2) Z.max() & Z.min() had opposite signs then it used a diverging colormap,
centered on zero.
Keywords e.g. Anomaly=True & centre = 10. could be extra arguments to
override this behaviour.
I realise that
a) this really only requires a user to write a simple helper application.
 But 99% of users will never do this.
b) it may not always be desired; but again 99% of the time it probably is.
This would enable people just starting to use matplotlib perhaps to see
that it can give 'better' plots than matlab
Anyway, just a thought.
George Nurser.
From: Benjamin R. <ben...@ou...> - 2015年07月01日 18:10:06
You would need to save the artist object that is returned by
drawshapefile() in a list or something. Then, when you want to get rid of
it. you can call its `remove()` method or just do a `set_visible(False)` to
just hide it. This all requires having a reference to the artist object
itself.
Does that help?
Ben Root
On Wed, Jul 1, 2015 at 1:58 PM, Ronquillo, Edgar Nahum <ero...@la...>
wrote:
> Hello All,
>
>
>
> I am working with Basemap and loading several shapefiles using checkboxes
> in python. However, when I uncheck a checkbox I would like a shapefile to
> be removed and stay with the other shapefiles that are already loaded. I
> tried reloading and replotting the whole thing when I remove a checkbox but
> it will remove all the other shapefiles as well. In simpler words, is it
> possible to remove a shapefile from Basemap after m.readshapefile() has
> been called?
>
>
>
> Thanks in advance
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> 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 results of 77

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