[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #47974] Visual differences between gnuplot and

From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #47974] Visual differences between gnuplot and OpenGL toolkits
Date: Mon, 19 Sep 2016 20:47:33 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0

Follow-up Comment #71, bug #47974 (project octave):

Having done a mod to gnuplot_toolkit color processing this weekend, I was
reminded there is at least one issue in this bug report that is unresolved:
the line pattern.

The polar plot examples, seem to have changed, so the better illustration is

demo polar 3
demo waterfall 1


demo line 1
demo waterfall 1

The odd thing is that the above needs to be entered separately at the command
line.  If I place the two lines in an external file and call that script, the
dotted line does not appear in the waterfall.  Maybe that has something to do
with the underlying manner in which Octave creates a gnuplot process for each
different figure--but not relevant here.

The solution to this incorrect line pattern seems to be straightforward.  I
think that "linetype" is a persistent gnuplot setting, i.e., "reset" in
gnuplot does not alter the line styles for any lines set using "linetype".  I
can't think of why Octave would ever want gnuplot to have a persistent setting
of this particular characteristic.  Instead, if we stick to the use of "set
style line" and use "linestyle", we should be fine.  That is, Octave's
strategy seems to be a completely clean slate with each new gnuplot figure.

A simple illustration is to change __gnuplot_has_feature__.m in a way that
forces the use of "linestyle" rather than "linetype".  I.e., 

diff --git a/scripts/plot/util/private/__gnuplot_has_feature__.m
--- a/scripts/plot/util/private/__gnuplot_has_feature__.m
+++ b/scripts/plot/util/private/__gnuplot_has_feature__.m
@@ -44,7 +44,7 @@ function res = __gnuplot_has_feature__ (
       ## Don't throw an error if gnuplot isn't installed
       gnuplot_version = "0.0.0";
-    versions  = {"4.4", "4.6", "4.6", "5.0", "4.6", "4.6", "5.0", "5.0",
+    versions  = {"4.4", "4.6", "10.6", "5.0", "4.6", "4.6", "5.0", "5.0",
     operators = {">=" , ">=" , ">=" , ">=" , ">=" , ">=" , ">=" , ">=" , ">="
     have_features = false (size (features));
     for n = 1 : numel (have_features)

Attached is a patch that gets ride of all the code hunks in
__gnuplot_draw_axes__.m (the only file using "linetype") of the form

if (__gnuplot_has_feature__ ("linetype"))

(file #38557)

Additional Item Attachment:

File name: octave-gnuplot_linestyle_bug47974-djs2016sep19.patch Size:5 KB


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]