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

Submitter:  Muhali <muhali>
Submitted:  Thu 25 Apr 2013 12:48:36 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  3 - Low Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 19 Apr 2023 02:17:43 AM UTC, comment #9: 

issue still exists in Octave 8.2.0

Nicholas Jankowski <nrjank>
Group Member
Sun 20 Nov 2016 10:20:02 PM UTC, comment #8: 

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

Hartmut <hardy>
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


plot ([NaN 1 NaN], 'o-')


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>
Group administrator
Fri 31 Jan 2014 10:46:45 AM UTC, comment #6: 

I noticed that for


plot([1 1 nan 1 nan 1 1])


the center 1 is not displayed (unlike ML).

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



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?


plot (1:5, 1)
plot (1:5, 1, 'o')


Rik <rik5>
Group 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>
Group 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?


h = plot (0,0);
get (h, 'type')
get (h, 'linestyle')
get (h, 'marker')


Also, does the color rotate?  For example


plot (0,0);
hold on
plot (1,1);
plot (2,2);


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

Rik <rik5>
Group 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>
Group administrator
Thu 25 Apr 2013 12:48:36 PM UTC, original submission:  

I noticed that


plot(0,0)


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 Files:
   
   
Comment:
   

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2023-04-19 nrjank Operating SystemGNU/Linux Any
    2014-01-31 rik5 Priority5 - 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
    2014-01-31 muhali Attached File- Added plot_1.png, #30428
        Attached File- Added plot_2.png, #30429
    2013-07-01 muhali Attached File- Added plot1.png, #28462
        Attached File- Added plot2.png, #28463
    2013-06-27 rik5 StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2013-06-27 rik5 StatusNone In Progress
    2013-06-18 rik5 CategoryPlotting Plotting with OpenGL
        Summaryplot(0,0) without dot plot(0,0) shows no dot with OpenGL

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code