bugGNU Octave - Bugs: bug #30564, Can't draw five- or six-pointed...

 
 

bug #30564: Can't draw five- or six-pointed star, left or right triangle markers on plots

Submitted by:  Steve Chapel <schapel>
Submitted on:  Tue 27 Jul 2010 02:00:53 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: Ben Abbott <bpabbott>
Originator Name: Open/Closed: Closed
Release: 3.2.4Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Thu 02 Sep 2010 11:43:48 PM UTC, comment #10:

I'm closing this ticket.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Tue 31 Aug 2010 09:01:31 PM UTC, comment #9:

I left it open in case anyone wanted to discuss approaching the Gnuplot developers or in case someone had an approach to solving the problem I'd not thought of.

I'm ok with closing it now.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Tue 31 Aug 2010 08:39:08 PM UTC, comment #8:

Why leave an Octave bug report open for a missing feature in gnuplot?

D.

David Bateman <dbateman>
Project Member
Mon 30 Aug 2010 11:10:58 PM UTC, comment #7:

I've pushed a changeset to use gnuplot's pentagon for the marker, "p".

http://hg.savannah.gnu.org/hgweb/octave/rev/2f9de135e7f9

I think the preferred solution to add the ">", "<", and "h" markers for the gnuplot backend should would be to add these marker's go gnuplot (upstream).

I'll leave this open for now in case others would like to comment.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Mon 30 Aug 2010 11:01:52 PM UTC, comment #6:

I've pushed a changeset that adds the pentagram and hexagram markers to the OpenGL renderer.

http://hg.savannah.gnu.org/hgweb/octave/rev/f56255a2b890

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Mon 30 Aug 2010 01:41:03 AM UTC, comment #5:

After a bit of googling, I learned that OpenGL can only draw convex polygons. Fortunately, the vertices for these concave shapes may be ordered to that the restrictions of OpenGL will properly render their concave shape.

I've attached a modified changeset (changeset-fltk-2.patch) and pictures of the oversized markers with the reordered vertices.

(file #21343, file #21344, file #21345)

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Sun 29 Aug 2010 09:53:43 PM UTC, comment #4:

I took a look at the GL code. My first impression was that this was low hanging fruit, so I made an attempt. I've attached a changeset and some pictures of the results.

For a reason, I don't understand the fill isn't working properly.

Also the defined geometry of the markers appear to invert vertically when drawn.

(file #21340, file #21341, file #21342)

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Sun 29 Aug 2010 07:15:38 PM UTC, comment #3:

Turns out that gnuplot has a pentagon pointtype that can be used in place of the expected pentagram.

I've attached trivial changeset and a list of gnuplot's pointtypes.

The pentagon does not work for the x11 or aqua terminals, but does for postscript.

If there are no objections, I'll push this change.

(file #21336, file #21337)

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Sun 29 Aug 2010 02:40:18 PM UTC, comment #2:

The current opengl_renderer also doesn't appear to support five or six pointed stars. It would be helpful if someone would prepare a changeset to add that feature.

John W. Eaton <jwe>
Project Administrator
Tue 27 Jul 2010 04:06:14 PM UTC, comment #1:

This is a limitation of gnuplot. Once the FLTK backend is complete, the marker types will be supported.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Tue 27 Jul 2010 02:00:53 PM UTC, original submission:

The following code:

x = linspace(0, 2*pi, 50);
plot(x, sin(x), "p", x, cos(x), "h", x, sin(2x)+cos(3x), "<", x, x/3, ">");
pause;

should draw four lines with different markers: 5-pointed star, 6-pointed star, left triangle, and right triangle, respectively. Instead, the plot is drawn with markers of square, diamond, down triangle, and up triangle, respectively.

Steve Chapel <schapel>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #21348:  fltk-h-3.pdf added by bpabbott (3KiB - application/pdf - third attempt for the fltk backend)
file #21346:  changeset-fltk-3.patch added by bpabbott (2KiB - application/octet-stream - third attempt for the fltk backend)
file #21347:  fltk-p-3.pdf added by bpabbott (3KiB - application/pdf - third attempt for the fltk backend)
file #21336:  changeset.patch added by bpabbott (5KiB - application/octet-stream - gp changeset to add pentagon)
file #21337:  gnuplot-pointtypes.pdf added by bpabbott (60KiB - application/pdf - gp changeset to add pentagon)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dbateman (Posted a comment)
  • -unavailable- added by bpabbott (Shai, I've cc'd, hoping you have some insight.)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by schapel (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 23 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 02 Sep 2010 11:43:48 PM UTCbpabbottOpen/ClosedOpen=>Closed
    Mon 30 Aug 2010 11:01:52 PM UTCbpabbottStatusIn Progress=>Fixed
      Assigned toNone=>bpabbott
    Mon 30 Aug 2010 02:12:50 AM UTCbpabbottAttached File-=>Added changeset-fltk-3.patch, #21346
      Attached File-=>Added fltk-p-3.pdf, #21347
      Attached File-=>Added fltk-h-3.pdf, #21348
    Mon 30 Aug 2010 02:11:57 AM UTCbpabbottAttached File#21342=>Removed
    Mon 30 Aug 2010 02:11:53 AM UTCbpabbottAttached File#21341=>Removed
    Mon 30 Aug 2010 02:11:49 AM UTCbpabbottAttached File#21340=>Removed
    Mon 30 Aug 2010 02:11:45 AM UTCbpabbottAttached File#21345=>Removed
    Mon 30 Aug 2010 02:11:41 AM UTCbpabbottAttached File#21344=>Removed
    Mon 30 Aug 2010 02:11:34 AM UTCbpabbottAttached File#21343=>Removed
    Mon 30 Aug 2010 01:41:03 AM UTCbpabbottAttached File-=>Added changeset-fltk-2.patch, #21343
      Attached File-=>Added fltk-h-2.pdf, #21344
      Attached File-=>Added fltk-p-2.pdf, #21345
    Sun 29 Aug 2010 09:53:43 PM UTCbpabbottAttached File-=>Added changeset-fltk.patch, #21340
      Attached File-=>Added flkt-p.pdf, #21341
      Attached File-=>Added fltk-h.pdf, #21342
      Carbon-Copy-=>Added -unavailable-
    Sun 29 Aug 2010 07:15:38 PM UTCbpabbottAttached File-=>Added changeset.patch, #21336
      Attached File-=>Added gnuplot-pointtypes.pdf, #21337
      StatusWont Fix=>In Progress
    Tue 27 Jul 2010 04:06:14 PM UTCbpabbottStatusNone=>Wont Fix

    Back to the top


    Powered by Savane 3.1-cleanup1