bugGNU Octave - Bugs: bug #53229, Non uniform grid color in svg...

 
 

bug #53229: Non uniform grid color in svg printout

Submitter:  Pantxo Diribarne <pantxo>
Submitted:  Mon 26 Feb 2018 10:17:26 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 28 Feb 2018 07:35:14 PM UTC, comment #3: 

Okay, if it isn't easy then this is much better than the previous behavior.  Marking as fixed and closing report.

Rik <rik5>
Group administrator
Wed 28 Feb 2018 07:07:11 PM UTC, comment #2: 


>>  Is there a way to get a proper "miter" join?

Not that I know of. As I said those are individual lines (not polylines) so gl2ps would have to be patched so that split lines are merged again when they path the depth test. I don't know how difficult it would be (BSP sorting may mix primitives), and my propositions have not received much (any) attention in gl2ps bug tracker lately.

The consequence of using "butt" linecap is that the extremities are not good looking, I admit, but this is less visible (unless you set exaggeratedly large line width) than the spurious intersections in the middle of grid lines.

Pantxo Diribarne <pantxo>
Group Member
Wed 28 Feb 2018 06:27:06 PM UTC, comment #1: 

I applied the patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/8585b3f9c28c).

Attached are close-ups of the resulting lines where they meet at the edges of the plot (square.png = original, butt.png = patched).  Is there a way to get a proper "miter" join?  That would be preferable, although we can live with this.




Rik <rik5>
Group administrator
Mon 26 Feb 2018 10:17:26 PM UTC, original submission:  

In svg output, where grid transparency is supported, I observe small dark patches along grid lines in 3D figures.


clf; axes (); view (3); grid on
print splitted_before.svg


Actually grid lines are split into smaller individual segments (probably due to depth conflicts with the back plane) and what we see is the intersections.

The attached patch is a workaround in which we use "butt" linecap for grid lines in order to avoid intersections where transparency may occur.

I also attached the svg produced before and after the patch.

Pantxo Diribarne <pantxo>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #43419:  square.png added by rik5 (75KiB - image/png)
file #43420:  butt.png added by rik5 (80KiB - image/png)
file #43405:  grid_butt.patch added by pantxo (1KiB - text/x-patch)
file #43403:  splitted_after.svg added by pantxo (47KiB - image/svg+xml)
file #43404:  splitted_before.svg added by pantxo (47KiB - image/svg+xml)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by pantxo (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-02-28 rik5 StatusPatch Reviewed Fixed
        Open/ClosedOpen Closed
    2018-02-28 rik5 Attached File- Added square.png, #43419
        Attached File- Added butt.png, #43420
        StatusNone Patch Reviewed
    2018-02-26 pantxo Attached File- Added grid_butt.patch, #43405
    2018-02-26 pantxo Attached File- Added splitted_after.svg, #43403
        Attached File- Added splitted_before.svg, #43404

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code