On Mon, 24 Oct 2011, Rich Shepard wrote:
so no more tracebacks?
I'll try again tomorrow morning before I head to the dentist.
I didn't try then, but just did now. Still the same error:
Found an unknown keyword in AFM header (was Underline)
Traceback (most recent call last):
File
On Tue, 25 Oct 2011, Paul Ivanov wrote:
Well, I hope the dentist trip was more of a success :) Don't worry
about it - it's become kind of a fun challenge now.
Paul,
Yes, it was a nice, long, relaxing visit. I go to the dental school at the
health sciences university; costs ~ 1/3rd less
On Tue, 25 Oct 2011, Paul Ivanov wrote:
I see you sent this just a few minutes ago - let's try to figure this out
interactively via IRC on #matplotlib channel on freenode. If you don't
have an IRC client handy, you can just use this web-based one.
On Sun, 23 Oct 2011, Paul Ivanov wrote:
Change my request to add 'sys.stderr.write(fh.name)' before the 'while 1:'
in _parse_char_metrics - just so we don't have any buffering issues. The
last file you see printed there will be the one that's causing the issue.
You can then try removing it,
On Mon, 24 Oct 2011, Paul Ivanov wrote:
Would you like a copy of kidsn.afm?
sure. let's take a look.
StartFontMetrics 2.0
Comment Kids-Normal
Comment Copyright (c) 1992 Corel Corporation. All Rights Reserved.
Comment Creation Date: Mon Jun 15 12:00:00 1992
Comment UniqueID 5029202
Comment
On Mon, 24 Oct 2011, Paul Ivanov wrote:
so no more tracebacks?
Don't know. I'm processing accounts payable, beating up a client who's
late paying an invoice, trying to figure out which R package/function I
need, and more. It's been a rather crappy day, if you must know the truth.
:-)
On Fri, 21 Oct 2011, Paul Ivanov wrote:
Is there a particular reason you just upgraded to a version of matplotlib
that is almost 2 years old now? Matplotlib 1.1.0 was released a few weeks
ago,
Paul,
Yes, the reason was 0.99.1.2 was on the SlackBuilds.org site, so I didn't
check to see if
After a long hiatus I'm again working on an application and just upgraded
matplotlib from 0.98.5.2 to 0.99.1.2. However, there's an error on start up
that I need your help in resolving.
There are many dozens of lines containing:
Found an unknown keyword in AFM header (was Underline)
The
On Mon, 17 Oct 2011, Benjamin Root wrote:
In the afm.py file, a before line 167, can you print the value of the
line variable and tell us what it is?
Ben,
Here are lines 158-167:
while 1:
line = fh.readline()
if not line: break
line = line.rstrip()
On Mon, 17 Oct 2011, Benjamin Root wrote:
On line 166, I want you to put print 'Line:', line. Then, rerun your
program and report back what the output of that print statement.
Ben,
Sorry I mis-understood your request.
I redirected the output to a file 'error.log' and it contains
On Mon, 17 Oct 2011, Benjamin Root wrote:
I only need the last line printed by that print statement. I want to see
how the parsing failed.
Ben,
Here are the last 3:
Line: C 125 ; WX 273 ; N braceright ; B 55 -68 244 707 ;
Line: C 126 ; WX 586 ; N asciitilde ; B 39 219 531 408 ;
Line: C
I have three unresolved issues in the attached code, and I'd like to
resolve the first two on this thread. (The third issue relates to plotting
using only the left and bottom axes rather than a complete frame.)
Issue #1: I am apparently not properly closing/clearing a plot. There are
three
On Sat, 22 Mar 2008, Rich Shepard wrote:
Issue #1: I am apparently not properly closing/clearing a plot. There are
three plots in the test data set, and when the last one (with three curves
on a common set of axes) is the only one plotted, it is correctly done. But,
when it follows the 2
On Wed, 19 Mar 2008, Rich Shepard wrote:
When it runs in the test script the first curve is plotted in a
matplotlib window and the program pauses until I close that window by
clicking on the upper right button on the frame. Then this traceback is
displayed:
Update:
I stripped
I've read the users guide and API (both as pdf and on the web site), and
do not see how to configure the axes for only left and bottom, and the grid
for only horizontal lines.
The axes(rect, w) is used to specify the position of the left and bottom
lines plus the width and height of the
On Thu, 20 Mar 2008, Rich Shepard wrote:
Clue appreciated.
Bingo! Found the problem.
The plotting functions are in a separate module, and each was developed
interactively using ipython, then copied into the module. As a result, each
function retained the show() command at the end
Here is the relevant code fragment:
for i in range(1, compList[0][16]):
pylab.hold(True)
if compList[0][4] == 'Decay S-Curve':
testFunctions.zCurve(compList[0][10],compList[0][9])
elif compList[0][4] == 'Bell Curve':
On Tue, 18 Mar 2008, Rich Shepard wrote:
File termset-test-data.py, line 389, in testCode
pylab.hold()
Replacing the line above with pylab.hold(False) seems to put me in a
non-stop loop. I'll run the test code in winpdb, but still want suggestions
on how to get the output I need.
Rich
I upgraded my notebook to Slackware-12.0 (which includes python-2.5) and
discovered that the application I'm developing no longer ran. Turns out that
matplotlib went missing during the upgrade.
So, I just built matplotlib-0.91.2 using the same matplotlib.Slackbuild
script I used on my
On Fri, 1 Feb 2008, Stephen George wrote:
bit confused what your asking.
are you looking for the pylab API savefig
Stephen/Alan/Chloe:
Yes, it turns out that I am.
or you asking how to convert your variable+.png into a filename?
is your variable a number?, string?
The variable is a
On Fri, 1 Feb 2008, Eric Firing wrote:
What changed is that I added a warning where previously there was only a
silent error--the matplotlib.use command was being ignored. Sometimes
this (ignoring the command) is harmless, but it is never the user's intent
and in some cases it can cause
On Fri, 1 Feb 2008, Eric Firing wrote:
One way to find out where the warning is coming from is to invoke your script
as
python -Werror myscript.py
Eric,
That did the trick. Two modules needed to have the backend specification
commented out.
Many thanks,
Rich
--
Richard B. Shepard,
I want to save plots programmatically, using a variable + .png as the
filename. I don't see an example of the proper syntax, and my
trial-and-error approach hasn't yielded a solution, either.
If I want to write
pylab.save(curVar.png)
where 'curVar' is a variable assigned
I'm hoping that someone's already addressed the need I have so I don't
need to re-invent this wheel. But, if no one has a ready-made solution, I
still need some expert advice in how to build this wheel myself.
My python application uses the wxPython widget library, SQLite (using the
I've looked at all the docs I can find on the matplotlib web site without
finding the answers to two questions. Pointers to references are greatly
appreciated.
1) I want to plot a series of curves on the same set of axes. For
example, shoulder- and trapezoidal curves:
___
On Mon, 7 Jan 2008, Darren Dale wrote:
you can call hold(True) so each call to plot() adds a new curve to the axes.
Darren,
Excellent! Where is this documented, please? I did not see it when I
looked in the docs.
Agg does not produce jpg. Can you live with a png? png are not lossy and
so
On Mon, 7 Jan 2008, John Hunter wrote:
The function is document
http://matplotlib.sourceforge.net/matplotlib.pyplot.html#-hold and the
usage in the Simple Plots Section 3.1 of the User's Guide at
http://matplotlib.sourceforge.net/users_guide_0.91.2svn.pdf . The hold
functionality is part of
On Mon, 3 Dec 2007, Michael Droettboom wrote:
That may be beyond matplotlib's control. Matplotlib requests a solid
grey color, but the printing stack (Acrobat, the printer driver or the
printer itself) could be interpreting that in many ways. You could
experiment with various printer
On Mon, 26 Nov 2007, C M wrote:
Basically what I did (sorry if this is too basic, but I'm pretty new to
this and this may jog others to correct deficiencies in this simple
approach) was to:
This is all straightforward and clear. The one statement I've not yet
understood is this:
Two questions relating to the display of grid lines in a plot:
1) Can this be controlled programmatically rather than from within
~/.matplotlib/matplotlibrc?
2) Is there a way to display horizontal grid lines without vertical grid
lines?
Pointers to the docs where these questions
On Tue, 27 Nov 2007, Michael Droettboom wrote:
You can get the axes through the Figure instance. (I don't know how you have
your embedding set up, but if it's something like embedding_in_wx.py, there's
the line self.fig = Figure((9, 8), 75), so self.fig is a Figure instance).
Thanks,
On Tue, 27 Nov 2007, Eric Firing wrote:
Or just keep track of the axes object when it is created. In
embedding_in_wx.py:
def plot_data(self):
# Use ths line if using a toolbar
a = self.fig.add_subplot(111)
a is the axes instance.
Eric,
Thanks. I had not picked that
On Tue, 27 Nov 2007, Anthony Floyd wrote:
Check the class library documentation for the axes() object.
http://matplotlib.sourceforge.net/matplotlib.axes.html
Anthony,
I've looked at this but didn't absorb it all. Now I'll spend more time
with it.
Your best bet is really to explore the
On Mon, 26 Nov 2007, Christopher Barker wrote:
or better yet -- work with numpy arrays from the beginning:
Chris,
These values are retrieved from widgets on a notebook page and the plot
will be used to display them on that tab. It would take more code to
convert those values to a numpy
On Mon, 26 Nov 2007, Christopher Barker wrote:
I think wxMPL is a good option. I think MPlot gives you nifty tools for
editing the figure with a GUI, but I don't think you want that.
Chris,
Thank you. I'll go read about wxMPL then.
Rich
--
Richard B. Shepard, Ph.D. |
On Mon, 26 Nov 2007, C M wrote:
So far in my experience, and as I was recommended, the simplest,
easiest, most pragmatic approach has been to forgo MPlot or WxMpl and
just embed directly in wxPython.
That is the insight I seek. I've looked at the examples and the cookbook
page ...
This
I need to plot trapezoids as well as left- and right-shouldered straight
line plots. If I specify separate lists for the x values and their
corresponding y values, the plots are generated and displayed as needed.
However, I cannot specify the points as a list of tuples and have matplotlib
On Sun, 25 Nov 2007, Darren Dale wrote:
you need a , after that (70,1.0)
Thanks, Darren. Not enough caffine, I guess.
However, now I get:
Traceback (most recent call last):
File trapezoid.py, line 4, in ?
x,y = [(15.0, 0.0), (30.0, 1.0), (70.0, 1.0), (85.0, 0.0)]
ValueError: too
On Sun, 25 Nov 2007, Jouni K Seppänen wrote:
x,y = zip(*[(15.0, 0.0), (30.0, 1.0), (70.0, 1.0), (85.0, 0.0)])
Jouni,
Thank you for pointing this out to me. I see that it's a builtin function
similar to map that assembles the first element of each tuple into a list
for the first variable,
On Sat, 24 Nov 2007, Angus McMorland wrote:
Looking at my reply, I realised this was rubbish - sorry about that. The
fwhm is the difference between the two values of x that give Y = 0.5.
Now that makes much more sense. Having control over the x values for the
inflection point allows us to
On Sat, 24 Nov 2007, Angus McMorland wrote:
Great. Hopefully this correction will make things even more clear.
While the functions and equations are now clear, I get an error that was
present in matplotlib-0.87, but which should be fixed in -0.90.1:
Traceback (most recent call last):
On Sun, 25 Nov 2007, Angus McMorland wrote:
I'm not completely sure, but I suspect that this is an implementation bug,
rather than a version bug, particularly because the line in question isn't
involving matplotlib at all. If you post the relevant code
(normal-curve.py, by the looks of
On Sun, 25 Nov 2007, Angus McMorland wrote:
As I suspected, this is a parameter issue- in this case caused by your use
of the ath module routines which require scalar input, rather than numpy's
(or matplotlib's numerix's) array-friendly versions. If you change exp -
nx.exp in your definition
On Sun, 25 Nov 2007, Angus McMorland wrote:
If you change exp - nx.exp in your definition of gauss1d, all works okay.
Angus,
Yes, it works just fine. By adjusting the value of the fwhm parameter I
can produce the curves we need for both display and printing.
Now I can spend some time
On Sat, 24 Nov 2007, Angus McMorland wrote:
fwhm is the full-width at half the maximum height, i.e. it's the
difference between the two values of x when:
|r - c| = 0.5
Angus,
The additional explanation helps a lot.
The fwhm is a shape parameter (like std dev) - it determines the width
On Thu, 22 Nov 2007, Rich Shepard wrote:
For parsimony, I think you're probably best off just using the
Gaussian equation:
def fwhm2k(fwhm):
'''converts fwhm value to k (see above)'''
return fwhm/(2 * n.sqrt( n.log( 2 ) ) )
def gauss1d(r, fwhm, c):
'''returns the 1d gaussian
I see that I've been immortalized on the SciPy MatPlotLib Cookbook web
page for my enquiry on plotting S- and Z-curves. The Boltzman function
serves very well for that purpose, and I've tweaked the example code to
allow me to pass in the two endpoints and the midpoint for each of these
curves.
On Fri, 23 Nov 2007, Angus McMorland wrote:
For parsimony, I think you're probably best off just using the
Gaussian equation:
def fwhm2k(fwhm):
'''converts fwhm value to k (see above)'''
return fwhm/(2 * n.sqrt( n.log( 2 ) ) )
def gauss1d(r, fwhm, c):
'''returns the 1d gaussian
While I've had 0.82 installed on my workstation and notebook, I've not
been ready to use it until now. I've just downloaded 0.90.1 and diff'd the
two matplotlibrc files. Is WXAgg no longer supported as a backend if the
plotting displays will be integral with the wxPython widget set?
Also,
I'm missing some understanding here, and cannot build matplotlib-0.90.1
nor the apparently missing libraries. This workstation is currently running
Slackware-11.0 with the following installed (or missing, in the case of
PyGObject):
wxPython-2.8.0.1
wxGTK-2.8.0
On Wed, 21 Nov 2007, Rich Shepard wrote:
I'm missing some understanding here, and cannot build matplotlib-0.90.1
nor the apparently missing libraries. This workstation is currently
running Slackware-11.0 with the following installed (or missing, in the
case of PyGObject):
Got
On Wed, 21 Nov 2007, Darren Dale wrote:
They are all defaults. We prefer to ship default rc files that are
commented out so it is easier to track down bugs, it makes it easier to
keep track of any nonstandard settings.
Darren,
Thank you. I assumed that to be the case, but it's nice to
On Thu, 11 Jan 2007, John Hunter wrote:
In your build environment, see if these directories show up with
pkg-config --cflags-only-I pygtk-2.0
John,
Nobody's home.
That is what mpl uses to find your pygtk headers. If not, set your
PKG_CONFIG_PATH environment variable accordingly, and
On Thu, 11 Jan 2007, John Hunter wrote:
You may also want to append /usr/local/pkgconfig/ to that path...
John,
pkgconfig is only in /usr/local/lib.
Glad it's working for you.
Well, let's not be too hasty.
I replaced ~/.matplotlib/matplotlibrc with the newer copy from today's
On Thu, 11 Jan 2007, John Hunter wrote:
sudo rm -rf your build dir and site-packages/matplotlib and
rebuild/reinstall.
John,
Rats! That did not change the result.
Is matplotlib-0.87.7 dependent on specific versions of gcc or glibc?
Rich
--
Richard B. Shepard, Ph.D. |
On Thu, 11 Jan 2007, Simson Garfinkel wrote:
Perhaps you have a second installation that you are not aware of.
Good thought, Simon. I have the new /usr/local/matplotlib-0.87.7,
/usr/share/matplotlib (with images and fonts), and another directory with
docs and examples. That's all. There are
On Thu, 11 Jan 2007, John Hunter wrote:
# How to diagnose where a segfault is occurring
Try importing these packages individually
[EMAIL PROTECTED] ~]$ ipython
In [1]: import matplotlib._image
In [2]: import matplotlib._transforms
In [3]: import matplotlib.backends._ns_backend_agg
In [4]:
On Thu, 11 Jan 2007, John Hunter wrote:
If that shed additional light, again flush the build and install dirs, and
try setting VERBOSE=True in setup.py before doing a clean install. The
VERBOSE setting will generate lots of extra output and may help indicate
where the segfault is occurring
On Thu, 11 Jan 2007, John Hunter wrote:
# How to diagnose where a segfault is occurring
Try importing these packages individually
import matplotlib._image
import matplotlib._transforms
import matplotlib.backends._ns_backend_agg # for numpy
import matplotlib.backends._tkagg
import
On Thu, 11 Jan 2007, John Hunter wrote:
If you recompiled cleanly (ie removed the build subdir) with VERBOSE=True
as instructed, you should be getting tons and tons of output whenever you
run a script (eg can you run simple_plot.py?).
John,
I was looking for verbose output during the
On Thu, 11 Jan 2007, John Hunter wrote:
I didn't see the attachment.
John,
Mea culpa! I forgot to stick them on.
python myscript.py --verbose-debug -dAgg runagg.out
python myscript.py --verbose-debug -dPS runps.out
python myscript.py --verbose-debug -dGTK rungtk.out
You may want
On Thu, 11 Jan 2007, John Hunter wrote:
Hmm, what version of wx are you using?
wxPython-2.6.3.2-i486-1asz (on Slackware)
Rich
--
Richard B. Shepard, Ph.D. |The Environmental Permitting
Applied Ecosystem Services, Inc.| Accelerator(TM)
From 'python setup.py build':
src/_ns_backend_gdk.c:17:25: pygtk/pygtk.h: No such file or directory
However, ...
[EMAIL PROTECTED] ~]$ locate pygtk.h
/usr/local/pygtk-2.8.6/gtk/pygtk.h
/usr/local/include/pygtk-2.0/pygtk/pygtk.h
Do I need to add /usr/local/include/pygtk-2.0/ somewhere in
63 matches
Mail list logo