Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2011-05-13 Thread C M
On Wed, May 11, 2011 at 12:29 AM, Jae-Joon Lee  wrote:
> I think I fixed a similar bug at some point but I'm not sure if that
> is related with this.
> Are you using the *make_axes_area_auto_adjustable* from the current
> git master (check
> examples/axes_grid/make_room_for_ylabel_using_axesgrid.py)? If not can
> you try that? Also please post your code.

It seems I can't build matplotlib from source. Would it be possible to
attach the amended files to this list and I'll try them?

Thank you,
Che

--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2011-05-13 Thread C M
On Fri, May 13, 2011 at 6:23 AM, Pauli Virtanen  wrote:
> Thu, 12 May 2011 15:16:43 -0400, C M wrote:
> [clip: installing Python modules]
>> Is there a step-by-step method on the
>> website that shows how to do this?
>
> Here: http://docs.python.org/install/index.html

Thanks, but I guess I can't install matplotlib since I can't build it,
since I don't have VS2003.

--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2011-05-13 Thread Pauli Virtanen
Thu, 12 May 2011 15:16:43 -0400, C M wrote:
[clip: installing Python modules]
> Is there a step-by-step method on the
> website that shows how to do this?

Here: http://docs.python.org/install/index.html


--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2011-05-12 Thread C M
On Thu, May 12, 2011 at 2:50 PM, Michael Droettboom  wrote:
> On 05/12/2011 02:34 PM, C M wrote:
>>
>> On Thu, May 12, 2011 at 1:26 PM, Michael Droettboom
>>  wrote:
>>
>>>
>>> You can always get a tarball of the current git master by going here:
>>>
>>> https://github.com/matplotlib/matplotlib
>>>
>>> clicking on "Download" and choosing one of the "download source" options
>>> at the top of the popup box.
>>>
>>> Mike
>>>
>>
>> Thanks, but I'm having trouble using that.  I downloaded the .zip
>> file, unzipped the archive, moved the folder to
>> C:\Python25\Lib\site-packages, renamed my current matplotlib folder to
>> matplotlib_OLD, ran these commands from the new directory:
>>
>> python setup.py build
>> python setup.py install
>>
>> And finally renamed the new folder to just matplotlib.  It is not
>> finding the modules when I go to run it.  If revert the names of the
>> folders, my old folder still works.  What am I doing wrong?
>>
>
> You should not expand the directory tree under site-packages -- "python
> setup.py install" is what does that for you.  You should expand it anywhere
> else (most people create a "src" directory somewhere on their machine for
> source code).  Then run those commands.

I unzipped it in a download directory, changed the directory to that
folder, and ran the commands again...and it did not put a matplotlib
folder under site-packages.  Is there a step-by-step method on the
website that shows how to do this?

But all I really want is the changes that Jae Joon made as mentioned
above.  Is there a way to just grab them from the new folders?  (I
thought not because the folder structure from what I downloaded from
git master doesn't match the folder structure I had from mpl 1.0,
downloaded from the main mpl page).

Thanks,
Che

--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2011-05-12 Thread Michael Droettboom
On 05/12/2011 02:34 PM, C M wrote:
> On Thu, May 12, 2011 at 1:26 PM, Michael Droettboom  wrote:
>
>> You can always get a tarball of the current git master by going here:
>>
>> https://github.com/matplotlib/matplotlib
>>
>> clicking on "Download" and choosing one of the "download source" options
>> at the top of the popup box.
>>
>> Mike
>>  
> Thanks, but I'm having trouble using that.  I downloaded the .zip
> file, unzipped the archive, moved the folder to
> C:\Python25\Lib\site-packages, renamed my current matplotlib folder to
> matplotlib_OLD, ran these commands from the new directory:
>
> python setup.py build
> python setup.py install
>
> And finally renamed the new folder to just matplotlib.  It is not
> finding the modules when I go to run it.  If revert the names of the
> folders, my old folder still works.  What am I doing wrong?
>
You should not expand the directory tree under site-packages -- "python 
setup.py install" is what does that for you.  You should expand it 
anywhere else (most people create a "src" directory somewhere on their 
machine for source code).  Then run those commands.

Cheers,
Mike

-- 
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA


--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2011-05-12 Thread C M
On Thu, May 12, 2011 at 1:26 PM, Michael Droettboom  wrote:
> You can always get a tarball of the current git master by going here:
>
> https://github.com/matplotlib/matplotlib
>
> clicking on "Download" and choosing one of the "download source" options
> at the top of the popup box.
>
> Mike

Thanks, but I'm having trouble using that.  I downloaded the .zip
file, unzipped the archive, moved the folder to
C:\Python25\Lib\site-packages, renamed my current matplotlib folder to
matplotlib_OLD, ran these commands from the new directory:

python setup.py build
python setup.py install

And finally renamed the new folder to just matplotlib.  It is not
finding the modules when I go to run it.  If revert the names of the
folders, my old folder still works.  What am I doing wrong?

Thanks,
Che

--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2011-05-12 Thread Michael Droettboom
You can always get a tarball of the current git master by going here:

https://github.com/matplotlib/matplotlib

clicking on "Download" and choosing one of the "download source" options 
at the top of the popup box.

Mike

On 05/11/2011 11:07 AM, C M wrote:
> On Wed, May 11, 2011 at 11:07 AM, C M  wrote:
>
>> On Wed, May 11, 2011 at 12:29 AM, Jae-Joon Lee  wrote:
>>  
>>> I think I fixed a similar bug at some point but I'm not sure if that
>>> is related with this.
>>> Are you using the *make_axes_area_auto_adjustable* from the current
>>> git master (check
>>> examples/axes_grid/make_room_for_ylabel_using_axesgrid.py)? If not can
>>> you try that? Also please post your code.
>>>
>>  
> I have not set up with git since Matplotlib made the change from svn.
> I just downloaded git to get started but don't know how to use it yet;
> for now is there a way to just check out the files I need to test
> this, or is there some other (non-git) way to get this update?
>
> Thanks,
> Che
>
> --
> Achieve unprecedented app performance and reliability
> What every C/C++ and Fortran developer should know.
> Learn how Intel has extended the reach of its next-generation tools
> to help boost performance applications - inlcuding clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>


-- 
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA


--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2011-05-11 Thread C M
On Wed, May 11, 2011 at 11:07 AM, C M  wrote:
> On Wed, May 11, 2011 at 12:29 AM, Jae-Joon Lee  wrote:
>> I think I fixed a similar bug at some point but I'm not sure if that
>> is related with this.
>> Are you using the *make_axes_area_auto_adjustable* from the current
>> git master (check
>> examples/axes_grid/make_room_for_ylabel_using_axesgrid.py)? If not can
>> you try that? Also please post your code.
>

I have not set up with git since Matplotlib made the change from svn.
I just downloaded git to get started but don't know how to use it yet;
for now is there a way to just check out the files I need to test
this, or is there some other (non-git) way to get this update?

Thanks,
Che

--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2011-05-10 Thread Jae-Joon Lee
I think I fixed a similar bug at some point but I'm not sure if that
is related with this.
Are you using the *make_axes_area_auto_adjustable* from the current
git master (check
examples/axes_grid/make_room_for_ylabel_using_axesgrid.py)? If not can
you try that? Also please post your code.

Regards,

-JJ


On Tue, May 10, 2011 at 3:06 AM, C M  wrote:
> On Thu, Sep 30, 2010 at 7:55 AM, Jae-Joon Lee  wrote:
>> On Thu, Sep 23, 2010 at 10:31 AM, C M  wrote:
>>> Until a more permanent solution is figured out, can anyone recommend
>>> any workarounds, even if they are a little clunky?  I'm embedding mpl
>>> plots in wxPython and am also finding this issue suboptimal.
>>>
>>> Che
>>>
>>
>> A (partial) workaround is possible using the axes_grid1 toolkit (i.e.,
>> you need matplotlib 1.0).
>> Attached is a module I just cooked up (based on my previous attempt @
>> http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg18129.html),
>> and it seems to work quite well.
>> The usage is simple.
>>
>>
>>        ax = plt.axes([0,0,1,1])
>>
>>        ax.set_yticks([0.5])
>>        ax.set_yticklabels(["very long label"])
>>
>>        make_axes_area_auto_adjustable(ax) # This is where axes_grid1 comes in
>>
>> Then, the axes area(including ticklabels and axis label) will be
>> automatically adjusted to fit in the given extent ([0, 0, 1, 1] in the
>> above case).
>>
>> While this is mainly for a single axes plot, you may use it with
>> multi-axes plot (but somewhat trickier to use). A few examples are
>> included in the module.
>>
>
> Although this has been a big improvement, there is a lingering issue
> that I want to get around to cleaning up now.
>
> When I use this workaround that Jae Joon provided, it works just fine
> except that if I call canvas.draw() (because I am adding a star to a
> particular marker when point picking), it causes the whole canvas to
> "jump" a little bit.
>
> What happens is that on the first call to .draw() the plot area
> increases vertically a tiny amount and the title moves up slightly.
> On subsequent calls, the plot surface doesn't increase vertically but
> the title text moves slightly up and then down quickly.  This happens
> each time I point pick for the first 5 or so times, and then it stops
> doing it.  I don't even have to add any new points to the plot, just
> call canvas.draw() and it will do this.
>
> It is visually distracting and a look and feel demerit for the app for sure.
>
> I've tried to make a sample that is not embedded in wxPython but so
> far I can't reproduce the problem.
>
> Jae Joon or anyone, any ideas about why this is occurring and how to
> prevent it?  If need be I will try to work up a sample that
> demonstrates it, but so far I've failed in that.
>
> Thanks,
> Che
>

--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2011-05-09 Thread C M
On Thu, Sep 30, 2010 at 7:55 AM, Jae-Joon Lee  wrote:
> On Thu, Sep 23, 2010 at 10:31 AM, C M  wrote:
>> Until a more permanent solution is figured out, can anyone recommend
>> any workarounds, even if they are a little clunky?  I'm embedding mpl
>> plots in wxPython and am also finding this issue suboptimal.
>>
>> Che
>>
>
> A (partial) workaround is possible using the axes_grid1 toolkit (i.e.,
> you need matplotlib 1.0).
> Attached is a module I just cooked up (based on my previous attempt @
> http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg18129.html),
> and it seems to work quite well.
> The usage is simple.
>
>
>        ax = plt.axes([0,0,1,1])
>
>        ax.set_yticks([0.5])
>        ax.set_yticklabels(["very long label"])
>
>        make_axes_area_auto_adjustable(ax) # This is where axes_grid1 comes in
>
> Then, the axes area(including ticklabels and axis label) will be
> automatically adjusted to fit in the given extent ([0, 0, 1, 1] in the
> above case).
>
> While this is mainly for a single axes plot, you may use it with
> multi-axes plot (but somewhat trickier to use). A few examples are
> included in the module.
>

Although this has been a big improvement, there is a lingering issue
that I want to get around to cleaning up now.

When I use this workaround that Jae Joon provided, it works just fine
except that if I call canvas.draw() (because I am adding a star to a
particular marker when point picking), it causes the whole canvas to
"jump" a little bit.

What happens is that on the first call to .draw() the plot area
increases vertically a tiny amount and the title moves up slightly.
On subsequent calls, the plot surface doesn't increase vertically but
the title text moves slightly up and then down quickly.  This happens
each time I point pick for the first 5 or so times, and then it stops
doing it.  I don't even have to add any new points to the plot, just
call canvas.draw() and it will do this.

It is visually distracting and a look and feel demerit for the app for sure.

I've tried to make a sample that is not embedded in wxPython but so
far I can't reproduce the problem.

Jae Joon or anyone, any ideas about why this is occurring and how to
prevent it?  If need be I will try to work up a sample that
demonstrates it, but so far I've failed in that.

Thanks,
Che

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2010-12-18 Thread Jae-Joon Lee
Glad to hear that others find that code useful.
I just want to emphasize that this is not a general solution and never meant to.
Although I'm planning to include this functionality into the
axes_grid1 toolkit, I don't think this will be integrated with the
main matplolib.

Regards,

-JJ


On Wed, Dec 15, 2010 at 4:24 AM, Daniel Hyams  wrote:
> I'm using it too, with excellent results.  Thanks JJ!
>
>
>> On Tue, Dec 14, 2010 at 2:13 PM, C M  wrote:
>>>
>>>
>>> On Thu, Sep 30, 2010 at 7:55 AM, Jae-Joon Lee 
>>> wrote:

 On Thu, Sep 23, 2010 at 10:31 AM, C M  wrote:
 > Until a more permanent solution is figured out, can anyone recommend
 > any workarounds, even if they are a little clunky?  I'm embedding mpl
 > plots in wxPython and am also finding this issue suboptimal.
 >
 > Che
 >

 A (partial) workaround is possible using the axes_grid1 toolkit (i.e.,
 you need matplotlib 1.0).
 Attached is a module I just cooked up (based on my previous attempt @

 http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg18129.html),
 and it seems to work quite well.
 The usage is simple.


        ax = plt.axes([0,0,1,1])

        ax.set_yticks([0.5])
        ax.set_yticklabels(["very long label"])

        make_axes_area_auto_adjustable(ax) # This is where axes_grid1
 comes in

 Then, the axes area(including ticklabels and axis label) will be
 automatically adjusted to fit in the given extent ([0, 0, 1, 1] in the
 above case).

 While this is mainly for a single axes plot, you may use it with
 multi-axes plot (but somewhat trickier to use). A few examples are
 included in the module.

 Regards,

 -JJ
>>>
>>> This thread is a few months old  now, but I just wanted to mention that I
>>> am using JJ's workaround (thanks!) in my app--with either one or two y
>>> axes--and it is just excellent.
>>>
>>> This should definitely be at least an option for matplotlib users--the
>>> quality of the appearance of the plots now is like night and day, because,
>>> to me, seeing a plot without its axes labels (I'm talking about in a
>>> resizable plot embedded in an application, not a static graph for inclusion
>>> in a publication) is a *major* look and feel demerit.
>>>
>>> Che
>>>
>>>
>>>
>>>
>>> --
>>> Lotusphere 2011
>>> Register now for Lotusphere 2011 and learn how
>>> to connect the dots, take your collaborative environment
>>> to the next level, and enter the era of Social Business.
>>> http://p.sf.net/sfu/lotusphere-d2d
>>> ___
>>> Matplotlib-users mailing list
>>> Matplotlib-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>
>>
>>
>> --
>> Daniel Hyams
>> dhy...@gmail.com
>
>
>
>
> --
> Daniel Hyams
> dhy...@gmail.com
>
> --
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2010-12-14 Thread Daniel Hyams
I'm using it too, with excellent results.  Thanks JJ!


On Tue, Dec 14, 2010 at 2:13 PM, C M  wrote:
>
>>
>>
>> On Thu, Sep 30, 2010 at 7:55 AM, Jae-Joon Lee wrote:
>>
>>> On Thu, Sep 23, 2010 at 10:31 AM, C M  wrote:
>>> > Until a more permanent solution is figured out, can anyone recommend
>>> > any workarounds, even if they are a little clunky?  I'm embedding mpl
>>> > plots in wxPython and am also finding this issue suboptimal.
>>> >
>>> > Che
>>> >
>>>
>>> A (partial) workaround is possible using the axes_grid1 toolkit (i.e.,
>>> you need matplotlib 1.0).
>>> Attached is a module I just cooked up (based on my previous attempt @
>>>
>>> http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg18129.html
>>> ),
>>> and it seems to work quite well.
>>> The usage is simple.
>>>
>>>
>>>ax = plt.axes([0,0,1,1])
>>>
>>>ax.set_yticks([0.5])
>>>ax.set_yticklabels(["very long label"])
>>>
>>>make_axes_area_auto_adjustable(ax) # This is where axes_grid1
>>> comes in
>>>
>>> Then, the axes area(including ticklabels and axis label) will be
>>> automatically adjusted to fit in the given extent ([0, 0, 1, 1] in the
>>> above case).
>>>
>>> While this is mainly for a single axes plot, you may use it with
>>> multi-axes plot (but somewhat trickier to use). A few examples are
>>> included in the module.
>>>
>>> Regards,
>>>
>>> -JJ
>>>
>>
>> This thread is a few months old  now, but I just wanted to mention that I
>> am using JJ's workaround (thanks!) in my app--with either one or two y
>> axes--and it is just excellent.
>>
>> This should definitely be at least an option for matplotlib users--the
>> quality of the appearance of the plots now is like night and day, because,
>> to me, seeing a plot without its axes labels (I'm talking about in a
>> resizable plot embedded in an application, not a static graph for inclusion
>> in a publication) is a *major* look and feel demerit.
>>
>> Che
>>
>>
>>
>>
>> --
>> Lotusphere 2011
>> Register now for Lotusphere 2011 and learn how
>> to connect the dots, take your collaborative environment
>> to the next level, and enter the era of Social Business.
>> http://p.sf.net/sfu/lotusphere-d2d
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
>
> --
> Daniel Hyams
> dhy...@gmail.com
>




-- 
Daniel Hyams
dhy...@gmail.com
--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2010-12-14 Thread C M
On Thu, Sep 30, 2010 at 7:55 AM, Jae-Joon Lee  wrote:

> On Thu, Sep 23, 2010 at 10:31 AM, C M  wrote:
> > Until a more permanent solution is figured out, can anyone recommend
> > any workarounds, even if they are a little clunky?  I'm embedding mpl
> > plots in wxPython and am also finding this issue suboptimal.
> >
> > Che
> >
>
> A (partial) workaround is possible using the axes_grid1 toolkit (i.e.,
> you need matplotlib 1.0).
> Attached is a module I just cooked up (based on my previous attempt @
>
> http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg18129.html
> ),
> and it seems to work quite well.
> The usage is simple.
>
>
>ax = plt.axes([0,0,1,1])
>
>ax.set_yticks([0.5])
>ax.set_yticklabels(["very long label"])
>
>make_axes_area_auto_adjustable(ax) # This is where axes_grid1 comes
> in
>
> Then, the axes area(including ticklabels and axis label) will be
> automatically adjusted to fit in the given extent ([0, 0, 1, 1] in the
> above case).
>
> While this is mainly for a single axes plot, you may use it with
> multi-axes plot (but somewhat trickier to use). A few examples are
> included in the module.
>
> Regards,
>
> -JJ
>

This thread is a few months old  now, but I just wanted to mention that I am
using JJ's workaround (thanks!) in my app--with either one or two y
axes--and it is just excellent.

This should definitely be at least an option for matplotlib users--the
quality of the appearance of the plots now is like night and day, because,
to me, seeing a plot without its axes labels (I'm talking about in a
resizable plot embedded in an application, not a static graph for inclusion
in a publication) is a *major* look and feel demerit.

Che
--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2010-09-30 Thread Jae-Joon Lee
On Thu, Sep 23, 2010 at 10:31 AM, C M  wrote:
> Until a more permanent solution is figured out, can anyone recommend
> any workarounds, even if they are a little clunky?  I'm embedding mpl
> plots in wxPython and am also finding this issue suboptimal.
>
> Che
>

A (partial) workaround is possible using the axes_grid1 toolkit (i.e.,
you need matplotlib 1.0).
Attached is a module I just cooked up (based on my previous attempt @
http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg18129.html),
and it seems to work quite well.
The usage is simple.


ax = plt.axes([0,0,1,1])

ax.set_yticks([0.5])
ax.set_yticklabels(["very long label"])

make_axes_area_auto_adjustable(ax) # This is where axes_grid1 comes in

Then, the axes area(including ticklabels and axis label) will be
automatically adjusted to fit in the given extent ([0, 0, 1, 1] in the
above case).

While this is mainly for a single axes plot, you may use it with
multi-axes plot (but somewhat trickier to use). A few examples are
included in the module.

Regards,

-JJ


make_room_for_ylabel_using_axesgrid.py
Description: Binary data
--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2010-09-24 Thread Russell E. Owen
In article 
,
 John Hunter  wrote:

> On Wed, Sep 22, 2010 at 8:31 PM, C M 
>  wrote:
> 
> > Until a more permanent solution is figured out, can anyone recommend
> > any workarounds, even if they are a little clunky?  I'm embedding mpl
> > plots in wxPython and am also finding this issue suboptimal.
> 
> Change your subplots adjust parameters to make the default bottom,
> left, wspace and hspace wider.  This will reduce the chance of
> overlaps.
> 
> http://matplotlib.sourceforge.net/search.html?q=subplots_adjust
> 
> The defaults can be changed in your rc file
> 
>   http://matplotlib.sourceforge.net/users/customizing.html
> 
> See also these recipes on the FAQ to automatically choose boundaries
> 
>   http://matplotlib.sourceforge.net/faq/howto_faq.html#move-the-edge-of-an-axe
>   s-to-make-room-for-tick-labels
> 
>   http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make-room
>   -for-tick-labels
> 
> Automatic layout to avoid overlap is not an easy problem -- Michael
> Droetboom worked on it for a while but didn't get to a satisfactory
> point.  So far our philosophy has been : make it easy to customize
> rather than do it automatically.  I realize this is not always a good
> approach, especially in automated figure generators where you don't
> have access to the data ahead of time.

One possibility is to offer a mode whereby the font size for the 
annotations is fixed. It is then much easier to figure out how large a 
particular annotation must be before laying out the graph. That ought to 
make it much easier to leave enough room for axis labels and such.

Ideally in this mode the automatic layout would be improved so that axis 
labels were always visible. But even if that was a planned feature that 
was not initially implemented, having fixed font size would allow users 
to more easily lay things out as desired.

-- Russell


--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2010-09-23 Thread John Hunter
On Wed, Sep 22, 2010 at 8:31 PM, C M  wrote:

> Until a more permanent solution is figured out, can anyone recommend
> any workarounds, even if they are a little clunky?  I'm embedding mpl
> plots in wxPython and am also finding this issue suboptimal.

Change your subplots adjust parameters to make the default bottom,
left, wspace and hspace wider.  This will reduce the chance of
overlaps.

http://matplotlib.sourceforge.net/search.html?q=subplots_adjust

The defaults can be changed in your rc file

  http://matplotlib.sourceforge.net/users/customizing.html

See also these recipes on the FAQ to automatically choose boundaries

  
http://matplotlib.sourceforge.net/faq/howto_faq.html#move-the-edge-of-an-axes-to-make-room-for-tick-labels

  
http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make-room-for-tick-labels

Automatic layout to avoid overlap is not an easy problem -- Michael
Droetboom worked on it for a while but didn't get to a satisfactory
point.  So far our philosophy has been : make it easy to customize
rather than do it automatically.  I realize this is not always a good
approach, especially in automated figure generators where you don't
have access to the data ahead of time.

JDH

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2010-09-22 Thread C M
On Wed, Sep 22, 2010 at 6:16 PM, Eric Firing  wrote:
> On 09/22/2010 10:11 AM, Russell Owen wrote:
>> On Sep 22, 2010, at 11:16 AM, Benjamin Root wrote:
>>
>>> On Wed, Sep 22, 2010 at 12:04 PM, Russell E. Owen >> > wrote:
>>>
>>>     In article <4c935c08.1000...@gmail.com
>>>     >,
>>>     Alan G Isaac mailto:alan.is...@gmail.com>>
>>>     wrote:
>>>
>>>     >
>>>     
>>> http://matplotlib.sourceforge.net/examples/pylab_examples/accented_text.html
>>>
>>>     It's realistic, and that has a lot to be said for it.
>>>
>>>     One of my problems with matplotlib is that it is far too willing to
>>>     truncate axis labels and related information. I'd be much happier
>>>     with a
>>>     layout model that always showed the axis labels in full.
>>>
>>>
>>> Ditto on this. In addition, it would be useful to prevent axes labels
>>> from spilling over into another axes' area.
>>
>> I submitted bug report #3073546 on the issue of axis labels getting
>> truncated.
>> https://sourceforge.net/tracker/?func=detail&atid=560720&aid=3073546&group_id=80706
>> 
>>
>> You might want to add your suggestion about axis labels or submit a new
>> ticket.
>
> The problem is not a bug; it is inherent in the fundamental design.
> Therefore I moved the ticket over to feature requests.  I want to keep
> the bugs list for real bugs that we can realistically expect to solve
> fairly quickly.
>
> I don't know whether Andrew Straw's wx sizer-inspired code (mplsizer
> toolkit) solves the problem or not.  My impression is that it does
> not--I think it is working with the Axes positions, not with axis and
> tick labels, which are what cause most of the difficulties.
>
> Eric

Until a more permanent solution is figured out, can anyone recommend
any workarounds, even if they are a little clunky?  I'm embedding mpl
plots in wxPython and am also finding this issue suboptimal.

Che

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2010-09-22 Thread Eric Firing
On 09/22/2010 10:11 AM, Russell Owen wrote:
> On Sep 22, 2010, at 11:16 AM, Benjamin Root wrote:
>
>> On Wed, Sep 22, 2010 at 12:04 PM, Russell E. Owen > > wrote:
>>
>> In article <4c935c08.1000...@gmail.com
>> >,
>> Alan G Isaac mailto:alan.is...@gmail.com>>
>> wrote:
>>
>> >
>> 
>> http://matplotlib.sourceforge.net/examples/pylab_examples/accented_text.html
>>
>> It's realistic, and that has a lot to be said for it.
>>
>> One of my problems with matplotlib is that it is far too willing to
>> truncate axis labels and related information. I'd be much happier
>> with a
>> layout model that always showed the axis labels in full.
>>
>>
>> Ditto on this. In addition, it would be useful to prevent axes labels
>> from spilling over into another axes' area.
>
> I submitted bug report #3073546 on the issue of axis labels getting
> truncated.
> https://sourceforge.net/tracker/?func=detail&atid=560720&aid=3073546&group_id=80706
> 
>
> You might want to add your suggestion about axis labels or submit a new
> ticket.

The problem is not a bug; it is inherent in the fundamental design. 
Therefore I moved the ticket over to feature requests.  I want to keep 
the bugs list for real bugs that we can realistically expect to solve 
fairly quickly.

I don't know whether Andrew Straw's wx sizer-inspired code (mplsizer 
toolkit) solves the problem or not.  My impression is that it does 
not--I think it is working with the Axes positions, not with axis and 
tick labels, which are what cause most of the difficulties.

Eric

>
> Regards,
>
> -- Russell
>
>
>
> --
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
>
>
>
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2010-09-22 Thread Russell Owen

On Sep 22, 2010, at 11:16 AM, Benjamin Root wrote:

On Wed, Sep 22, 2010 at 12:04 PM, Russell E. Owen   
wrote:

In article <4c935c08.1000...@gmail.com>,
 Alan G Isaac 
 wrote:

> http://matplotlib.sourceforge.net/examples/pylab_examples/accented_text.html

It's realistic, and that has a lot to be said for it.

One of my problems with matplotlib is that it is far too willing to
truncate axis labels and related information. I'd be much happier  
with a

layout model that always showed the axis labels in full.

Ditto on this.  In addition, it would be useful to prevent axes  
labels from spilling over into another axes' area.


I submitted bug report #3073546 on the issue of axis labels getting  
truncated.

https://sourceforge.net/tracker/?func=detail&atid=560720&aid=3073546&group_id=80706

You might want to add your suggestion about axis labels or submit a  
new ticket.


Regards,

-- Russell--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2010-09-22 Thread Benjamin Root
On Wed, Sep 22, 2010 at 2:28 PM, Christopher Barker
wrote:

> Benjamin Root wrote:
> > On Wed, Sep 22, 2010 at 12:04 PM, Russell E. Owen  >  I'd be much happier with a
>
> > Ditto on this.  In addition, it would be useful to prevent axes labels
> > from spilling over into another axes' area.
>
> Someone was working on a wxSizer-like layout tool for MPL -- anyone know
> what happened to that?
>
> Also -- do all MPL artists (text, etc) know enough about how big they
> are to do this at all? I recall trying to do a bit myself, and had a
> hard time finding out how big a label was, and thus didn't know where to
> put an axis so the label wouldn't be chopped off.
>
> -Chris
>
>
I think the issue was that it could not be generalized that an artist knows
its size until it comes time to render.  I think the main culprit here is
text labels (particularly latex stuff).  If it could be known what an
artist's size is when the artist is made, then I think a lot of code could
be simplified because all artists would reference itself relative to their
parent artist (think particularly how axes and figure objects have size
properties).

Although, as a counter-point, we don't want to inhibit a user's ability to
have something outside of its parents (annotations, arrows and such).  Maybe
most artists would have a property indicating whether it should be
constrained or not.

Now that I think about it even more, doing a proper layout engine would be a
headache...

Ben Root
--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2010-09-22 Thread Christopher Barker
Benjamin Root wrote:
> On Wed, Sep 22, 2010 at 12:04 PM, Russell E. Owen   I'd be much happier with a

> Ditto on this.  In addition, it would be useful to prevent axes labels 
> from spilling over into another axes' area.

Someone was working on a wxSizer-like layout tool for MPL -- anyone know 
what happened to that?

Also -- do all MPL artists (text, etc) know enough about how big they 
are to do this at all? I recall trying to do a bit myself, and had a 
hard time finding out how big a label was, and thus didn't know where to 
put an axis so the label wouldn't be chopped off.

-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

chris.bar...@noaa.gov

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2010-09-22 Thread Benjamin Root
On Wed, Sep 22, 2010 at 12:04 PM, Russell E. Owen  wrote:

> In article <4c935c08.1000...@gmail.com>,
>  Alan G Isaac 
>  wrote:
>
> >
> http://matplotlib.sourceforge.net/examples/pylab_examples/accented_text.html
>
> It's realistic, and that has a lot to be said for it.
>
> One of my problems with matplotlib is that it is far too willing to
> truncate axis labels and related information. I'd be much happier with a
> layout model that always showed the axis labels in full.
>
> -- Russell
>
>
Ditto on this.  In addition, it would be useful to prevent axes labels from
spilling over into another axes' area.

Ben Root
--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2010-09-22 Thread Russell E. Owen
In article <4c935c08.1000...@gmail.com>,
 Alan G Isaac  
 wrote:

> http://matplotlib.sourceforge.net/examples/pylab_examples/accented_text.html

It's realistic, and that has a lot to be said for it.

One of my problems with matplotlib is that it is far too willing to 
truncate axis labels and related information. I'd be much happier with a 
layout model that always showed the axis labels in full.

-- Russell


--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users