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 Apr 25 12:48:36 2013  
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)

Sun Nov 20 22:20:02 2016, comment #8:

The remaining issue (comment #6) of this bug report is still present in Octave 4.2.0.

Hartmut <hardy>
Fri Jan 31 16:13:00 2014, 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 Jan 31 10:46:45 2014, 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 Jul 1 01:34:26 2013, 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 Jun 27 17:48:31 2013, 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 Jun 27 16:46:49 2013, comment #3:

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

ans =


>> get (h, 'linestyle')

ans =


>> get (h, 'marker')

ans =


The dots are hardly visible, but all blue.

Muhali <muhali>
Thu Jun 27 16:17:50 2013, 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 Jun 18 04:42:09 2013, 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 Apr 25 12:48:36 2013, 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):

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 hardy (Posted a comment)
  • -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 Jan 31 16:13:00 2014rik5Priority5 - Normal=>3 - Low
      Summaryplot(0,0) shows no dot with OpenGL=>OpenGL doesn't draw single points when no marker style is set
    Fri Jan 31 10:46:45 2014muhaliAttached File-=>Added plot_1.png, #30428
      Attached File-=>Added plot_2.png, #30429
    Mon Jul 1 06:52:51 2013muhaliAttached File-=>Added plot1.png, #28462
      Attached File-=>Added plot2.png, #28463
    Thu Jun 27 17:48:31 2013rik5StatusIn Progress=>Fixed
    Thu Jun 27 16:17:50 2013rik5StatusNone=>In Progress
    Tue Jun 18 04:42:09 2013rik5CategoryPlotting=>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-cleanup1