On Tue, Jul 22, 2008 at 4:54 PM, John Hunter <[EMAIL PROTECTED]> wrote:

> On Tue, Jul 22, 2008 at 4:06 PM, Jonathan Hayward
> http://JonathansCorner.com <[EMAIL PROTECTED]> wrote:
> > Thank you; I've shrunk the graphic part.
>
> Please respond to the mailing list ("reply to all")
>

Oops; sorry.

>
>
> > When I save it as an image, it's painting an 800x600 image, so I've
> shrunk
> > the portion of the 800x600 image I'm using. Is there a way to crop or do
> > something comparable?
>
> Not sure I understand the question.  You can control the figure size
> in pixels by setting the figure size in inches and the dpi -- the
> pixel size is the prodict of the two
>
>  fig = figure((8,6), dpi=100)  # 800x600
>

When I tried placing that line in a couple of places, I got an error:

[EMAIL PROTECTED] ~/bin $ ./barchart
Traceback (most recent call last):
  File "./barchart", line 6, in ?
    fig = figure((8,6), dpi=100)
  File "/usr/lib/python2.4/site-packages/matplotlib/pyplot.py", line 186, in
figure
    FigureClass=FigureClass,
  File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py",
line 44, in new_figure_manager
    return FigureManagerGTKAgg(canvas, num)
  File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py", line
405, in __init__
    self.window.set_title("Figure %d" % num)
TypeError: not all arguments converted during string formatting

Are there other things it needs? (I tried placing a space so "8,6" would
read "8, 6", but it didn't significantly change the error.)

>
> you can control the *relative* proportion of the axes by using the
> axes command as before
>
>  ax = axes([left, bottom, width, height])
>
> with these two, you should be able to get whatever size and
> proportions you want.
>
> JDH
>



-- 
-- Jonathan Hayward, [EMAIL PROTECTED]

** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com

++ Would you like to curl up with one of my hardcover books?
++ You can now get my books from http://CJSHayward.com
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to