octave-maintainers
[Top][All Lists]
Advanced

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

Octave-forge mailing list for bug reports? Bug in tics()


From: Peter Gustafson
Subject: Octave-forge mailing list for bug reports? Bug in tics()
Date: Thu, 09 Aug 2007 07:15:32 -0400
User-agent: Thunderbird 2.0.0.6 (X11/20070804)

Does the sourceforge mailing list for octave-forge developers still work?

I found a bug in tics and sent a patch (attached to this message), but
haven't seen any response or other traffic on the list after joining
it.  I'm sure somebody here knows.  Where do I send patches for
octave-forge?

Thanks,

Pete

--- Begin Message --- Subject: [OctDev] Bug in tics... Only works for x axis. Date: Thu, 02 Aug 2007 10:17:20 -0400 User-agent: Thunderbird 2.0.0.5 (X11/20070726)
Hi,

The tics currently available on octave-forge sets the x axis only, even
when a different axis is specified.  Further, once strings are specified
instead of the default numbers, numbers won't return until the a new
axis object is generated (if you try and reset it with the tics command).

The attached version of tics should work.  Please review.  Thanks,

Pete Gustafson


## tics(axis,[pos1,pos2,...],['lab1';'lab2';...])
##
## Explicitly set the tic positions and labels for the given axis.
##
## If no positions or labels are given, then restore the default.
## If positions are given but no labels, use those positions with the
## normal labels.  If positions and labels are given, each position
## labeled with the corresponding row from the label matrix.
##
## Axis is 'x', 'y' or 'z'.

## This program is in the public domain
## Author: Paul Kienzle <address@hidden>

## Modified to use new gnuplot interface in octave > 2.9.0
## Dmitri A. Sergatskov <address@hidden>
## April 18, 2005

## Modified to properly set y and z axes as well > 2.9.0
## Peter A Gustafson <address@hidden>
## August 1, 2007

function tics(axis,pos,lab)

  if nargin > 0
    axis=lower(axis);
    switch (axis)
      case ('x')
      case ('y')
      case ('z')
      otherwise
        nargin=4;
    endswitch
  endif

  if nargin == 1
    set (gca(), sprintf("%stick",axis), []);
    set (gca(), sprintf("%stickmode",axis), "auto");
    set (gca(), sprintf("%sticklabel",axis), "");
    set (gca(), sprintf("%sticklabelmode",axis), "auto");
  elseif nargin == 2
    set (gca(), sprintf("%stick",axis), pos);
    set (gca(), sprintf("%sticklabel",axis), "");
    set (gca(), sprintf("%sticklabelmode",axis), "auto");
  elseif nargin == 3
    set (gca(), sprintf("%stick",axis), pos);
    set (gca(), sprintf("%sticklabel",axis), lab);
  else
    usage("tics(axis,[pos1,pos2,...],['lab1';'lab2';...])");
  endif

endfunction
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Octave-dev mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/octave-dev

--- End Message ---

reply via email to

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