# HG changeset patch # User Rik # Date 1398276090 25200 # Node ID 652d9ed6f88d75847faf9e3ea022d0c07e121a59 # Parent 900b524d907279103bf81d2edf6eaaeb2d509b84 Fix printing of axis grid lines above/below line objects based on "layer". * gl2ps-renderer.cc (draw): For 2D plots, use GL2PS_SIMPLE_SORT for Z-depth sorting rather than GL2PS_NO_SORT which does no calculation whatsoever. diff -r 900b524d9072 -r 652d9ed6f88d libinterp/corefcn/gl2ps-renderer.cc --- a/libinterp/corefcn/gl2ps-renderer.cc Sat Apr 19 09:28:20 2014 -0700 +++ b/libinterp/corefcn/gl2ps-renderer.cc Wed Apr 23 11:01:30 2014 -0700 @@ -53,8 +53,8 @@ GLint gl2ps_term; if (term.find ("eps") != std::string::npos) gl2ps_term = GL2PS_EPS; else if (term.find ("pdf") != std::string::npos) gl2ps_term = GL2PS_PDF; + else if (term.find ("ps") != std::string::npos) gl2ps_term = GL2PS_PS; else if (term.find ("svg") != std::string::npos) gl2ps_term = GL2PS_SVG; - else if (term.find ("ps") != std::string::npos) gl2ps_term = GL2PS_PS; else if (term.find ("pgf") != std::string::npos) gl2ps_term = GL2PS_PGF; else if (term.find ("tex") != std::string::npos) gl2ps_term = GL2PS_TEX; else @@ -68,7 +68,9 @@ // Default sort order optimizes for 3D plots GLint gl2ps_sort = GL2PS_BSP_SORT; - if (term.find ("is2D") != std::string::npos) gl2ps_sort = GL2PS_NO_SORT; + // For 2D plots we can use a simpler Z-depth sorting algorithm + if (term.find ("is2D") != std::string::npos) + gl2ps_sort = GL2PS_SIMPLE_SORT; while (state == GL2PS_OVERFLOW) {