Discussion:
[Matplotlib-users] 3D surface plot with box frame
Dawes, Andrew M.
2014-06-26 23:42:46 UTC
Permalink
I’m trying to plot a 3d surface with a box frame around both sides (see example in the following link)

comparable example:
Loading Image...

I made the axis panes white and disabled the grid which gets me 80% of the way. I don’t see anything obvious for showing additional axis lines to make the rest of the box (if such an option exists).

Any suggestions/hacks are welcome!

Thanks, Andy
--
Andrew M.C. Dawes
Associate Professor of Physics
Pacific University
amcdawes.com
Benjamin Root
2014-06-27 01:26:52 UTC
Permalink
If you supply the code you did to get where you got, I have a rough idea
how to get what you need. Essentially, you need to set the edgecolor of the
panes, I think. I have to dig a bit in the code to see how to do that,
though.


Cheers!
Ben Root
Post by Dawes, Andrew M.
I’m trying to plot a 3d surface with a box frame around both sides (see
example in the following link)
http://cloud.originlab.com/www/products/images2/3DGraph_ColorSurface.png
I made the axis panes white and disabled the grid which gets me 80% of
the way. I don’t see anything obvious for showing additional axis lines to
make the rest of the box (if such an option exists).
Any suggestions/hacks are welcome!
Thanks, Andy
--
Andrew M.C. Dawes
Associate Professor of Physics
Pacific University
amcdawes.com
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Dawes, Andrew M.
2014-06-27 18:04:24 UTC
Permalink
Thanks Ben for the tip on edgecolor. I’ve got what I wanted now and since it took some digging and tinkering I figured I’d write it up and share the solution with anyone who may want it:

https://dawes.wordpress.com/2014/06/27/publication-ready-3d-figures-from-matplotlib/

and full test-case script here:

https://github.com/DawesLab/Qfunction/blob/master/TestQfunc.py

This creates two surface plots with contours below them, labels placed tight to the axes, and some other bits that make it work well for publishing in a two-column journal (black & white, color online).

I’m happy to format and post this to the official documentation if that would be helpful.

Best,
Andy
--
Andrew M.C. Dawes
Associate Professor of Physics
Pacific University
amcdawes.com


On June 26, 2014 at 6:27:10 PM, Benjamin Root (***@ou.edu<mailto:***@ou.edu>) wrote:

If you supply the code you did to get where you got, I have a rough idea how to get what you need. Essentially, you need to set the edgecolor of the panes, I think. I have to dig a bit in the code to see how to do that, though.


Cheers!
Ben Root



On Thu, Jun 26, 2014 at 7:42 PM, Dawes, Andrew M. <***@pacificu.edu<mailto:***@pacificu.edu>> wrote:
I’m trying to plot a 3d surface with a box frame around both sides (see example in the following link)

comparable example:
http://cloud.originlab.com/www/products/images2/3DGraph_ColorSurface.png

I made the axis panes white and disabled the grid which gets me 80% of the way. I don’t see anything obvious for showing additional axis lines to make the rest of the box (if such an option exists).

Any suggestions/hacks are welcome!

Thanks, Andy
--
Andrew M.C. Dawes
Associate Professor of Physics
Pacific University
amcdawes.com<http://amcdawes.com>

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Matplotlib-users mailing list
Matplotlib-***@lists.sourceforge.net<mailto:Matplotlib-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Sturla Molden
2014-06-28 17:14:23 UTC
Permalink
Post by Dawes, Andrew M.
Any suggestions/hacks are welcome!
Mayavi (a VTK-based plotting tool) is much better for 3D plots:

http://docs.enthought.com/mayavi/mayavi/auto/examples.html
http://docs.enthought.com/mayavi/mayavi/mlab.html


Sturla

Loading...