bugGNU Octave - Bugs: bug #38584, setting linestyle to...

 
 

bug #38584: setting linestyle to "none" for fill object causes error (gnuplot)

Submitter:  None
Submitted:  Mon 25 Mar 2013 02:07:37 AM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  lachlan
Originator Name:  John Schneeloch Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 27 Feb 2016 05:44:21 AM UTC, comment #5: 

@Lachlan: Thanks for re-discovering this bug report.  I applied your patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/e789571034bc).  Another bug bites the dust!

Rik <rik5>
Group administrator
Sat 27 Feb 2016 04:35:46 AM UTC, comment #4: 

This patch to _gnuplot_draw_axes_.m  seems to fix the problem.  It doesn't remove the entire second part, but removes the offending "with <omitted> linewidth ..." clause.

There are many paths to set the "with..." clause, and there was a catch-all saying "if it isn't set, use with <style>...", without checking that <style> was not empty.  The patch makes it check.

Rik, thanks for saying it was in gnuplot_drawnow -- that really helps those of us not as familiar with where to start looking.

(file #36486)

Lachlan Andrew <lachlan>
Sat 25 Jan 2014 05:06:20 AM UTC, comment #3: 

Fill is just a front end for the patch function.  It seems that _gnuplot_drawnow_ does not properly handle patches where the linestyle is "none".  Here is the same example done with patch.


graphics_toolkit gnuplot
hp = patch ([0 1 1 0]', [0 0 1 1]', 'r');
set (hp, 'linewidth', 10);
axis ([-1 2 -1 2])
set (hp, 'linestyle', 'none')

plot "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#ff0000" fillstyle transparent solid 1.000000 , "-" binary format='%float64' record=5 using ($1):($2) title "" with  linewidth 10.000000   lc rgb "#000000" ;


I don't use the gnuplot backend anymore but it seems like the first part of the intstructions are correct to draw an object with color #ff0000 (red).  It seems to me like the entire second part of the plot command beginning after the ',' could be removed.


Rik <rik5>
Group administrator
Fri 24 Jan 2014 09:11:43 PM UTC, comment #2: 

Still present on the development version of Octave. However, I don't get a crash or freeze. Gnuplot prints the error shown in the original report and control is returned to the Octave interpreter. However, this might behave differently on MacOS, the OP's system.

Mike Miller <mtmiller>
Group Member
Mon 25 Mar 2013 03:16:01 PM UTC, comment #1: 

Confirmed on a recent development version (3/24/13) as well.  This only affects gnuplot.  The FLTK toolkit plots this shape without problem.

Rik <rik5>
Group administrator
Mon 25 Mar 2013 02:07:37 AM UTC, original submission:  

The following code


figure
hfill = fill([0 1 1 0], [0 0 1 1], 1);
set(hfill, "linestyle", "none");


results in the following error



multiplot> plot "-" binary format='%float64' record=4 using ($1):($2) title "" with filledcurve lc rgb "#88ff77" fillstyle transparent solid 1.000000 , "-" binary format='%float64' record=5 using ($1):($2) title "" with  linewidth 0.500000   lc rgb "#000000" ;
                                                                                                                                                                                                                                       ^
           line 0: unrecognized plot type



and then it freezes until I press ctrl+c. Setting linestyle to other options (e.g., ":") works correctly, and setting linestyle to "none" for ordinary plots (e.g., h=plot(1:10); set(h,"linestyle","none")) also works as expected. I'm not sure why it doesn't work in this instance.


I'm using Octave 3.6.4 with Mac OS X 10.7.5. Here's what I get with the "ver" command:

GNU Octave Version 3.6.4
GNU Octave License: GNU General Public License
Operating System: Darwin 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64

[list of packages here]



Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lachlan (Updated the item)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by None (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 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-27 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2016-02-27 lachlan Item GroupIncorrect Result Other
        StatusConfirmed Patch Submitted
        Assigned toNone lachlan
    2016-02-27 lachlan Attached File- Added bug_38584_patch_without_lines.cset, #36486
    2014-01-24 mtmiller Item GroupSegfault, Bus Error, etc. Incorrect Result
        Release3.6.4 dev
        Operating SystemMac OS Any
    2013-10-11 rik5 Summarysetting linestyle to &quot;none&quot; for fill object causes error setting linestyle to "none" for fill object causes error (gnuplot)
    2013-03-25 rik5 CategoryPlotting Plotting with gnuplot
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code