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

Showing results of 36569

<< < 1 .. 1457 1458 1459 1460 1461 .. 1463 > >> (Page 1459 of 1463)
From: Gary R. <ga...@em...> - 2003年11月16日 02:52:52
My thoughts on navigation:
How about a button that toggles between 1x, 2x, 4x which affects the scaling factor of all zoom and pan buttons?
I think a combination of this, a 'fit to full data' button and a rectangle zoom tool would be most intuitive to me.
I think the zoom in and out should default to affecting both axes equally and have zooming axes indepedently as a special case.
If you implement a zoom rectangle, there should be a way of locking its width-height ratio to be the same as the current display, perhaps by holding CTRL down.
I think it's important to always have an easy way of zooming out to show the full plot, so if you implement your saved view idea and don't want to add a 'fit to full data' button, I think having a 'fit to full data' checkpoint automatically added is important. It might be even be worth looking into cacheing the full view to speed its rendering. That way, you could quickly navigate by zooming to full and then using a rectangle zoom to your area of interest.
Gary
-- 
__________________________________________________________
Sign-up for your own personalized E-mail at Mail.com
http://www.mail.com/?sr=signup
Search Smarter - get the new eXact Search Bar for free!
http://www.exactsearchbar.com/
From: John H. <jdh...@ac...> - 2003年11月14日 12:59:14
>>>>> "Steve" == Steve Chaplin <ste...@ya...> writes:
 Steve> What is the "Redraw the figure" Navigation toolbar button
 Steve> used for? When I press it nothing (visible) happens. I
 Steve> guess it may be for redrawing the figure (as it says!), but
 Steve> thats not needed since (in GTK+) you setup an expose event
 Steve> which redraws the window automatically when required.
In earlier versions of matplotlib, the screen could get in an
inconsistent state following a pan or zoom (some residual effects of
ticklabels not properly erased, etc...). That has all been cured,
thankfully, and the redraw tool is a vestigial organ. Slated for
destruction.
 Steve> It would be nice to have a button to redraw the figure AND
 Steve> undo any zooming and panning you may have done. Which
 Steve> commands would I need to call to do that?
I've been planning on making some changes to the toolbar. How would
you feel about a 'save excursion / restore excursion'? As you
navigate through, you could click 'save excursion' and continue
navigating. At any point, when you click restore excursion it would
return you to the save point, or the original view if none clicked,
Ideally, you could click save excursion multiple times, and repeated
restores would step you back trough those points, to the beginning.
This is easy to implement.
Alternatively, there could be three buttons: back view, mark view, and
forward view, and as you navigate you could mark as many views as you
want, and then use forward and back to go between them. Eg, for the
stock_demo, where I have 60 days of stock prices for IBM and Apple,
you could mark several days or hours in that whole 60 days, and then
use the forward and back tools to switch between them. If nothing is
marked, back would simply revert you to the original view. I think
this latter scheme sounds more useful, but potentially adds too many
buttons.
Other tools I've been considering
 -- add a key modifier to the pan tool so CTRL pans an entire view.
 Again, suppose for the stock demo you had 1 day in the view, with
 ticks every hour. Use pan right to pan hour by hour and
 CTRL-right to pan day by day
 -- add a key modifier so a zoom affects both axes, eg, SHIFT-zoom
 zooms both x and y
-- add a rectangle zoom tool, so you can select a rectangular region
 with your mouse and set that to be the x and y view limits.
The primary application I use matplotlib in is an EEG viewer, so I
have a lot of navigation requirements.
If anyone has any special navigation requests, weigh in, because I'll
probably try and get some or all of these features before the next
major (0.4x) release early next month.
JDH
From: Steve C. <ste...@ya...> - 2003年11月14日 08:56:54
What is the "Redraw the figure" Navigation toolbar button used for?
When I press it nothing (visible) happens.
I guess it may be for redrawing the figure (as it says!), but thats not needed 
since (in GTK+) you setup an expose event which redraws the window automatically
when required.
It would be nice to have a button to redraw the figure AND undo any zooming 
and panning you may have done. Which commands would I need to call to do that?
Steve
From: Steve C. <ste...@ya...> - 2003年11月12日 15:43:21
On Mon, 2003年11月10日 at 23:09, John Hunter wrote:
> >>>>> "Steve" == Steve Chaplin <ste...@ya...> writes:
> 
> Steve> I've been receiving the error message "matplotlib requires
> Steve> pygtk-1.99.16 or greater -- trying anyway. Please hold on"
> Steve> which is puzzling since I have pygtk 2.0 installed.
> 
> Is it possible you have both installed (eg, on a redhat 9 install the
> default pygtk is 1.99.14) and that you are importing the wrong one
> 
> Steve> error message that pygtk.require('2.0') generates. I think
> Steve> it would be improved by changing it to:
> 
> Good point. I changed it.
> 
> 
> Steve> "pygtk.require() must be called before importing gtk
> Steve> matplotlib requires pygtk-1.99.16 or greater -- trying
> Steve> anyway. Please hold on"
> 
> 
> This looks like you imported gtk in your app/script before either
> 
> 1) doing the pygtk.require thing
> 2) importing matplotlib first
> 
> If you do either of these, does everything work fine for you?
I don't use pygtk.require() myself, since I'm just writing small
programs to run on my own system which has python 2.3.2 and pygtk 2.0
installed together.
The problem was in the import order
I was doing:
import gtk
import mylibrary # which imports matplotlib
and was getting the warning message. Changing to
import mylibrary
import gtk
stops the warning appearing.
Steve
> 
> JDH
-- 
Steve Chaplin <ste...@ya...>
From: John H. <jdh...@ac...> - 2003年11月12日 14:42:07
What's new in matplotlib 0.32
 wx python backend -- development version 
 Jeremy O'Donoghue has done an amazing job implementing the backend
 for wxpython. The code is still alpha and several of the features
 that will be available are under active development. See the code
 matplotlib/backends/backend_wx.py for a report on existing features
 and known bugs. If you have wxpython installed, you can take it for
 a test drive with 'python yourscript.py -dWX' and please report any
 bugs not listed in the KNOWN BUGS section of the wx src to the
 matplotlib-devel mailing list.
Pseudo color plots
 The pcolor command generates pseudo color plots. See
 http://matplotlib.sourceforge.net/screenshots.html#pcolor_demo and
 http://matplotlib.sourceforge.net/screenshots.html#mri_with_eeg for
 screenshots and some example code
Numerous small bugfixes
 Fixed reversed zoom tools, bug in ticklabel setting, bug in AFM font
 path setting for PS backend, fixed a label position bug. Thanks for
 the bug reports!
John Hunter
From: Charles <ct...@cs...> - 2003年11月12日 06:58:49
Hi John,
The patch worked for me. :-)
JH: def is_last_row(self):
Nice, but maybe not enough. If the plots don't fill the bottom row, (say 7
plots on a 3x3 grid), it'll leave some columns with no xticklabels. We'd
need something like
	is_bottom()
But that would require knowing how many subplots there are, which subplot
doesn't do, and probably shouldn't.
-C
-- 
Charles R. Twardy www.csse.monash.edu.au/~ctwardy
Monash University sarbayes.org
Computer Sci. & Software Eng.
+61(3) 9905 5823 (w) 5146 (fax)
From: John H. <jdh...@ac...> - 2003年11月12日 04:51:12
>>>>> "Charles" == Charles <ct...@cs...> writes:
 Charles> Hi John, I added one line that shows the problem. If you
 Charles> do a set_xticks() first, then the usual ([]) doesn't
 Charles> blank them. Here's code that should suppress the xticks
 Charles> for all but the bottom-most graphs in each column. It
 Charles> works if you comment out the set_xticks line (HERE HERE
 Charles> HERE).
Hi Charles,
As an aside, you'll be interested in these super secret undocumented
methods of the Subplot class, which I implemented so I wouldn't have
to do the if i % COLS == 1 tricks that I came to know and love in
matlab. I too find myself making lots-o-subplots and blanking out the
labels
Subplot methods:
 def is_first_col(self):
 def is_first_row(self):
 def is_last_row(self):
 def is_last_col(self):
which enables you to write your loop
for i in range(1,NUMPLOTS+1):
 ax = subplot (ROWS, COLS, i)
 ax.set_xticks((0,1,2)) 
 title('Simple ' + str(i))
 
 if ax.is_first_col(): ax.set_ylabel('voltage (mV)')
 else: ax.set_yticklabels ([])
 if ax.is_last_row(): ax.set_xlabel('time (s)')
 else: ax.set_xticklabels ([])
Now onto your problem. Thanks for the example script. I am not sure
which version of matplotlib you are working with, but it appears there
is a clear bug in Axis.set_ticklabels in the part which reads
 for s, label in zip(self._ticklabelStrings, self._ticklabels):
 label.set_text(s)
 label.update_properties(override)
when len(self._ticklabelStrings) is less than len(self._ticklabels),
the label text doesn't get updated. Duh!
Something like this should work better. At least with
matplotlib-0.32a it handles your example
 def set_ticklabels(self, ticklabels, *args, **kwargs):
 """
 Set the text values of the tick labels. ticklabels is a
 sequence of strings. Return a list of AxisText instances
 """
 ticklabels = ['%s'%l for l in ticklabels]
 
 self._ticklabelStrings = ticklabels
 override = {}
 override = backends._process_text_args(override, *args, **kwargs)
 Nnew = len(self._ticklabelStrings)
 existingLabels = self.get_ticklabels()
 for i, label in enumerate(existingLabels):
 if i<Nnew: label.set_text(self._ticklabelStrings[i])
 else: label.set_text('')
 label.update_properties(override)
 return existingLabels
 Charles> Is this comment better for -users or -devel? Or bug
 Charles> tracking?
I think users, since my answer includes a *possible* fix which others
may find useful. Let me know how this works for you; I'll take a
closer look on Thurs when I have some breathing room again.
JDH
From: Charles <ct...@cs...> - 2003年11月12日 01:45:42
Hi John,
I added one line that shows the problem. If you do a set_xticks() first,
then the usual ([]) doesn't blank them. Here's code that should suppress
the xticks for all but the bottom-most graphs in each column. It works if
you comment out the set_xticks line (HERE HERE HERE).
Is this comment better for -users or -devel? Or bug tracking?
	-Charles
# -*- Mode: Python; py-indent-offset: 4 -*-
# Simple example to demonstrate ticklabel problem
# If you don't set_ticks first, the following works fine.
# If you do set_ticks, then ([]) doesn't blank the ticklabels.
# --crt
from matplotlib.matlab import *
NUMPLOTS = 8
COLS = 3
ROWS = NUMPLOTS / COLS
if NUMPLOTS % COLS: ROWS += 1
t = arange(0.0, 2.0, 0.01)
s = sin(2*pi*t)
for i in range(1,NUMPLOTS+1):
 ax = subplot (ROWS, COLS, i)
 plot(t, s)
for i in range(1,NUMPLOTS+1):
 ax = subplot (ROWS, COLS, i)
 ax.set_xticks((0,1,2)) # HERE HERE HERE
 title('Simple ' + str(i))
 if i % COLS == 1: # left edge
 ax.set_ylabel('voltage (mV)')
 else:
 ax.set_yticklabels ([])
 if i > NUMPLOTS - COLS: # nothing below them
 ax.set_xlabel('time (s)')
 else:
 ax.set_xticklabels ([])
savefig('simple_plot')
show()
-- 
Charles R. Twardy www.csse.monash.edu.au/~ctwardy
Monash University sarbayes.org
Computer Sci. & Software Eng.
+61(3) 9905 5823 (w) 5146 (fax)
From: John H. <jdh...@ac...> - 2003年11月11日 22:30:55
I just checked in to CVS a substantial refactoring of the matplotlib
axes classed, with some smaller changes to artist.Artists and their
descendants. This won't result in any changes to the
matplotlib.matlab interface, and only minor changes to the API for
embedding matplotlib in applications (eg, a one line change to the
embedding_gtk.py example).
But it will make it easier to support, develop and maintain the
library internally. For example, the legend command works better now,
producing a better layout, and the tick and label placement works
better.
Pretty much everything is working with known examples *except*
 1) log scaling
 2) GD backend
and these two will come along in a day or two.
So please exercise caution before checking out CVS; if you do check it
out, let me know about any bugs you find (it usually takes a while for
the mirrors to sync)
Thanks!
John Hunter 
From: John H. <jdh...@ac...> - 2003年11月10日 15:13:20
>>>>> "Steve" == Steve Chaplin <ste...@ya...> writes:
 Steve> I've been receiving the error message "matplotlib requires
 Steve> pygtk-1.99.16 or greater -- trying anyway. Please hold on"
 Steve> which is puzzling since I have pygtk 2.0 installed.
Is it possible you have both installed (eg, on a redhat 9 install the
default pygtk is 1.99.14) and that you are importing the wrong one
 Steve> error message that pygtk.require('2.0') generates. I think
 Steve> it would be improved by changing it to:
Good point. I changed it.
 Steve> "pygtk.require() must be called before importing gtk
 Steve> matplotlib requires pygtk-1.99.16 or greater -- trying
 Steve> anyway. Please hold on"
This looks like you imported gtk in your app/script before either
 1) doing the pygtk.require thing
 2) importing matplotlib first
If you do either of these, does everything work fine for you?
JDH
From: Charles <ct...@cs...> - 2003年11月10日 10:20:49
Hmm. Current I seem to have to blank y and x axes separately.
ax.set_yticklabels([]) # works fine
ax.set_xticklabels([]) # nope
# but...
ax.set_xticklabels([ '' for x in blah ]) # yep
Given that both call ticklabels, I'm not sure why.
-C
-- 
Charles R. Twardy www.csse.monash.edu.au/~ctwardy
Monash University sarbayes.org
Computer Sci. & Software Eng.
+61(3) 9905 5823 (w) 5146 (fax)
From: Charles <ct...@cs...> - 2003年11月10日 04:10:46
John,
Either sourceforge is behind or the change didn't fix the xticklabels([]).
If you're around, can you email the file with the fix? In the meantime
I'll try to make sure I'm not using a mirror.
-C
-- 
Charles R. Twardy www.csse.monash.edu.au/~ctwardy
Monash University sarbayes.org
Computer Sci. & Software Eng.
+61(3) 9905 5823 (w) 5146 (fax)
From: Steve C. <ste...@ya...> - 2003年11月10日 04:01:03
I've been receiving the error message
"matplotlib requires pygtk-1.99.16 or greater -- trying anyway. Please
hold on"
which is puzzling since I have pygtk 2.0 installed.
The message is triggered from this code in backend_gtk.py:
try: # todo: test this with default RHL8 install.
 import pygtk
 pygtk.require('2.0')
except:
 print >>sys.stderr, 'matplotlib requires pygtk-1.99.16 or greater --
trying anyway. Please hold on'
The exception catches the error, but does not show you the error message
that pygtk.require('2.0') generates. I think it would be improved by
changing it to:
try: # todo: test this with default RHL8 install.
 import pygtk
 pygtk.require('2.0')
except:
 print sys.exc_info()[1]
 print >>sys.stderr, 'matplotlib requires pygtk-1.99.16 or greater --
trying anyway. Please hold on'
Which in my case, would then tell me:
"pygtk.require() must be called before importing gtk
matplotlib requires pygtk-1.99.16 or greater -- trying anyway. Please
hold on"
Which lets me know what I've done wrong.
Steve
-- 
Steve Chaplin <ste...@ya...>
From: Charles <ct...@cs...> - 2003年11月09日 19:27:39
Interesting. My experience is that pdflatex generates crisp and compact
pdf, though I usually use xpdf to view. I hadn't had similar luck with
ps2pdf but the -?mz may help.
	-C
JH: > dvips -Pcmz -Pamz -G1 -Ppdf -o final3.ps final3.dvi
JH: > ps2pdf final3.ps
JH:This will generate high quality PDF w/o the blurry appearance in
JH:acroread that you sometimes see with PDF generated by LaTeX.
From: John H. <jdh...@ac...> - 2003年11月09日 12:52:49
>>>>> "Charles" == Charles <ct...@cs...> writes:
 Charles> John, I'd second the request for direct EPS. Sometimes
 Charles> you can get away without the bounding box, but not
 Charles> always. I've been using ps2epsi to convert my matplot .ps
 Charles> files into .eps files (.epsi is .eps with a preview, but
 Charles> I don't need the preview). It does a good job of finding
 Charles> bounding boxes. That's very important for running
 Charles> epstopdf on the images. That gives me pdf images so I can
 Charles> run pdflatex and generate a native PDF file from my
 Charles> LaTeX.
I'll see if I can get EPS into the ps backend in the near future. As
far as I know, it should just be a matter of adding a bounding box.
Note that you don't need to first convert your images to PDF to
generate PDF from LaTeX (though a PDF backend is on the TODO list). I
routinely generate PDF documents from LaTeX src with *.ps inputs as
follows
 # With recent version of gv (7.x or later) do
 > dvips -Pcmz -Pamz -G1 -Ppdf -o final3.ps final3.dvi
 > ps2pdf final3.ps
This will generate high quality PDF w/o the blurry appearance in
acroread that you sometimes see with PDF generated by LaTeX.
Hope this helps!
John Hunter
From: Charles <ct...@cs...> - 2003年11月09日 04:03:36
John,
I'd second the request for direct EPS. Sometimes you can get away without
the bounding box, but not always. I've been using ps2epsi to convert my
matplot .ps files into .eps files (.epsi is .eps with a preview, but I
don't need the preview). It does a good job of finding bounding boxes.
That's very important for running epstopdf on the images. That gives me
pdf images so I can run pdflatex and generate a native PDF file from my
LaTeX.
-C
-- 
Charles R. Twardy www.csse.monash.edu.au/~ctwardy
Monash University sarbayes.org
Computer Sci. & Software Eng.
+61(3) 9905 5823 (w) 5146 (fax)
From: John H. <jdh...@ac...> - 2003年11月08日 14:10:50
>>>>> "Steve" == Steve Chaplin <ste...@ya...> writes:
 [ Standard response: please post questions to the mailing list
 when possible since others can benefit from the discussion, and
 provide help
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users 
 ]
 Steve> I've been having a look at Matplotlib recently and have
 Steve> found it quite useful.
 Steve> I noticed that in backend_gtk.py the function pany() does
 Steve> not have 'return gtk.TRUE', whereas panx() does.
Hi Steve, 
Thanks for pointing out the inconsistency. I just updated the code.
Also, the zoom in/out tools are reversed in the last release of
matplotib. This is fixed in CVS.
 Steve> I understand that Numercial Python will be superseded by
 Steve> Numarray, is there a plan to allow Numarray to be used with
 Steve> Matplotlib? Is it a straightforward substitution,
 Steve> something like 'from numarray import *' instead of 'from
 Steve> Numeric import *'? Using Numarray from Matplotlib would be
 Steve> useful for me because instead of learning Numerical Python
 Steve> now and later learning Numarray I would only need to learn
 Steve> Numarray.
Before you commit to just using numarray, note that the home page
warns it is an order of magnitude slower than numeric for smallish
arrays.
I will certainly support Numarray when it becomes official and
performance competitive with Numeric, if not before. I haven't used
it yet, so don't know what will be involved. But if I recall
correctly believe there will not be many API changes from the python
user end, so I don't think it will be difficult. Perhaps someone has
experience with numarray and can chime in here.
If you want to be the crash test dummy and replace the 'from Numeric'
with 'from numarray' and let me know what happens, please do. 
I use matplotlib with large data arrays of EEG data (100s MB and need
to use larger), where only a small portion is on the screen at one
time. That is why I have worked hard to make Numeric clipping
efficient in the line class. But it still gets slow and I would like
to allow matplotlib to support memory mapped files. I believe there
will be better support for this in numarray. Also, I look forward to
the better indexing capabilities of numarray, which is one area where
matlab is superior.
 Eg
 matlab> ind = find(t>2);
 matlab> s(ind) = 5;
Cheers, 
John Hunter
From: John H. <jdh...@ac...> - 2003年11月08日 13:41:47
>>>>> "LUK" == LUK ShunTim <shu...@po...> writes:
 LUK> Yes, but I think LaTeX requires the bounding box information.
Here is how I use PS (not eps) directly in LaTeX. The first arg to
difig specifies the figure size.
\usepackage[dvips]{graphics}
\newcommand{\dofig}[2]
{\center{\scalebox{#1}{\includegraphics*{#2}}}} 
\begin{figure}[t]
 \dofig{0.5}{somefile.ps}
 \caption{\footnotesize Insert your figure caption here} 
 \label{fig:figref}
\end{figure}
 LUK> I can think of the quick and dirty way of calling the ps2eps
 LUK> script to do the conversion but it requires perl and
 LUK> ghostscript. Since the postscript backend is already there in
 LUK> matplotlib, it'd be nice to have the eps option directly.
Agreed.
JDH
From: LUK S. <shu...@po...> - 2003年11月08日 05:46:00
John Hunter wrote:
 >>>>>>"LUK" == LUK ShunTim <shu...@po...> writes:
 >
 >
 > LUK> You deserve much thanks for developing such a nice package.
 >
 > Thanks!
 >
 > LUK> An afterthought: perhaps an EPS backend instead of/additional
 > LUK> to a PS backend would be more convenient for inclusion into
 > LUK> publications. I know very little about postscript programming
 > LUK> so I don't know what's the effort involved, though.
 >
 > Not much at all. As far as I know, the only difference between eps
 > and ps is a bounding box at the top of the document which gives the
 > figure dimensions. It shouldn't be hard to check for an extension in
 > the savefig command and add the bounding box if eps is requested.
 >
 > I use postscript (*.ps) directly in my LaTeX documents without
 > trouble, however. Are you using LaTeX?
 >
Yes, but I think LaTeX requires the bounding box information.
I can think of the quick and dirty way of calling the ps2eps script to
do the conversion but it requires perl and ghostscript. Since the
postscript backend is already there in matplotlib, it'd be nice to have
the eps option directly.
Regards,
ST
--
From: John H. <jdh...@ac...> - 2003年11月07日 15:38:00
>>>>> "Jonas" == Jonas August <jo...@cs...> writes:
Hi Jonas,
Thanks for the email. In the future would you mind posting questions
to the mailing list
http://lists.sourceforge.net/mailman/listinfo/matplotlib-users so
others can benefit from / contribute to the discussion?
 Jonas> Hi There, I was just trying out your matplotlib .31 on
 Jonas> gentoo-1.4 (gnu/linux) with pygtk 1.99.16 and python 2.2.3.
 Jonas> First, thanks for putting this impressive package together;
 Jonas> plotting is a barrier to entry for python, and the adoption
 Jonas> of the matlab syntax is clean.
 Jonas> Onto my issue: I noticed that the x label in a plot I
 Jonas> created from your tutorial gets clipped below both in the
 Jonas> window and in the png file created by the save button.
Hmm. From you screenshot you sent, I assume you are using this
example
 from matplotlib.matlab import *
 font = {'fontname' : 'Courier',
 'color' : 'r',
 'fontweight' : 'bold',
 'fontsize' : 11}
 plot([1,2,3])
 title('A title', font, fontsize=12)
 text(0.5, 2.5, 'a line', font, color='k')
 xlabel('time (s)', font)
 ylabel('voltage (mV)', font)
 show()
When I plot this example with matplotlib 0.31, I do not get the
clipping you showed in the screenshots you sent. However, from your
screenshot, it looks like you have increased the default fontsize to
larger than 11. Are you using a larger size? If I make the fontsize
much larger, say 20, I can reproduce the xlabel clipping you showed.
I don't know if this is a bug or a feature :-). Since you can make
the text arbitrarily large, at some point it will extend beyond the
boundaries of a figure of a given size. How do you think it should
behave? Resize the axes/figure? Warn the user? I'll have to think
about it.
That said, there is a parameter you can tweak to fix this problem if
you want larger fonts. In matplotlib/backends/backend_gtk.py on line
761, you can increase the screenDPI parameter, say to 150, which will
enable larger fonts relative to your plots. I am still not decided on
how the defaultDPI should be set in a device independent way, since
the actual DPI is display dependent. I'm considering setting up a
config file so users can customize things like their default fonts,
DPIs, figsizes, backend, etc....
John Hunter
From: John H. <jdh...@ac...> - 2003年11月07日 13:45:29
>>>>> "Charles" == Charles <ct...@cs...> writes:
 Charles> Hi folks, I used to be able to suppress axis labels with
 Charles> ax.set_yticklabels([])
This was a bug that crept into the release with changes in ticklabel
handling with log plots. I just fixed it and committed it to CVS.
Sorry for the trouble,
JDH
From: John H. <jdh...@ac...> - 2003年11月07日 13:25:39
>>>>> "LUK" == LUK ShunTim <shu...@po...> writes:
 LUK> You deserve much thanks for developing such a nice package.
Thanks!
 LUK> An afterthought: perhaps an EPS backend instead of/additional
 LUK> to a PS backend would be more convenient for inclusion into
 LUK> publications. I know very little about postscript programming
 LUK> so I don't know what's the effort involved, though.
Not much at all. As far as I know, the only difference between eps
and ps is a bounding box at the top of the document which gives the
figure dimensions. It shouldn't be hard to check for an extension in
the savefig command and add the bounding box if eps is requested. 
I use postscript (*.ps) directly in my LaTeX documents without
trouble, however. Are you using LaTeX?
JDH
From: LUK S. <shu...@po...> - 2003年11月07日 07:50:29
John Hunter wrote:
>>>>>>"LUK" == LUK ShunTim <shu...@po...> writes:
> 
> 
> H:00円work00円cvs\matplotlib\matplotlib\examples>python subplot_demo.py -dPS
> ['E:\\Py23\\share\\matplotlib', 'E', '\\Py23e\\share\\matplotlib']
> 
> Oh, I see the bug. The reason the lines are there that you commented
> out is to allow you to specify multiple font dirs in your path, as in 
> 
Yes, the previous version caught the ":" in the drive letter specification.
> set AFMPATH = c:\somepath\fonts;e:\some\other\path\fonts
> 
> But I wasn't properly doing a platform independent path split.
> 
> The code should read
> 
> def _get_afm_filenames(self):
> paths = [os.path.join(distutils.sysconfig.PREFIX, 'share', 'matplotlib')]
> if os.environ.has_key('AFMPATH'):
> afmpath = os.environ['AFMPATH']
> paths.extend(afmpath.split(os.pathsep))
> 
> fnames = [fname for fname in get_recursive_filelist(paths) 
> if fname.lower().find('.afm')>0 and
> os.path.exists(fname)]
> 
> return fnames
> 
Yes, it works. I had thought of testing for "if OS == win" sort of stuff 
instead of testing for the presence of ";" or ":". But it appears that 
Python has the foresight to provide os.pathsep. I learnt a bit more and 
love Python a bit more. :-)
> 
> Thanks for helping me diagnose it. Please let me know if the above
> works on your system!
> 
> John Hunter
> 
You deserve much thanks for developing such a nice package.
An afterthought: perhaps an EPS backend instead of/additional to a PS 
backend would be more convenient for inclusion into publications. I 
know very little about postscript programming so I don't know what's the 
effort involved, though.
Best regards,
ST
--
From: Charles <ct...@cs...> - 2003年11月07日 04:50:53
Hi folks,
I used to be able to suppress axis labels with
	ax.set_yticklabels([])
However, now when I do that it puts in defaults on my bar graphs. Very
messy when I've stacked 8 of them on a figure. Anyone know the new way to
suppress this, or where I should be looking in the code?
-C
-- 
Charles R. Twardy www.csse.monash.edu.au/~ctwardy
Monash University sarbayes.org
Computer Sci. & Software Eng.
+61(3) 9905 5823 (w) 5146 (fax)
From: John H. <jdh...@ac...> - 2003年11月06日 18:08:58
>>>>> "LUK" == LUK ShunTim <shu...@po...> writes:
 H:00円work00円cvs\matplotlib\matplotlib\examples>python subplot_demo.py -dPS
 ['E:\\Py23\\share\\matplotlib', 'E', '\\Py23e\\share\\matplotlib']
Oh, I see the bug. The reason the lines are there that you commented
out is to allow you to specify multiple font dirs in your path, as in 
 set AFMPATH = c:\somepath\fonts;e:\some\other\path\fonts
But I wasn't properly doing a platform independent path split.
The code should read
 def _get_afm_filenames(self):
 paths = [os.path.join(distutils.sysconfig.PREFIX, 'share', 'matplotlib')]
 if os.environ.has_key('AFMPATH'):
 afmpath = os.environ['AFMPATH']
 paths.extend(afmpath.split(os.pathsep))
 fnames = [fname for fname in get_recursive_filelist(paths) 
 if fname.lower().find('.afm')>0 and
 os.path.exists(fname)]
 return fnames
Thanks for helping me diagnose it. Please let me know if the above
works on your system!
John Hunter
657 messages has been excluded from this view by a project administrator.

Showing results of 36569

<< < 1 .. 1457 1458 1459 1460 1461 .. 1463 > >> (Page 1459 of 1463)
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 によって変換されたページ (->オリジナル) /