octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #41166] scatter with mix of int and double - c


From: Carnë Draug
Subject: [Octave-bug-tracker] [bug #41166] scatter with mix of int and double - casts double to integer class
Date: Thu, 09 Jan 2014 19:07:09 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20131030 Firefox/17.0 Iceweasel/17.0.10

URL:
  <http://savannah.gnu.org/bugs/?41166>

                 Summary: scatter with mix of int and double - casts double to
integer class
                 Project: GNU Octave
            Submitted by: carandraug
            Submitted on: Thu 09 Jan 2014 19:07:08 GMT
                Category: Plotting with OpenGL
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Given two datasets with different classes, scatter seems to be doing something
funny with it:


graphics_toolkit fltk;
x = rand(10) * 3;
y = randi ([0 255], 10, "uint8");
figure; scatter (x(:), y(:));
figure; scatter (x(:), double(y(:)));


It would appear that it casts the x data (class double), to uint8 (the class
of y) since all x values are plotted as integers.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41166>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]