posted by gnutron on the Discussion forum
I am having a strange problem with dashtypes. If I use the tikz term (and then process the output with pdflatex to make a nice pdf) I see that the dashtype command makes not only the line dashed, but also the error bar on the data point (which I don't want dashed). If I use the pngcairo terminal the problem goes away. Am I doing something stupid?
Code (using gnuplot 5.0rc2:
set term tikz standalone size 5in,7in
set output "new.tex"
set multiplot layout 2,1
set lmargin at screen 0.15
set rmargin at screen 0.85
set bmargin at screen 0.51
set tmargin at screen 0.85
unset label
set xrange [-10:10]
set xtics format ''
set style line 1 lc rgb 'red'
set style line 2 lc rgb 'blue' pt 7 ps 2
set style line 3 dt 2 lc rgb 'dark-violet'
plot \
x ls 1,\
x**2 ls 2
set lmargin at screen 0.15
set rmargin at screen 0.85
set bmargin at screen 0.15
set tmargin at screen 0.49
set format x
set yrange [-1:1]
plot \
x**3 ls 3,\
'-' u 1:2:3 w yerr ls 2
0 0 0.3
e
unset multiplot
The dashtype isn't reset to
solid, when internally a type of-1is given to thedashtypeterminal function. The attached patch should fix this.I don't suppose I could get a patch for the 5.0rc2 version?
Thanks either way!
I get the following error after applying this patch, build, install, run the test script in the bug report:
And the output still shows the bug.
I don't really understand the lua script, but could it be that the patch should have:
rather than "gp dt 0"?
The problem is, that
makedoesn't rebuild the respective tex files when only the lua script was changed.So you must do a
to rebuild and reinstall the tex files.
Working now. Thanks.
So I applied your patch to my 5.0rc2 manually, and it is better now. Something is still not quite right though. See example attached. The dashtype 1 (solid line) is not recovered after others are used.
Last edit: gnutron 2014-10-04
Yes, I do also see this.
At the moment I cannot track down where this comes from. I tried to debug this, but it seems that for
ls 9the term.dashtype isn't called (but for other terminals it works fine). Using any other dt for ls 9 or not using a dt works fine.From: John Breckenridge
Date: Today 06:16:54 AM
Re: gnuplot-5.1
A side effect of the October 3, 2014 changes in term/lua/gnuplot-tikz.lua
is that 'set tics scale 0' changes grid lines from dotted to solid.
As this happens only with tikz, it probably isn't intended.
System: Slackware64-14.1 with PGF/TiKZ-2.10 in TeXLive-2013.
Thanks,
John Breckenridge
Last edit: Ethan Merritt 2014-10-07
I'll have a look at this in the next days and try to fix it.
Ok, I got a bit confused regarding when to apply a dashtype and when not. I had missed that LT_AXIS and LT_SOLID should also affect the dashtype, and that no separate call to term.dashtype is done in those cases.
The attached patch hopefully fixes this. As test document I used:
Attached you also find the result of the test document.
I've applied this to CVS for 5.0 and 5.1
Let me know if there are any more fixes or tweaks needed.
This may be more of a "feature" than a "bug" but I noticed that the pt 12 and pt 13 (open and solid diamonds) don't look like squares that have been rotated by 45 degrees in the tikz terminal. They look more like skinny diamonds. This doesn't match the pngcairo term for example. It would look cooler if they were squares that were rotated by 45 degrees (IMO).
Last edit: gnutron 2014-10-17
I would've guessed, that the tikz-way of drawing these diamonds is the better one. If you rather want rotated squares, you can redefine the respective point marks using the
headerterminal option:Note, that you'll need the fix I posted in https://sourceforge.net/p/gnuplot/bugs/1503/ to use the
headeroption.Ah, neat. Thanks for the tip!