On Sun, Jul 18, 2010 at 1:17 PM, Benjamin Root <ben.r...@ou.edu> wrote:

>
>
> On Thu, Jul 15, 2010 at 9:13 PM, Jeff Berry <jjbe...@email.arizona.edu>wrote:
>
>> Hi,
>>
>> I'm using the new mixed axes feature in matplotlib 1.0.0 to combine 3D and
>> 2D plots in a single figure. The problem is that the 3D axes have a lot of
>> extra white space around them that prevents the plot to line up flush with
>> the 2D plot. Here is an example image of this:
>>
>> using matplotlib: 
>> http://www.u.arizona.edu/~jjberry/matplotlib.png<http://www.u.arizona.edu/%7Ejjberry/matplotlib.png>
>>
>> vs. matlab of the same thing:
>> http://www.u.arizona.edu/~jjberry/matlab.png<http://www.u.arizona.edu/%7Ejjberry/matlab.png>
>>
>> Is there any way of changing the space on the 3D axis to look more like
>> the matlab figure?
>>
>> Thanks,
>> Jeff Berry
>>
>>
>>
> Jeff, thanks for pointing this out.  An inadvertant side-effect of using
> add_subplot() for 3d axes seems to be that the creation process greatly
> restricts the available space for the 3d figure to be plotted.  Whereas
> doing the old Axes3D() approach (albeit for non-subplots) would allow the 3D
> figure to use all the available space.
>
> I am currently examining this issue right now and might be tied to another
> bug that has been reported recently.
>
> Ben Root
>

Jeff,

Sorry for taking so long to get back to you.  I have found a sort of
workaround that should help you out.

You can use subplots_adjust(left=0.0, bottom=0.0, right=1.0, top=1.0),
before creating the axes to specify that the axes objects should use all the
space available to them.  Note, this will still allow for a buffer between
the graphs, which can be adjusted using wspace and hspace keywords.

http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.subplots_adjust

I hope that helps,
Ben Root
------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to