Matplotlib 3D plot zorder issue

前端 未结 1 669
余生分开走
余生分开走 2020-12-06 11:16

I have a plot consisting of a blue surface (plotted via plot_surface) and a red sphere (plotted via scatter). The zorder of the surface is set to 0

相关标签:
1条回答
  • 2020-12-06 12:16

    This is still an issue in Matplotlib 1.5.3 (2016). The alternative that @tacaswell (who is a co-lead on Matplotlib dev) recommends is to handle 3D plotting using Mayavi which is relatively unique amongst Python plotting libraries in that it does not use Matplotlib as a backend like many other projects do (Pandas, Seaborn, ggplot).

    I was able to install Mayavi on OSX with a minimum of fuss using Homebrew and pip.

    #/bin/bash
    # vtk is a mayavi requirement
    brew install vtk
    pip install mayavi
    # Port your matplotlib code to mayavi
    # Profit...
    
    0 讨论(0)
提交回复
热议问题