bugGNU Octave - Bugs: bug #50996, Printing dashed line to tikz...

 
 

bug #50996: Printing dashed line to tikz device results in non-equidistant dashes

Submitter:  Alexander Wilms <alexanderw>
Submitted:  Wed 10 May 2017 06:19:45 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  3 - Low Item Group:  None
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.2.1 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 09 Nov 2017 06:45:48 AM UTC, comment #7: 

Thanks, closinr report.

Pantxo Diribarne <pantxo>
Group Member
Thu 09 Nov 2017 02:19:58 AM UTC, comment #6: 

Yes

Alexander Wilms <alexanderw>
Wed 08 Nov 2017 09:40:15 AM UTC, comment #5: 

Can we close this report as be due to an upstream bug?

Pantxo Diribarne <pantxo>
Group Member
Thu 11 May 2017 05:14:27 PM UTC, comment #4: 

I filed a bug report here:

http://gitlab.onelab.info/gl2ps/gl2ps/issues/18

Exporting to PDF is good enough for me right now. Thanks for the suggestions though.

Alexander Wilms <alexanderw>
Thu 11 May 2017 04:49:34 PM UTC, comment #3: 

Alternatively, you could use gnuplot backend
(you would need to add \usepackage{gnuplot-lua-tikz} to the tex file). Gnuplot is not as WYSIWYG so you may need to adjust fonts
etc... Attached is the file I made from your example.

Dmitri.


(file #40665)

Dmitri A. Sergatskov <dasergatskov>
Thu 11 May 2017 04:01:02 PM UTC, comment #2: 

Confirmed.  The print chain in Octave goes through gl2ps.  According to the website, support for PGF format (tikz) is listed as experimental.  That may explain it.

The quickest workaround is to use one of the many alternative formats.  In particular, if you are looking for a Latex format try something like epslatex.

If you must use tikz, I would look at developing a path that starts with one of the known good formats, such as eps, and then uses ghostscript or pstoedit to arrive at tikz.

Rik <rik5>
Group administrator
Wed 10 May 2017 06:21:27 PM UTC, comment #1: 

I meant to say curvature, not slope.

Alexander Wilms <alexanderw>
Wed 10 May 2017 06:19:45 PM UTC, original submission:  

This issue only affects the tikz output. The bigger the absolute value of the slope, the smaller do the gaps between the dashes get.


close all
x = 0:0.01:1;
y = sin(x*2*pi);
plot(x,y,'--');
print -dpdf test.pdf
print -dpng test.png
print -djpg test.jpg
print -dsvg test.svg
print -dtikz test.tikz



\documentclass{article}
\usepackage{tikz}
\begin{document}
        \resizebox{\textwidth}{!}{
                \input{test.tikz}
        }
\end{document}


Alexander Wilms <alexanderw>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #40665:  t_tikz_tex.pdf added by dasergatskov (13KiB - application/pdf)
file #40656:  unforcedresponselsim.tikz added by alexanderw (633KiB - application/octet-stream - It seems the gap is not only dependent on the curvature, since in this case it seems to get smaller and smaller the bigger t gets)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by dasergatskov (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by alexanderw (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-11-09 pantxo Open/ClosedOpen Closed
    2017-05-11 dasergatskov Attached File- Added t_tikz_tex.pdf, #40665
    2017-05-11 rik5 CategoryNone Plotting with OpenGL
        Priority5 - Normal 3 - Low
        StatusNone Confirmed
        Operating SystemMicrosoft Windows Any
    2017-05-10 alexanderw Attached File- Added unforcedresponselsim.tikz, #40656
    2017-05-10 alexanderw Attached File- Added equidistant-dashes-qt.png, #40654
        Attached File- Added non-equidistant-dashes-tikz.png, #40655

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code