Hello,
I am creating a plot with multiple y-axis (up to 6) and twinx works pretty
well. The problem is that there are too much wasted spaces used up by the
axes. Since I have multiple axes, it cuts into the amount of space available
for the plot area. I need to know how I can squeeze some sp
BTW: I tried to use set_position to change the position of the axes label as
suggested by previous posting. No effect.
- Original Message
> > Hello,
> >
> > I am creating a plot with multiple y-axis (up to 6) and twinx
> works pretty well. The problem is that there are too much wast
Hi all,
I am new to matplotlib. I like to know how to create a plot that contains
several y-axis (up to say, 6) with only 1 x-axis (similar to the two_scales.py
type plot but with all of the y-axis on one side). I know you can create
multiple single curve plots on the same page but that's not
I am having trouble with axes and grids in the y-direction.
I have a 3 rows x 2 colums figure and I like to have 5 major Y divisions or 4
grid lines for each of the graphs. 5 of the 6 graphs came out properly. For
instance, for a Ymin=12, Ymax=17, I get grid lines at y=13, 14, 15, and 16.
Hi list,
The tutorial indicated that I can use gca to get at the grid by doing a:
glines = getp(gca(), 'gridlines')
but when I do that, I get a "Subplot instance has no attribute "get_gridlines".
How do I get to the grid object?
Thanks,
--
John Henry
---
Okay, I'll answer my own question. After looking through the code, it appears
I have to do a xgridlines - not gridlines, like:
glines = getp(gca(), 'xgridlines')
>
> Hi list,
>
> The tutorial indicated that I can use gca to get at the grid
> by doing a:
>
> glines = getp(gca(), 'gridlines')
Hi list,
I am still fairly new to Matplotlib.
If I use the default settings, after creating a plot, and save the file, I get
a .png file that looks really ugly. However, if I view the plot at the screen
first (using the show() command), maximized the plot, and then save the file, I
get a ve
Thanks for the reply, Darren.
I didn't post the plot because I don't know if the list accept email
attachments, and I don't have any space on the web for file sharing.
I'll try to figure out a way to post the plots.
BTW: I called savefig with the filename, and a dpi of 600 and nothing else.
M
Okay, I tried saving using the postscript format, and I end up with the "ugly"
plot also. In fact, if I maximize the plot and then save as .ps file, I get
ugly plot as well. So, saving it in PS made no difference - that part is
correct but it means I end up with the same font, and dimension
Okay, I posted the "ugly" vs "pretty" plots at:
http://new.photos.yahoo.com/kimwaic106/album
I stripped out most of the titles and subtitles but I think you can still see
the difference between the two. (Don't worry about the middle unintelligble
part).
Regards,
--
John Henry
- Origina
Okay, I uploaded another set of plots. Please take a look at them again. I
hope it's clear this time.
I must reiterate that the *only* thing I did different between the 2 was to do
a screen maximize before saving - and the fonts, lines, spacing all came out
correct. I did not change font or
Thanks for the reply.
I saw Chris's note after I posted my last email and yes I think that link is
very helpful. I am studying that link and I think I know what to do now.
Thanks again (to Chris as well).
> -Original Message-
> From: Darren Dale [mailto:[EMAIL PROTECTED]
> Sent: We
Hi list,
I have a figure of 3 rows by 2 col of plots. I have a need to use 2 line
xlabels for each of the subplots. So I did something like:
xlabel("Label 1\nLine 2")
for each of the subplots.
However when I do that, the 2nd line is lost for the top 4 subplots because I
don't have enough ve
Please ignore this message. I discovered the subplot_toolbar.py example which
helped me figure out what I did wrong.
Thanks
--
John Henry
- Original Message
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: matplotlib-users@lists.sourceforge.net
Sent: Thursday, February 22, 2007 3:15
Hi list,
I am getting an "invalidrestore" from the printer when I print a figure created
with MPL. The page prints fine but for each plot, I am getting an error page.
I didn't have this problem until I started making a number of font related
changes. Before I go through a bunch of painful r
I installed gsview and gscript and tried it. The good news is that when I
print from inside gsview, the error page is gone. The bad news is that the
oritentation is wrong. My plot is designed for landscape. From word, I set
the page setup to landscape, import the picture, and print. But wi
Thanks for pointing that out, Eric.
I try that and it did turn my plot 90 degree. The bad news is that GSview
imports it upside down and if I want to view the plot on the screen, I have to
rotate it downside up first. (Hey, I shouldn't complain. At least I can
print without wasting a piece
After doing some investigation, I discovered that this problem is reproducible
using sample programs such as axes_demo.py. Here are the steps I took:
a) Run axes_demo.py
b) Save the plot as eps file
c) Start Word
d) Insert the eps file
e) Print
I got a 2 page print: 1 for the plot, and 1 for
Thanks for the answer, John.
Up to this point, the other software package we use produces EPS files only and
so I've been using it this way for a while. May not be the best way but I've
tried other EPS viewers and so far Word actually is the best way since I have
to embedd the plots into Word
Switching to PDF works (eventually - see below) but bring with it yet another
set of problems.
First of all, I had to fix backend_pdf.py for MPL to work (w Python 2.3,
anyway).
Two problems:
a) 2.3 doesn't have the sorted function - it uses a .sort() function. So, I
had to change line 487 fr
I installed gsview and gs and tried it. AFAIK, gs didn't seen to complain.
I also tried GIMP. While it didn't complain, the picture displayed is
horribly bad.
>
> An "invalidrestore" error signals an improper restore.
> E.g., a string, dictionary, or procedure is left on the
> stack that
I found an example on the web that illustrates the question I posted earlier
about axes. See:
http://www.scipy.org/Cookbook/Matplotlib/MulticoloredLine
Notice that the y-axis goes from (-1.1, 1.1) but the first label is at -1.0.
I really don't like that because when I read values off the gra
Somebody at the usenet suggested that I play with the ticker formatter and
locator. While that helped the multi-color sample I cited, it didn't help in
my plots. The formatter only controls how the y-axis labels are formatted,
whereas AFAIK the locator only affects the values of the ymajor a
Thanks to the reply, John (Hunter).
That's it. The method proposed by Jouni appears to work too:
gca().yaxis.set_major_locator(LinearLocator())
but it created too many labels.
The set_ytinks call is the key. The set_ylim doesn't seem to be necessary.
Now I have to study and see how I can i
Hi list,
Must be a dumb question: How do I draw a line going from point A to point B on
a figure (not plot reference frame), with a particular color and style?
I scan through the manual and nothing jumped out - closest is Rectangle but
that doesn't accept style parameter.
Thanks,
--
John Hen
Thanks for the answer, John and Jouni.
Okay, Line2D works. However, it appears to work in point (or is it pixels?)
only. It doesn't accept xycoords="figure fraction" as an option. How can I
specify xy as a fraction of the figure size?
I read the transform cookbook cited by Jouni. I am afrai
Upon working with this a little further, I discover that it works only in
full-view screen mode. May be that's because xy is in pixel mode then? When I
save it to a png file and then view it, the lines are wrong.
--
John Henry
- Original Message
From: "[EMAIL PROTECTED]" <[EMAIL PRO
Thanks, John. That works perfectly. Now I understand better what the
transform parameter is.
Regards,
> -Original Message-
> From: John Hunter [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 07, 2007 10:12 AM
> To: [EMAIL PROTECTED]
> Cc: matplotlib-users@lists.sourceforge.net
> Su
Hi list,
I am using matplotlib to create single page plots and the whole process works
fine. However, when I am done, I end up with lots of single page pdf files.
Is there a way to get matplotlib to combine them all into a single PDF file?
I tried using another package PyPDF but ended up wit
Hi list,
First of all, thanks to Bill Dandreta and Jouni Seppanen for helping with my
combining single page pdf into multipage pdf question. I tried both method and
went with pdftex because it's very simple (and fits my need).
Now, I am running into another problem. Everything works fine up
Sorry, Jouni: I am not familiar with CVS syntax. Is there someway you can
email me a complete backend_pdf.py to try?
Regards,
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Jouni K. Seppänen
> Sent: Monday, March 12, 2007 11:20 PM
> To: matpl
Jouni,
Are you certain the version you sent me is correct? It didn't make any
difference - I get the same error messages.
Regards,
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Jouni K. Seppänen
> Sent: Monday, March 12, 2007 11:20 PM
> To:
Just in case my message got buried, I like to repost my message:
> Now, I am running into another problem. Everything works fine up to 8
> page plots. Starting with the 9th page, MPL chokes at line 1084 in
> backend_pdf.py and couldn't find the cooresponding ttf file
> (VeraSe.ttf) but it had no
Thanks for the reply, Jouni.
I am running Python 2.3 on Windows XP, latest version of MPL.
I'll see if I can reproduce the problem using standard examples.
Regards,
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Jouni K Seppänen
> Sent: Sat
Hi list,
I have a set of time series data which is year's worth of wind speed at a
particular place (one data point per minute). I want to see how wind speed
spreads throughout the day. I can do a scatter char with 24 hours of the day
vs wind speed but then I end up with something that's not
Saw this:
http://www.originlab.com/www/products/GraphGallery.aspx?GID=26&s=8&lm=215
Since I am not interested in wind direction, may be I can use stacked
bar-chart. Still, how would I tie plot_data with it though?
Regards,
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EM
Thanks to everybody that responded to my question.
After looking at the different options, I do agree that windrose.py fits my
need the best. Unfortunately, there is insufficient information embedded in
the code to the point where I can use it. I sent the author a email requesting
more info a
Derek,
When you say "on version 5", do you mean windrose itself is on version 5? May
be that's why in your sample code, you invoked windrose via:
freq,ax=windrose.windplot(ventV,ventD,counts=False,speed_classes=[0.1,0.2,0.3,0.4,0.5],sectors=8,style='bar2')
but the version of windrose from John
Thanks, Philip. I wasn't aware of gmane. I only did a google search.
Regards,
> -Original Message-
> From: Philip Austin [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 08, 2007 11:51 AM
> To: [EMAIL PROTECTED]
> Cc: matplotlib-users@lists.sourceforge.net
> Subject: Re: [Matplotlib-user
Thanks for the message, Lionel.
I am now able to run windrose.py using Derek's sample data. I was having
trouble at first but after updating scipy to the latest version, the problem
went away.
Now, I am trying to convert my data into a format acceptable to windrose. As
indicated before, my d
Hi, list:
In my quest to create MPL plots for insertion into Word documents, I tried
post-script (doesn't work well - Word doesn't like the ps file created by MPL),
pdf (can't create more then 8 plots per job and can not import into word), png
(works but each plot needs to be magified manually
Thanks everybody for the explanation of svg in Gimp. That makes sense. Is
there any vector based program that does what Gimp does?
> Did you try eps rather than ps?
>
> Eric
Yes, I tried eps. Word won't recognize that neither.
As to the EMF format, I downloaded the package and attempted t
Chris,
All I want is to:
a) Insert all of the plots I create with MPL onto a Word document.
As I said before, my version of Word does not recognize the EPS or PS format
created by MPL. I am not blaiming MPL. I am just not willing to send Redmond
money to see if their later version does the
>
> On Fri, 11 May 2007, [EMAIL PROTECTED]
> apparently wrote:
> > All I want is to: a) Insert all of the plots I create with
> > MPL onto a Word document.
>
> This part should be achievable with PNG.
> Just set the figsize.
> I have not had problems...
>
Correct. I am doing that right now.
Bingo! My prayer appears to have been answered.
inkscape has no trouble reading the .svg files created by MPL, and Word has no
trouble reading the .eps files created by inkscape. So, at least I can use it
to preserve the vectors. Too bad inkscape doesn't read .eps directly
(complaining...co
Yes, that's what I've been forced to do. The problem with that is that it
forces you to fix the size of the figures in your paper. When I reformat
things around in subsequent revisions, I have to go back and recreate the
figures - if the spacing changes. I would much rather retaining the ab
> > inkscape has no trouble reading the .svg files created by MPL, and
> > Word has no trouble reading the .eps files created by inkscape.
>
> hmm. I wonder what it is about MPL's .eps files that Word
> doesn't like.
>
>
> Bug in MPL or Word??
Most likely Word. It's very picky. I have .eps
Actually, Gimp is the problem. It's obvious they don't have a very good
rendering engine. The plots looks very good under Inkscape.
> The quality of the svg plot depends in large plot on the svg renderer
> -- perhaps word doesn't do a good job rendering SVG? The
> matplotlib PNG files look
This is simply too good to be true. I played with manupulating MPL plots using
Inkscape and man, somebody ought to include this in the MPL FAQ. I can move
everything around by elements, touch-up or remove things I don't want, scale
it, rotate it, you name it.
And then I can save the file in
Sorry. Just discover that saving the file in emf format under Inkscape and
then import into Word works even better. The eps engine in Word is really bad.
Hope that this info is helpful to others who are stuck in an Office world like
me.
> -Original Message-
> From: [EMAIL PROTECTED]
Not exactly OT.
I would not recommend using .eps format in order to
export MPL graphs for Inkscape. I've been playing
around with Inkscape for a few days now and I've been
using .svg exclusively and don't have any problem.
As I said before, I like the fact that once I am
inside Inscape, I can
This SVG format gets better everyday.
For those of you unfortunate enough not to have the
choice of freedom from the M$ Monopoly, I discovered
that Visio supports SVG file directly. In fact, the
rendering is better then Inscape and get this: you can
copy and paste *directly* over to PowerPoint an
Has anybody been able to create an exe of their python
applications involving matplotlib using pyinstall (ver
1.3)? I am getting a:
RuntimeError: Could not find the matplotlib data
files
when I attempt to run the exe created.
In searching the web, it appears this is an issue when
others tr
Well, looks like nobody has an answer to this
question.
How'bout py2exe or other ways of creating exe files
out of matplotlib projects? Has anybody been able to
do that?
--- [EMAIL PROTECTED] wrote:
> Has anybody been able to create an exe of their
> python
> applications involving matplotlib u
With Stef's help, I was able to get pass the
"Matplotlib datafile not found" problem in using
py2exe and Matplotlib under Python 2.3 - but then ran
into the same Tkinter not loaded problem like he did.
After reading Stef's messages from this list, I
downloaded the latest version of Matplotlib - on
So, do I understand this correctly:
In order to get rid of the Tkinter problem when
building a matplotlib application using py2exe, I need
0.91.2 ver of matplotlib and use the setup.cfg file to
select the backend I want (wxpython in my case). Then
run py2exe to build the ap. Correct?
But then,
Michael,
I am referring to the fact that there are no Windows
binaries provided for Python 2.3. If I simply copy
the matplotlib directory over to Python23, py2exe will
get confused.
I have no clue how to build it for Python23. I don't
even have any C compiler.
> -Original Message-
> Fr
I *finally* got this to work!!!
Thanks to Werner's message, I found the culpit: the
matplotlibrc file copied to the dist directory
contains the TkAgg backend. All I had to do is to
change *that* file to say:
backend : WXAgg
Note that it's not the matplotlibrc in the installed
copy - but
Ok, I know what the problem is. I was using a sample
setup.py posted by Stef and in his setup, he created a
"mpl-data" subdirectory under "dist" to store all of
the data files use by matplotlib. That's why
matplotlib couldn't find it without a set statement.
After changing the name to "matplotli
59 matches
Mail list logo