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



Showing 7 results of 7

From: Don M. <don...@bo...> - 2014年04月22日 15:13:15
Hello,
I'm new to this list (but not matplotlib and basemap), and am not sure if
this is the place to post basemap questions. I apologise if I have erred.
I'm reporting an issue whereby if I try to plot a zoomed in orthographic
projection with a bluemarble (or etopo or shaded relief) background, the
background remains "global," though it's oriented to the correct location,
not mapping to the zoomed projection coordinates. I am pasting in a simple
demo code that illustrates the behaviour. If you use the lcc projection,
all works fine, and if you use a "non-zoomed" ortho projection, the
background maps correctly.
It seems that there is something preventing the background from mapping
into anything but a "complete-domain" ortho projection. I'm not a great
map person, and I realise I may be missing the boat on the way I'm trying
to zoom my ortho projection, but I'm not sure.
Am I screwing up, or is it a bug?
Thank you,
Don Morton
#---------------------------------------------------
import mpl_toolkits.basemap as bm
import matplotlib.pyplot as plt
import numpy as np
# Define a lambert conformal over northwest United States
# With this projection (centered on Montana, and zoomed in),
# the background image does map to the zoomed in projection
'''
theMap = bm.Basemap(projection='lcc',
 lat_0=47, lat_1=30, lat_2=60, lon_0=-115,
 llcrnrlat=43, llcrnrlon=-128,
 urcrnrlat=55, urcrnrlon=-105,
 resolution='i', area_thresh=1000)
'''
# With this projection (centered on Vienna, and zoomed in),
# the background image doesn't map to the zoomed in projection
theMap = bm.Basemap(projection='ortho',
 lat_0=48.2, lon_0=16.4,
 llcrnry=-1000000.0, llcrnrx=-1000000.0,
 urcrnry=1000000.0, urcrnrx=1000000.0,
 resolution='l', area_thresh=1000)
theMap.drawcountries()
theMap.drawcoastlines()
theMap.bluemarble()
#theMap.shadedrelief()
#theMap.etopo()
plt.show()
---
Don Morton, Owner/Manager
Boreal Scientific Computing LLC
Fairbanks, Alaska USA
http://www.borealscicomp.com/
http://www.borealscicomp.com/Miscellaneous/MortonBio/
From: Benjamin R. <ben...@ou...> - 2014年04月22日 13:35:06
In most cases, you can also query the artist object for which axes it
belongs to:
ax = a.get_axes()
Note that is can be None if it hasn't been attached anywhere.
Cheers!
Ben Root
On Tue, Apr 22, 2014 at 3:35 AM, Eric Firing <ef...@ha...> wrote:
> On 2014年04月21日 8:30 PM, Michael Mossey wrote:
> > How do I check if an artist is in the list of artists attached to an
> axes?
>
> if a in ax.get_children():
> ...
>
> Eric
> >
> > Mike
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Start Your Social Network Today - Download eXo Platform
> > Build your Enterprise Intranet with eXo Platform Software
> > Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> > Get Started Now And Turn Your Intranet Into A Collaboration Platform
> > http://p.sf.net/sfu/ExoPlatform
> >
> >
> >
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
>
>
>
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Benjamin R. <ben...@ou...> - 2014年04月22日 13:32:04
Yes, there is a difference if you use the button versus explicitly stating
the dpi in a savefig call. When you use the button, matplotlib has to use
the default dpi since there is no other way to specify it.
Cheers!
Ben Root
On Mon, Apr 21, 2014 at 5:03 PM, Chao YUE <cha...@gm...> wrote:
> Yes, in fact I set dpi as 1000, which is already very high. In fact I have
> another question, will there be any difference if I use the save button on
> the interactive plotting toolbar and use the command line
> figure.savefig('xx.png',dpi=1000)?
>
> Chao
>
>
> On Mon, Apr 21, 2014 at 10:59 PM, Jody Klymak <jk...@uv...> wrote:
>
>> Did you set the dpi of the png?
>>
>> Cheers, Jody
>>
>>
>> On Apr 21, 2014, at 13:50 PM, ChaoYue <cha...@gm...> wrote:
>>
>> OK, I tried but I don't really see the difference between jpg and png by
>> my eyes in the attached case, maybe for other more complicated plots there
>> will be real difference. Anyway, thanks to all for your nice discussions.
>> And, BTW, I tried >2 hours trying to find a way to convert svg to emf, but
>> now I konw :p
>>
>> Cheers,
>>
>> Chao
>>
>>
>> On Mon, Apr 21, 2014 at 9:49 PM, Benjamin Root-2 [via matplotlib] <[hidden
>> email]> wrote:
>>
>>> JPGs will *always* have "bit blur" as it is a lossy image format. PNGs
>>> would be a better bet.
>>>
>>> Ben Root
>>>
>>>
>>> On Mon, Apr 21, 2014 at 3:33 PM, ChaoYue <[hidden email]<http://user/SendEmail.jtp?type=node&node=43265&i=0>
>>> > wrote:
>>>
>>>> Hi all,
>>>>
>>>> Thank you all for your kind response. I am sorry, but none of these
>>>> solutions significantly improved the visual quality on microsoft powerpiont
>>>> 2007. Thought I didn't try eps. So probably l have to go with the current
>>>> quality.
>>>> here is a best case I have now:
>>>> https://www.dropbox.com/s/0uhjogalz92hssm/different_figure_example.pptx
>>>> You can still see the "a bit blur" everywhere (currently with jpg being
>>>> inserted directly). I didn't have better quality than this one by trying
>>>> the method as suggested by you. Let me know if I am raising too much high
>>>> demand for this.
>>>>
>>>> Cheers,
>>>>
>>>> Chao
>>>>
>>>>
>>>> On Mon, Apr 21, 2014 at 4:41 PM, Jonathan Slavin [via matplotlib] <[hidden
>>>> email] <http://user/SendEmail.jtp?type=node&node=43264&i=0>> wrote:
>>>>
>>>>> ​Another alternative, if a vector graphics format doesn't work, is to
>>>>> make your png figure large. Then when you shrink it down to fit in your
>>>>> slide, it should still have good resolution.
>>>>>
>>>>> Jon​
>>>>>
>>>>> On Mon, Apr 21, 2014 at 10:13 AM, <[hidden email]<http://user/SendEmail.jtp?type=node&node=43262&i=0>
>>>>> > wrote:
>>>>>
>>>>>> No Powerpoint version I know supports SVG (or any vector graphics
>>>>>> format useful in this case) and Matplotlib does not
>>>>>> export WMF graphics anymore. So the easiest way is to use PNGs, if
>>>>>> you can live with raster graphics.
>>>>>>
>>>>>> Alternatively, if you need vector graphics, you can export the
>>>>>> Matplotlib plot as SVG and convert it to WMF or EMF using
>>>>>> Inkscape. This can be done in the command line like this:
>>>>>>
>>>>>> "c:\Program Files\Inkscape-0.48\inkscape.exe" --without-gui
>>>>>> --export-emf="output.emf" "input.svg"
>>>>>>
>>>>>>
>>>>>> Juergen
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> ________________________________________________________
>>>>> Jonathan D. Slavin Harvard-Smithsonian CfA
>>>>> [hidden email] <http://user/SendEmail.jtp?type=node&node=43262&i=1>
>>>>> 60 Garden Street, MS 83
>>>>> phone: <a href="tel:%28617%29%20496-7981" value="<a
>>>>> href="tel:%2B16174967981" value="+16174967981" target="_blank">
>>>>> +16174967981" target="_blank">(617) 496-7981 Cambridge, MA
>>>>> 02138-1516
>>>>> fax: <a href="tel:%28617%29%20496-7577" value="<a
>>>>> href="tel:%2B16174967577" value="+16174967577" target="_blank">
>>>>> +16174967577" target="_blank">(617) 496-7577 USA
>>>>> ________________________________________________________
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>>
>>>>> Start Your Social Network Today - Download eXo Platform
>>>>> Build your Enterprise Intranet with eXo Platform Software
>>>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>>>> http://p.sf.net/sfu/ExoPlatform
>>>>> _______________________________________________
>>>>> Matplotlib-users mailing list
>>>>> [hidden email] <http://user/SendEmail.jtp?type=node&node=43262&i=2>
>>>>> 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/Make-clear-figure-used-in-the-powerpoint-slides-tp43252p43262.html
>>>>> To start a new topic under matplotlib - users, email [hidden email]<http://user/SendEmail.jtp?type=node&node=43264&i=1>
>>>>> To unsubscribe from matplotlib, click here.
>>>>> 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>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> please visit:
>>>> http://www.globalcarbonatlas.org/
>>>>
>>>> ***********************************************************************************
>>>> Chao YUE
>>>> Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
>>>> UMR 1572 CEA-CNRS-UVSQ
>>>> Batiment 712 - Pe 119
>>>> 91191 GIF Sur YVETTE Cedex
>>>> Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
>>>>
>>>> ************************************************************************************
>>>>
>>>> ------------------------------
>>>> View this message in context: Re: Make clear figure used in the
>>>> powerpoint slides?<http://matplotlib.1069221.n5.nabble.com/Make-clear-figure-used-in-the-powerpoint-slides-tp43252p43264.html>
>>>> Sent from the matplotlib - users mailing list archive<http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html>at
>>>> Nabble.com.
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Start Your Social Network Today - Download eXo Platform
>>>> Build your Enterprise Intranet with eXo Platform Software
>>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>>> http://p.sf.net/sfu/ExoPlatform
>>>> _______________________________________________
>>>> Matplotlib-users mailing list
>>>> [hidden email] <http://user/SendEmail.jtp?type=node&node=43265&i=1>
>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>>
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> Start Your Social Network Today - Download eXo Platform
>>> Build your Enterprise Intranet with eXo Platform Software
>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>> http://p.sf.net/sfu/ExoPlatform
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> [hidden email] <http://user/SendEmail.jtp?type=node&node=43265&i=2>
>>> 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/Make-clear-figure-used-in-the-powerpoint-slides-tp43252p43265.html
>>> To start a new topic under matplotlib - users, email [hidden email]
>>> To unsubscribe from matplotlib, click here.
>>> 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>
>>>
>>
>>
>>
>> --
>> please visit:
>> http://www.globalcarbonatlas.org/
>>
>> ***********************************************************************************
>> Chao YUE
>> Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
>> UMR 1572 CEA-CNRS-UVSQ
>> Batiment 712 - Pe 119
>> 91191 GIF Sur YVETTE Cedex
>> Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
>>
>> ************************************************************************************
>>
>> ------------------------------
>> View this message in context: Re: Make clear figure used in the
>> powerpoint slides?<http://matplotlib.1069221.n5.nabble.com/Make-clear-figure-used-in-the-powerpoint-slides-tp43252p43266.html>
>> Sent from the matplotlib - users mailing list archive<http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html>at
>> Nabble.com.
>>
>> ------------------------------------------------------------------------------
>> Start Your Social Network Today - Download eXo Platform
>> Build your Enterprise Intranet with eXo Platform Software
>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>
>> http://p.sf.net/sfu/ExoPlatform_______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>>
>
>
> --
> please visit:
> http://www.globalcarbonatlas.org/
>
> ***********************************************************************************
> Chao YUE
> Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
> UMR 1572 CEA-CNRS-UVSQ
> Batiment 712 - Pe 119
> 91191 GIF Sur YVETTE Cedex
> Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
>
> ************************************************************************************
>
>
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Eric F. <ef...@ha...> - 2014年04月22日 07:41:39
On 2014年04月21日 8:30 PM, Michael Mossey wrote:
> How do I check if an artist is in the list of artists attached to an axes?
if a in ax.get_children():
 ...
Eric
>
> Mike
>
>
>
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Michael M. <mic...@gm...> - 2014年04月22日 06:30:21
How do I check if an artist is in the list of artists attached to an axes?
Mike
From: Michael M. <mic...@gm...> - 2014年04月22日 00:59:33
Further update: I think I know how to do this. I can register a mouse event
handler, and its xdata and ydata properties will tell me the data
coordinates.
On Mon, Apr 21, 2014 at 4:17 PM, Michael Mossey <mic...@gm...>wrote:
> Note: I'm looking at the Picker examples now and one problem I see is that
> I'm not asking the user to click on data points, but anywhere on the axes.
>
>
> On Mon, Apr 21, 2014 at 3:49 PM, Michael Mossey <mic...@gm...>wrote:
>
>> For my application which is a simple sound file editor written with
>> matplotlib and PyQt4, I want to detect left and right clicks on the canvas.
>> I need to know the data coordinates of the click (i.e., not where on the
>> screen the click occurred, but what data point as defined by the axes it
>> represents). How do I do this?
>>
>> Mike
>>
>>
>
From: Mike K. <mc...@gm...> - 2014年04月22日 00:03:29
Why not save to PDF? Drops straight into Powerpoint...
M
On 4/21/14, 4:50 PM, ChaoYue wrote:
> OK, I tried but I don't really see the difference between jpg and png by
> my eyes in the attached case, maybe for other more complicated plots
> there will be real difference. Anyway, thanks to all for your nice
> discussions. And, BTW, I tried >2 hours trying to find a way to convert
> svg to emf, but now I konw :p
>
> Cheers,
>
> Chao
>
>
> On Mon, Apr 21, 2014 at 9:49 PM, Benjamin Root-2 [via matplotlib]
> <[hidden email] </user/SendEmail.jtp?type=node&node=43266&i=0>> wrote:
>
> JPGs will *always* have "bit blur" as it is a lossy image format.
> PNGs would be a better bet.
>
> Ben Root
>
>

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