bugGNU Octave - Bugs: bug #38825, OpenGL doesn't draw single points...

 
 

bug #38825: OpenGL doesn't draw single points when no marker style is set

Submitted by:  Muhali <muhali>
Submitted on:  Thu 25 Apr 2013 12:48:36 PM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 3 - LowItem Group: Matlab Compatibility
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich 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)

Fri 31 Jan 2014 04:13:00 PM UTC, comment #7:

This is the same bug in a different disguise. Octave doesn't draw line segments where one of the end points is a NaN. A sequence like [NaN 1 NaN] effectively has two line segments, each of which has an endpoint of NaN which removes the segment from plotting.

A workaround is to add a marker style to the plot such as

I'll re-title the bug and re-open it, but since this has a workaround I'm going to lower the priority.

Rik <rik5>
Project Administrator
Fri 31 Jan 2014 10:46:45 AM UTC, comment #6:

I noticed that for

the center 1 is not displayed (unlike ML).

I also attach the two ML figures that you requested last time (sorry I forgot).

(file #30428, file #30429)

Muhali <muhali>
Mon 01 Jul 2013 01:34:26 AM UTC, comment #5:

I fixed the plot routines for samples like plot(0,0) which are an example of scalar/scalar inputs. Could you test how Matlab behaves for vector/scalar inputs? Right now Octave is definitely wrong because it doesn't plot anything unless you add a marker style to the plot command. Could you run the following commands and upload a png of each plot?

Rik <rik5>
Project Administrator
Thu 27 Jun 2013 05:48:31 PM UTC, comment #4:

I checked in a changeset that seems to do the job (http://hg.savannah.gnu.org/hgweb/octave/rev/804d26cf8e5b). It sets the marker type to '.' whenever there is only a single point to be plotted an no other marker has been specified. It is not exactly compatible with Matlab which sets the marker to "none" but I'm not interested in chasing compatibility any further.

Rik <rik5>
Project Administrator
Thu 27 Jun 2013 04:46:49 PM UTC, comment #3:

>> h = plot (0,0);
>> get (h, 'type')


ans =

line

>> get (h, 'linestyle')


ans =

-

>> get (h, 'marker')


ans =

none

-------------------------
The dots are hardly visible, but all blue.

Muhali <muhali>
Thu 27 Jun 2013 04:17:50 PM UTC, comment #2:

Just to get an idea of what is happening, what does the following return in Matlab?

Also, does the color rotate? For example

Does this produce 3 dots of the same color or 3 differently colored dots?

Rik <rik5>
Project Administrator
Tue 18 Jun 2013 04:42:09 AM UTC, comment #1:

I changed the bug description since the code works for gnuplot.

The problem seems to be that the default linestyle is '-' which draws lines between points but does not draw the points itself. This is fine whether there are more than 1 points so that the line is actually drawn. In the special case of a single point, FLTK or OpenGL should draw at least something.

Rik <rik5>
Project Administrator
Thu 25 Apr 2013 12:48:36 PM UTC, original submission:

I noticed that

creates a tiny dot at (0,0) in ML but not so in octave. One consequence is that time series such as (1,nan,1,nan,1,...) are visible only in ML. They only become visible in octave with markers.

Muhali <muhali>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #30428:  plot_1.png added by muhali (3kB - image/png)
file #30429:  plot_2.png added by muhali (3kB - image/png)
file #28462:  plot1.png added by muhali (7kB - image/png)
file #28463:  plot2.png added by muhali (7kB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by muhali (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 13 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 31 Jan 2014 04:13:00 PM UTCrik5Priority5 - Normal=>3 - Low
      StatusFixed=>Confirmed
      Open/ClosedClosed=>Open
      Summaryplot(0,0) shows no dot with OpenGL=>OpenGL doesn't draw single points when no marker style is set
    Fri 31 Jan 2014 10:46:45 AM UTCmuhaliAttached File-=>Added plot_1.png, #30428
      Attached File-=>Added plot_2.png, #30429
    Mon 01 Jul 2013 06:52:51 AM UTCmuhaliAttached File-=>Added plot1.png, #28462
      Attached File-=>Added plot2.png, #28463
    Thu 27 Jun 2013 05:48:31 PM UTCrik5StatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Thu 27 Jun 2013 04:17:50 PM UTCrik5StatusNone=>In Progress
    Tue 18 Jun 2013 04:42:09 AM UTCrik5CategoryPlotting=>Plotting with OpenGL
      Summaryplot(0,0) without dot=>plot(0,0) shows no dot with OpenGL

    Back to the top


    Powered by Savane 3.1-cleanup