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

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

[Octave-bug-tracker] [bug #45541] Automatically scale values before plot


From: anonymous
Subject: [Octave-bug-tracker] [bug #45541] Automatically scale values before plotting
Date: Wed, 15 Jul 2015 17:05:07 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0

Follow-up Comment #4, bug #45541 (project octave):

With toolkit, I do not mean the interface between Octave and FLTK, I mean FLTK
itself. If I created a GUI toolkit (I have considered to do so since I am not
happy with any existing one), I would use Window coordinates between -1 and 1.
So the line drawing API, for the "Canvas" widget would simply look like

    void lineDraw(Canvas* c,const float* x,const float* y,size_t n_points);

Or

    void lineDraw(Canvas* c,const Point* x,size_t n_points);

As a user of that function, I do not need to ask for the width, since I know
that the scaling is invariant. All I need to do before calling the function is
to make sure all values are in the correct range, and that is trivial. The
only problem is aspect ratio, but that can be solved by choose a fixed y range
[-1 1] and add

    float widthGet(Canvas* c);

It is now left to Octave to call these functions with appropriate values.
Compatible with Matlab? Yes.

I am not an expert in Octave, but I know that the `plot` command is a
high-level routine, so the `plot` command should not do the work, it is more
low-level than that.

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Meddelandet skickades via/av Savannah
  http://savannah.gnu.org/




reply via email to

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