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






Showing results of 620

<< < 1 .. 13 14 15 16 17 .. 25 > >> (Page 15 of 25)
From: John H. <jd...@gm...> - 2010年02月14日 02:55:23
On Sat, Feb 13, 2010 at 8:03 PM, Wayne Watson
<sie...@sb...> wrote:
> Suppose I plot a line from (0,0) to (1,1.5) to (2,2). Now I want to mark
> (1,1.5) with a green circle. How is that done?
You've posted repeatedly about how confusing the docs are, asking what
you should read and what steps you should take to learn python, numpy,
scipy, matplotlib, etc. Lots of people have given you detailed
responses. The answer to this particular question is covered in the
"pyplot tutorial" one of the first and most basic documents in the
matplotlib documentation, and it is covered in the first section of
that tutorial, which suggests that you haven't read or digested even
the most basic documentation.
 http://matplotlib.sourceforge.net/contents.html
We have spent years writing this code and provided hundreds of
examples, as well as 800+ pages of documentation in PDF and html
available for you to learn from. We don't expect you to read it all
before asking questions and as you've seen the people here are more
than happy to answer your questions. Give them the courtesy of paying
attention to their answers, and when they point you to documentation
or examples, read it before asking another variant of the same
question.
JDH
From: Wayne W. <sie...@sb...> - 2010年02月14日 02:04:03
Suppose I plot a line from (0,0) to (1,1.5) to (2,2). Now I want to mark 
(1,1.5) with a green circle. How is that done?
-- 
"Crime is way down. War is declining. And that's far from the good 
news." -- Steven Pinker (and other sources) Why is this true, but yet 
the media says otherwise? The media knows very well how to manipulate us 
(see limbic, emotion, $$). -- WTW
From: C M <cmp...@gm...> - 2010年02月14日 00:50:17
On Sat, Feb 13, 2010 at 3:00 PM, Jae-Joon Lee <lee...@gm...> wrote:
> If you're happy with the default formatter behavior (which seems to
> match with your #3 requirement), just reuse it.
>
> class MyFormatter(ScalarFormatter):
>  def __call__(self, val, pos=None):
>    if val < 0:
>      return ''
>    else:
>      return ScalarFormatter.__call__(self, val)
>
>
> -JJ
Thank you very much. That is so simple and works beautifully.
Che
From: John J. <jja...@al...> - 2010年02月13日 20:53:28
HI,
I find the very basic animation below has a memory leak (my pagefile usage
number keeps growing in the Windows XP Windows Task Manager Performance
graph).I don't see this with the "animation_blit_gtk.py" example on:
http://matplotlib.sourceforge.net/examples/index.html
(which I used as a starting point for this). In "animation_blit_gtk.py" the
set_ydata() routine is used to update the line for the animation and this
does not leak. But if you call plot again with the new y_data (instead of
using set_ydata), this leaks too. Anyone have an idea on how to stop the
leak? 
thanks,
john
import gtk, gobject
import matplotlib
matplotlib.use('GTKAgg') 
import numpy as np
import matplotlib.pyplot as plt
from pylab import *
from matplotlib.patches import CirclePolygon
fig = plt.figure(figsize=(10,6))
ax = fig.add_subplot(111, autoscale_on=False )
canvas = fig.canvas
plt.axis([-1, 7, -0.5, 2.2])
def update_line():
 global x, y
 print update_line.cnt
 if update_line.background is None:
 update_line.background = canvas.copy_from_bbox(ax.bbox)
 canvas.restore_region(update_line.background)
 
 x_cir = 1.0 + 0.003*update_line.cnt 
 cir = CirclePolygon((x_cir, 1), 0.3, animated=True, \
 resolution=12, lw=2 )
 ax.add_patch(cir)
 ax.draw_artist(cir)
 
 canvas.blit(ax.bbox)
 
 if update_line.direction == 0:
 update_line.cnt += 1
 if update_line.cnt > 500:
 update_line.direction = 1
 else:
 update_line.cnt -= 1
 if update_line.cnt < 100:
 update_line.direction = 0
 
 return True
update_line.cnt = 0
update_line.direction = 0
update_line.background = None
def start_anim(event):
 gobject.idle_add(update_line)
 canvas.mpl_disconnect(start_anim.cid)
start_anim.cid = canvas.mpl_connect('draw_event', start_anim)
plt.show()
From: Jae-Joon L. <lee...@gm...> - 2010年02月13日 20:21:11
On Fri, Feb 12, 2010 at 1:48 PM, Tomasz Koziara
<t.k...@ci...> wrote:
> but then axis labels or even numbering gets cut off. On the other hand
> playing with:
>
You need to manually adjust subplot parameters
http://matplotlib.sourceforge.net/api/pyplot_api.html?highlight=subplots_adjust#matplotlib.pyplot.subplots_adjust
> plt.axes().set_aspect (2.0)
>
> does amazingly strange things. The explanation about what the number
> in the set_aspect function should be is quite vogue in the
> documentation. Hence my questions:
>
The aspect in axes is a aspect ratio of unit rectangle in the data
coordinate. It is similar to a pixel aspec ratio
(http://en.wikipedia.org/wiki/Pixel_aspect_ratio).
And, to me, the documentation makes sense. Let us know if you have
any suggestion to improve the documentation though.
> How to specify the aspect ratio of a figure (in my case containing
> some bar plots) so that all remaining things (like axis labels) are
> respected in the final result?
As I said, you need to manually adjust the subplot parameters (or
location of the axes). I guess this is more like a design decision.
You may try to automate things, as in the example below.
http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make-room-for-tick-labels
While it only makes a room for ticklabels, you can extend this to axis
labels and etc.
Regards,
-JJ
From: Jae-Joon L. <lee...@gm...> - 2010年02月13日 20:01:20
If you're happy with the default formatter behavior (which seems to
match with your #3 requirement), just reuse it.
class MyFormatter(ScalarFormatter):
 def __call__(self, val, pos=None):
 if val < 0:
 return ''
 else:
 return ScalarFormatter.__call__(self, val)
-JJ
On Fri, Feb 12, 2010 at 5:24 PM, C M <cmp...@gm...> wrote:
> I would like a custom formatter that does 3 things:
>
> 1) Blanks out all the values less than 0.
> 2) Chooses appropriate major ticks when zoomed out.
> 3) Shows an integer when the zoom scale is revealing multiple
> integers, but shows a decimal number when it is just showing within
> one integer; i.e. if it is 1, 2, 3, 4 in first case but 1.1, 1.2,
> 1.3, 1.4 in the second.
>
> So far I have needs (1) and (2) of this with this super-simple custom formatter:
>
> class MyFormatter(ScalarFormatter):
>  def __call__(self, val, pos=None):
>    if val < 0:
>      return ''
>    else:
>      return int(val)
>
> But how can I get need (3)? I need to know what the view_interval is
> to set a rule for this. Something like:
>
> if view_interval < 1:
>  return val  #this will be a decimal number
> else:
>  return int(val) #an integer
>
> So how do I get the view_interval? I'm not understanding how to get
> that from matplotlib.ticker.TickHelper()--if that is even the right
> way to do it--because get_view_interval() is not a method of
> TickHelper but of "DummyAxis", and at that point I've lost the idea.
>
> Any help is appreciated. Thanks,
> Che
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Wayne W. <sie...@sb...> - 2010年02月13日 13:10:58
In this case, it's spelling errors, mostly. axes for axis, etc.
-- 
"Crime is way down. War is declining. And that's far from the good 
news." -- Steven Pinker (and other sources) Why is this true, but yet 
the media says otherwise? The media knows very well how to manipulate us 
(see limbic, emotion, $$). -- WTW
From: Wayne W. <sie...@sb...> - 2010年02月13日 03:40:15
Certainly in IDLE, when one hits a show() in a def, the program does not 
continue to the next statement. It goes somewhere else, because my 
program continues normally. Apparently, it goes back up the def calls to 
the "main" program, which is a loop that just reads the next file to 
perform more of what I expect. If I know this to be true*, that allows 
a "workaround" with globals.
* There is another def that uses plot-show, and it continues without any 
notable difficulty. The show() is the last statement in the def. Of 
course, since show() is a legitimate use, if one knows the "end" rule, 
this seems quite reasonable way to operate.
-- 
"Crime is way down. War is declining. And that's far from the good 
news." -- Steven Pinker (and other sources) Why is this true, but yet 
the media says otherwise? The media knows very well how to manipulate us 
(see limbic, emotion, $$). -- WTW
From: Wayne W. <sie...@sb...> - 2010年02月13日 03:11:21
Thanks. True enough. I've been exploring that possibility, and it is 
probably the way to go. When I get a little further down the line, I'll 
probably distribute it that way.
On 2/12/2010 9:35 AM, Christopher Barker wrote:
> Wayne Watson wrote:
> 
>> So here's my list of thing to do when I come back to it.
>> 
> good plan, one comment:
>
> 
>> Determine if a better interpreter tool than IDLE would satisfy the end
>> users of the program I'm modifying. The hurdle is non-Python users who
>> just fire up IDLE and execute the program via F5.
>> 
> This one is a no brainer -- IDLE is an Integrated Development
> Environment -- if you are not developing, you don't need it, t is NOT a
> tool to run simply run a python program. It's really not hard to run a
> python program.
>
> Note that py2exe and friends might be the best solution -- these are
> tools that build a self-contained executable from a python program, so
> you end up with something to double click on, just like any other program.
>
> I don't know about TkInter, but wxPython has an option where it will put
> up a message window to show the user standard output -- it sounds like
> you want the user to see messages, etc. Maybe TK has something similar.
>
> Good luck,
>
> -Chris
>
>
>
>
> 
-- 
"Crime is way down. War is declining. And that's far from the good 
news." -- Steven Pinker (and other sources) Why is this true, but yet 
the media says otherwise? The media knows very well how to manipulate us 
(see limbic, emotion, $$). -- WTW
From: T J <tj...@gm...> - 2010年02月13日 03:05:15
Hi,
When plotting,
 plot(x, y, marker="-")
and its similar markers, what functionality in MPL is responsible for
interpolating between the points? My naive guess is that
interpolation is done in "display" coordinates since everything looks
nice even when zooming in. I inquire because I'd like to make
interpolation between two points follow some other path between the
two points. In other words, I'd like to make a plot structure which
will follow a different type of geodesic. Any tips or pointers in the
right direction would be greatly appreciated.
Thanks!
From: C M <cmp...@gm...> - 2010年02月12日 22:24:15
I would like a custom formatter that does 3 things:
1) Blanks out all the values less than 0.
2) Chooses appropriate major ticks when zoomed out.
3) Shows an integer when the zoom scale is revealing multiple
integers, but shows a decimal number when it is just showing within
one integer; i.e. if it is 1, 2, 3, 4 in first case but 1.1, 1.2,
1.3, 1.4 in the second.
So far I have needs (1) and (2) of this with this super-simple custom formatter:
class MyFormatter(ScalarFormatter):
 def __call__(self, val, pos=None):
 if val < 0:
 return ''
 else:
 return int(val)
But how can I get need (3)? I need to know what the view_interval is
to set a rule for this. Something like:
if view_interval < 1:
 return val #this will be a decimal number
else:
 return int(val) #an integer
So how do I get the view_interval? I'm not understanding how to get
that from matplotlib.ticker.TickHelper()--if that is even the right
way to do it--because get_view_interval() is not a method of
TickHelper but of "DummyAxis", and at that point I've lost the idea.
Any help is appreciated. Thanks,
Che
From: C M <cmp...@gm...> - 2010年02月12日 22:15:23
On Fri, Feb 12, 2010 at 2:24 PM, Stan West <sta...@nr...> wrote:
>> From: C M [mailto:cmp...@gm...]
>> Sent: Wednesday, February 03, 2010 21:59
>>
>> I'm using autoscale_view for the y axis, but find with a marker size >
>> about 10, it will autoscale the graphs such that some markers are
>> bisected by the edges of the frame. I already have it set to:
>>
>>   self.subplot.autoscale_view(tight=False, scalex=False,
>> scaley=True)
>>
>> so I'd basically like "tight" here to be "even less tight". For
>> example, for a graph of time in minutes along the y axis, I'd like the
>> bottom of the graph to actually be a bit below zero to catch events
>> that are 0.5 min, etc., without them being half-buried under the edge
>> of the graph.
>>
>> Can autoscale_view be altered a bit to allow for a more generous view?
>
> For a similar requirement, I made the following custom locator:
Thank you. I've been playing around with a way to do this, and may
have something working now from my attempt to modify the
autoscale_view function in axes.py. My own re-write is below. It's
barely different from what is in the original function. It just gets
the two edges of the bounding box that contains all the lines and
moves them out a bit.
I would like to understand your approach better. So far, I can't get
your code to produce the "margins" indicated--but I'm probably
applying it wrongly. I don't know how to force an autoscale, for
example. Your code is tough for me to understand because there are a
number of things you make use of that I'm not familiar with yet. I
could ask a number of questions but don't want to burden the list with
that unless people are up for it.
Thanks,
Che
# autoscale_view function that allows looser edges.
 def loose_autoscale_view(self, subplot, margin, tight=False,
scalex=True, scaley=True):
 """
 autoscale the view limits using the data limits. You can
 selectively autoscale only a single axis, eg, the xaxis by
 setting *scaley* to *False*. The autoscaling preserves any
 axis direction reversal that has already been done.
 """
 # if image data only just use the datalim
 if not self.subplot._autoscaleon: return
 if scalex:
 xshared = self.subplot._shared_x_axes.get_siblings(self.subplot)
 dl = [ax.dataLim for ax in xshared]
 bb = mtransforms.BboxBase.union(dl)
 xdiff = bb.intervalx[1] - bb.intervalx[0]
 x0 = bb.intervalx[0]-xdiff * margin
 x1 = bb.intervalx[1]+xdiff * margin
 if scaley:
 yshared = self.subplot._shared_y_axes.get_siblings(self.subplot)
 dl = [ax.dataLim for ax in yshared]
 bb = mtransforms.BboxBase.union(dl)
 y0 = bb.intervaly[0]-(bb.intervaly[1]* margin)
 y1 = bb.intervaly[1]* (1+margin)
 if (tight or (len(self.subplot.images)>0 and
 len(self.subplot.lines)==0 and
 len(self.subplot.patches)==0)):
 if scalex:
 self.subplot.set_xbound(x0, x1)
 if scaley:
 self.subplot.set_ybound(y0, y1)
 return
 if scalex:
 XL = self.subplot.xaxis.get_major_locator().view_limits(x0, x1)
 self.subplot.set_xbound(XL)
 if scaley:
 YL = self.subplot.yaxis.get_major_locator().view_limits(y0, y1)
 self.subplot.set_ybound(YL)
#Then it would be called with:
 self.loose_autoscale_view(self.subplot, 0.02, tight=False,
scalex=True, scaley=True)
#where self.subplot is my axes object. (self is a panel class)
From: Stan W. <sta...@nr...> - 2010年02月12日 22:10:52
> From: C M [mailto:cmp...@gm...] 
> Sent: Wednesday, February 03, 2010 21:59
> 
> I'm using autoscale_view for the y axis, but find with a marker size >
> about 10, it will autoscale the graphs such that some markers are
> bisected by the edges of the frame. I already have it set to:
> 
> self.subplot.autoscale_view(tight=False, scalex=False, 
> scaley=True)
> 
> so I'd basically like "tight" here to be "even less tight". For
> example, for a graph of time in minutes along the y axis, I'd like the
> bottom of the graph to actually be a bit below zero to catch events
> that are 0.5 min, etc., without them being half-buried under the edge
> of the graph.
> 
> Can autoscale_view be altered a bit to allow for a more generous view?
For a similar requirement, I made the following custom locator:
----
import numpy as np
import matplotlib as mpl
import matplotlib.ticker as mticker
import matplotlib.transforms as mtransforms
class LooseMaxNLocator(mticker.MaxNLocator):
 def __init__(self, margin = 0.05, **kwargs):
 mticker.MaxNLocator.__init__(self, **kwargs)
 self._margin = margin
 def autoscale(self):
 dmin, dmax = self.axis.get_data_interval()
 if self._symmetric:
 maxabs = max(abs(dmin), abs(dmax))
 dmin = -maxabs
 dmax = maxabs
 dmin, dmax = mtransforms.nonsingular(dmin, dmax, expander = 0.05)
 margin = self._margin * (dmax - dmin)
 vmin = dmin - margin
 vmax = dmax + margin
 bin_boundaries = self.bin_boundaries(vmin, vmax)
 vmin = min(vmin, max(bin_boundaries[bin_boundaries <= dmin]))
 vmax = max(vmax, min(bin_boundaries[bin_boundaries >= dmax]))
 return np.array([vmin, vmax])
----
The *margin* argument controls the looseness. For a given axis *ax*, you
instantiate and apply the locator with something like
 ax.xaxis.set_major_locator(LooseMaxNLocator(nbins=7, steps=[1, 2, 5, 10]))
and likewise for the Y axis. I believe that if the plot has already been
drawn, you have to somehow force an autoscaling.
I wrote that about 1.5 years ago for an earlier version of matplotlib, and I
don't know how compatible it is with the current ticker.py code. In
particular, you might need to override *view_limits* instead of *autoscale*.
Anyway, I hope it's useful to you.
From: Gökhan S. <gok...@gm...> - 2010年02月12日 21:34:36
On Fri, Feb 12, 2010 at 10:37 AM, Wayne Watson <sie...@sb...
> wrote:
> I'm beginning to read aboutPython OOP, classes, inheritance and the like.
> It seems like an understanding of those concepts is key to understanding how
> the import needs are met.
>
> --
> "Crime is way down. War is declining. And that's far from the good news."
> -- Steven Pinker (and other sources) Why is this true, but yet the media
> says otherwise? The media knows very well how to manipulate us (see limbic,
> emotion, $$). -- WTW
>
I suggest you studying these books:
http://homepage.mac.com/s_lott/books/index.html
I learnt a great deal of information from the Python for Programmers title.
Besides you can take a look at Fernando's starter page at
http://fperez.org/py4science/starter_kit.html You can find many valuable
general Python sources listed there (especially tutorial videos from
PyCon09)
I can also suggest you trying Eclipse + PyDev combination. PyDev makes
debugging and following the flow of your programs very easier. For instance;
Try:
import matplotlib.pypot as plt
plt.plot(range(10))
plt.show()
and set a breakpoint in the first line and step into the matplotlib code to
see how it flows.
-- 
Gökhan
Hi! Originally, this was to be a question about where to get that described in the subject, but I realized: "hey, it's a yahoo! service and I haven't searched yahoo! yet"; sure enough I easily found:
http://www.gummy-stuff.org/Yahoo-data.htm
Jackpot! All the free, detailed numerical stock data one could ever need (of course, I don't know about its QA/QC, but hey, it's free!)
FWIW to others,
DG
PS: Short of canceling my subscription via this address and resubscribing my other one, is there another way to change my subscription address? Thanks!
 
From: Eric F. <ef...@ha...> - 2010年02月12日 18:49:40
Philipp Lies wrote:
> Hi,
> 
> is there a backend that supports 16bit tiff images?
Can you just use png, and use the netpbm utilities or ImageMagick 
convert program to go to and from tiff?
Eric
> According to the website GDK supports tiff but that's wrong:
> 
> >>>import matplotlib
> >>>matplotlib.use('GDK')
> >>>import matplotlib.pyplot as pyplot
> >>>pyplot.imsave(arr=X, fname='test.tif')
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/lib/pymodules/python2.6/matplotlib/pyplot.py", line 1425, in 
> imsave
> return _imsave(*args, **kwargs)
> File "/usr/lib/pymodules/python2.6/matplotlib/image.py", line 813, in imsave
> fig.savefig(fname, dpi=1, format=format)
> File "/usr/lib/pymodules/python2.6/matplotlib/figure.py", line 1033, in 
> savefig
> self.canvas.print_figure(*args, **kwargs)
> File "/usr/lib/pymodules/python2.6/matplotlib/backend_bases.py", line 
> 1420, in print_figure
> '%s.' % (format, ', '.join(formats)))
> ValueError: Format "tif" is not supported.
> Supported formats: emf, eps, pdf, png, ps, raw, rgba, svg, svgz.
> >>>matplotlib.backends.backend
> 'gdk'
> 
> matplotlib 0.99.0 python 2.6.4 ubuntu karmic x64
> 
> If matplotlib cannot provide tiff support, does someone know an 
> alternative? PIL doesn't work either, at least not intuitively.
> 
> Cheers
> 
> Philipp
> 
From: Tomasz K. <t.k...@ci...> - 2010年02月12日 18:48:34
Hi
I would like to have a bar plot twice as heigh as it is wide. It seems 
though that setting the aspect ratio is nontrivial. I tried this:
 w, h = fig.figaspect (2.0)
 plt.figure().set_figheight (h)
 plt.figure().set_figwidth (w)
but then axis labels or even numbering gets cut off. On the other hand 
playing with:
plt.axes().set_aspect (2.0)
does amazingly strange things. The explanation about what the number 
in the set_aspect function should be is quite vogue in the 
documentation. Hence my questions:
How to specify the aspect ratio of a figure (in my case containing 
some bar plots) so that all remaining things (like axis labels) are 
respected in the final result?
Regards
Tomek
From: Jeremy C. <jlc...@gm...> - 2010年02月12日 18:38:45
On Fri, Feb 12, 2010 at 11:30 AM, C M <cmp...@gm...> wrote:
>> My biggest problem with matplotlib is that the smallest yticklabel and
>> the smallest xticklabel always seem to lie on top of each other (or
>> close to it). See attachment for example. Is there anyway to make it
>> so these don't lie on top of each other? How can I make this the
>> default behavior?
>>
>> Thanks,
>> Jeremy
>
> This was just asked a day or two ago, and here's how that went:
>
> http://old.nabble.com/x%2Cy-ticklabel-too-close-to27551389.html
Oops I didn't notice the other message. Sorry for asking again.
From: C M <cmp...@gm...> - 2010年02月12日 18:31:08
> My biggest problem with matplotlib is that the smallest yticklabel and
> the smallest xticklabel always seem to lie on top of each other (or
> close to it). See attachment for example. Is there anyway to make it
> so these don't lie on top of each other? How can I make this the
> default behavior?
>
> Thanks,
> Jeremy
This was just asked a day or two ago, and here's how that went:
http://old.nabble.com/x%2Cy-ticklabel-too-close-to27551389.html
I guess you could also change the LABELPAD value to bring the labels a
bit off the axes, so they can't collide, like:
axis.xaxis.LABELPAD = 8 #or however much you want
I don't know how you could make this default behavior, but making
matplotlib such that this was hard to do--instead of the
default--might be a useful improvement.
Che
From: Jeremy C. <jlc...@gm...> - 2010年02月12日 18:18:09
Attachments: Burunp.pdf
My biggest problem with matplotlib is that the smallest yticklabel and
the smallest xticklabel always seem to lie on top of each other (or
close to it). See attachment for example. Is there anyway to make it
so these don't lie on top of each other? How can I make this the
default behavior?
Thanks,
Jeremy
From: Christopher B. <Chr...@no...> - 2010年02月12日 17:31:24
Wayne Watson wrote:
> So here's my list of thing to do when I come back to it.
good plan, one comment:
> Determine if a better interpreter tool than IDLE would satisfy the end 
> users of the program I'm modifying. The hurdle is non-Python users who 
> just fire up IDLE and execute the program via F5.
This one is a no brainer -- IDLE is an Integrated Development 
Environment -- if you are not developing, you don't need it, t is NOT a 
tool to run simply run a python program. It's really not hard to run a 
python program.
Note that py2exe and friends might be the best solution -- these are 
tools that build a self-contained executable from a python program, so 
you end up with something to double click on, just like any other program.
I don't know about TkInter, but wxPython has an option where it will put 
up a message window to show the user standard output -- it sounds like 
you want the user to see messages, etc. Maybe TK has something similar.
Good luck,
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Wayne W. <sie...@sb...> - 2010年02月12日 17:17:48
I think I need a time out to consider my recent posts. This particular 
mod can wait while I get to other priority items into action again. So 
here's my list of thing to do when I come back to it.
Check out ipython more thoroughly.
Examine the backend concept
Read about the MPL interactive mode.
Look at the embedded app material in MPL.
Determine if a better interpreter tool than IDLE would satisfy the end 
users of the program I'm modifying. The hurdle is non-Python users who 
just fire up IDLE and execute the program via F5. That plus many are 
even reluctant to move from 2.4 to 2.5. New features could move that along.
Read the parts of the MPL Guide that I've culled out for my interests..
Attend a PUG meeting in the San Francisco Bay Area on the 25th.
Buy the (new) MPL book on Amazon if my local library can't get a loan of 
one of the two libraries in the US that has it.
Watch relevant videos from the 8th Annual Python in Science Conference
That should be enough, and should keep me busy when I expect to return 
to this in a few weeks. Thanks to the participants who responded to my 
posts.
-- 
"Crime is way down. War is declining. And that's far from the good 
news." -- Steven Pinker (and other sources) Why is this true, but yet 
the media says otherwise? The media knows very well how to manipulate us 
(see limbic, emotion, $$). -- WTW
From: Wayne W. <sie...@sb...> - 2010年02月12日 16:43:48
I'm beginning to read aboutPython OOP, classes, inheritance and the 
like. It seems like an understanding of those concepts is key to 
understanding how the import needs are met.
-- 
"Crime is way down. War is declining. And that's far from the good 
news." -- Steven Pinker (and other sources) Why is this true, but yet 
the media says otherwise? The media knows very well how to manipulate us 
(see limbic, emotion, $$). -- WTW
From: Yagua R. <yag...@gm...> - 2010年02月12日 16:04:40
Hello world!
I am displaying on my screen a set of data corresponding to points
defined by a longitude and latitude.
The display is fine with the command imshow (mydata ,...)
I would like now associate to the application a callback that draw a rectangle
on two consecutive left mouse's button press defined by its two
opposite vertices.
(also returns points) and a right click button that erases the rectangle.
I found the event_handling example, but I do not know how to do this.
May someone helps me?
Thank's a lot in advance.
Yagua
From: Filipe P. A. F. <oc...@gm...> - 2010年02月12日 15:15:36
Thanks for all the suggestions,
Spines did the trick.
JJ, I would like to be able to contribute more, but my python knowledge is
very limited and I'm still a very Matlab oriented person.
Anyways, maybe people here might be interested in my recent adventure
trying to learn python. I converted the CSIRO seawater library from matlab
to python.
http://www.cmar.csiro.au/datacentre/ext_docs/seawater.htm
I know that this is specific for oceanographers, but I saw some of us in
this list.
Thanks again, this list helped my a lot.
On Thu, Feb 11, 2010 at 12:40 PM, Filipe Pires Alvarenga Fernandes <
oc...@gm...> wrote:
> Hello list,
>
> For the following plotI using a large font for the tick-label that causes
> the first x,y tick-labels to overlap
>
> http://yfrog.com/5zimageykp
>
> for now I'm padding spaces to "fix" the plot, like this:
>
> newtick = ["-10 ", "-5 ", "0 ", "5 ", "10 "]
> pos =[-10, -5, 0, 5, 10]
> yticks(pos, newtick)
>
> However I was wondering if there is any automatic way to avoid or fix this
> overlap.
>
> Thanks, Filipe
>
37 messages has been excluded from this view by a project administrator.

Showing results of 620

<< < 1 .. 13 14 15 16 17 .. 25 > >> (Page 15 of 25)
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 によって変換されたページ (->オリジナル) /