bugGNU Octave - Bugs: bug #34143, set (h, "linewidth", 0)...

 
 

bug #34143: set (h, "linewidth", 0) still shows line on screen

Submitter:  None
Submitted:  Fri 26 Aug 2011 09:41:23 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.4.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 20 Feb 2012 09:13:06 PM UTC, comment #5: 

Closing bug report now that there is a task tracker issue to take care of the real issue of validating numeric property inputs to make sure they are sensible (not negative, possibly greater than 0, etc.)

Rik <rik5>
Group administrator
Thu 01 Sep 2011 06:21:15 PM UTC, comment #4: 

I entered a task in the tracker.

https://savannah.gnu.org/task/index.php?11311

Ben Abbott <bpabbott>
Group Member
Thu 01 Sep 2011 06:14:45 PM UTC, comment #3: 

Matlab gives ...


>> set (h, 'linewidth', 0);
??? Error using ==> set
Value must be finite and greater than zero


Personally, I prefer Octave's behavior. However, I notice that Octave allows the linewidth to have negative values.

Should there exist a method to do limits checking on properties?

Perhaps a task should be added to the "task" tracker?

Ben Abbott <bpabbott>
Group Member
Wed 31 Aug 2011 04:38:57 PM UTC, comment #2: 

I'm retitling this bug report to reflect issue #3 which seems to exist.  Simplified code to show problem.


h = plot (1:10);
set (h, "linewidth", 0);


The plot still shows a line.  It would be useful if someone with Matlab could confirm what they do in this case.

One possible solution is to link linewidth with linestyle so that when linewidth is set to 0 then linestyle is set to "none".

Rik <rik5>
Group administrator
Wed 31 Aug 2011 04:36:44 PM UTC, comment #1: 

Issues 1 and 2 are due to a misunderstanding of the plot system.  To remove lines entirely from a plot you need to set the linestyle to "none".  If you want the individual points to have a shape then you need to set their marker value to something besides "none".  Here is some sample code


h = plot (1:10);  # Plot simple line
set (h, "linestyle", "none");  # remove line from plot
set (h, "marker", ".");  # place small dot at each point


Use "get (h)" to see the other marker properties you can set such as color and size.

For issue 2, try "help legend".


legend ("key label");  # Put a legend on plot with string "key label"



Rik <rik5>
Group administrator
Fri 26 Aug 2011 09:41:23 PM UTC, original submission:  

1)
 set(h1,"linestyle",':')  # no change on plot
 set(h1,"linestyle",'^')  # triangle marker plus line
 set(h1,"linestyle",'.') 
error: invalid value = .
error: set: invalid value for radio property "linestyle" (value = .)

how to achieve equivalent to supplying a dot to plot() ?

plot(x,y,'.'); # fine dot for each point, no line.

2)
how to set key title as per plot() :

plot(x,y,'-;key title;');

3)
setting linewidth=0 accepted but still drawn with finite width.

 set(h1,"linewidth",0) # no change visible
 get(h1,"linewidth")
ans = 0

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  •  

    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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-12 mtmiller Dependencies- bugs #48469 is dependent
    2012-02-20 rik5 Open/ClosedOpen Closed
    2011-08-31 rik5 StatusNone Confirmed
    2011-08-31 rik5 CategoryPlotting with gnuplot Plotting
        Summaryapparent inconsistencies / bugs in line properties set (h, "linewidth", 0) still shows line on screen

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code