bugGNU Octave - Bugs: bug #33976, patch 'facecolor' property not...

 
 

bug #33976: patch 'facecolor' property not working

Submitter:  Travis <tsixel>
Submitted:  Tue 09 Aug 2011 04:09:13 PM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Works For Me Assigned to:  None
Originator Name:  Travis Open/Closed:  * Closed
Release:  * 3.2.4 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 11 Aug 2011 01:48:08 PM UTC, comment #3: 

Your patch command only specifies two vertices.

patch([80 400], [43.2, 188.4], 'FaceColor','white')

Thus, it will only draw a line. Lines do not have faces.

If you want a polygon, you need to add the missing vertices.

patch([80 80 400 400], [0 43.2 188.4 0], 'FaceColor','white')


Ben Abbott <bpabbott>
Group Member
Thu 11 Aug 2011 01:04:20 PM UTC, comment #2: 

I will try to better the explain the problem I am experiencing.

I am running the below commands:

Ps = [80, 400]
Qmin = [43.2, 188.4]
Qmax = [146.3, 637.8]

area(Ps, Qmax)
axis([80, 400])
patch(Ps, Qmin, 'FaceColor','white')

However, in the patch command the facecolor is not being assigned in the graph.  I have tried adjusting the facealpha, but this appears to make no difference.  Please see the attached PDF for further information.

(file #23783)

Travis <tsixel>
Wed 10 Aug 2011 11:59:25 PM UTC, comment #1: 

I think the problem is with the syntax you used for the patch command.

The proper equivalent for "area(Ps,Qmax)" is ...


patch (ps([1 1 2 2]),[0 qmax 0], "FaceColor", "blue")


In any event, to get what you want you can either ...


h = area (Ps, Qmax)
set (h, 'FaceColor', 'white')


... or ...


area (ps,qmax, 'FaceColor', 'white')



Ben Abbott <bpabbott>
Group Member
Tue 09 Aug 2011 04:09:13 PM UTC, original submission:  

After creating an area plot using the following:

Ps = [80, 400]
Qmax = [100, 500]
Qmin = [20, 185]
area(Ps, Qmax)

The following color request does not get applied to the plot:
patch(Ps, Qmin, 'FaceColor', 'white')

There appears to be no color applied at all.

Travis <tsixel>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #23783:  Octave problem.pdf added by tsixel (84KiB - application/pdf)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by tsixel (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-08-11 bpabbott Open/ClosedOpen Closed
    2011-08-11 tsixel Attached File- Added Octave problem.pdf, #23783
    2011-08-10 bpabbott StatusNone Works For Me

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code