help-octave
[Top][All Lists]
Advanced

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

Re: figure() and AquaTerm


From: Joe Koski
Subject: Re: figure() and AquaTerm
Date: Mon, 28 Nov 2005 14:15:30 -0700
User-agent: Microsoft-Entourage/11.2.1.051004

on 11/28/05 1:14 PM, RenE J.V. Bertin at address@hidden wrote:

> This part of my reply to John should have gone to the list:
> 
> 
>>> | and thus am confident that it will be incorporated ;)
>>> 
>>> If you want changes to be included in Octave, then you should
>> 
>> That was a bit tongue-in-cheek too. I've seen the requirements and don't have
>> the time to figure out how to do all that in the way it apparently has to be
>> done. Not right now. Maybe someone else who sees a use in this patch would
>> care to take the necessary actions?
> 
> For clarity: my patch allows the figure command to be used under Mac
> OS X with gnuplot's output device set to 'aqua', so that it uses the
> AquaTerm graphics terminal. It does this by checking for the presence
> of the GNUTERM env.variable: if set, the output device is set to its
> value. In the current implementation, only the X11 and aqua devices
> are accepted, though. I also replaced the (apparently) deprecated gset
> call by the suggested call to __gnuplot_set__.
> 

To avoid the AquaTerm definition problem on my Mac, I keep

  export GNUTERM=aqua
  export DISPLAY=:0.0

in my .bash_profile in the home directory.

I've also used a local version of figure.m on my Mac for about a year
without problems. It is shown below in case another Mac user finds a use for
it. Unwrap the long __gnuplot_set__ line near the end before use.

This figure.m allows for changing AquaTerm fonts and font size from plot to
plot with use of any available Mac fonts. I just keep it in the local
directory with my other .m scripts, so that octave grabs the local figure.m
version before the installed version. Note that a global statement is used
to transfer fontname and fontsize to figure.m, and you can set the fontname
and fontsize only once before you invoke each figure.m. To use the normal
figure.m command, just rename or delete the local version.

Joe

function f = figure(n);
# Routine to set AquaTerm parameters (consistent with octave figure(n))
global fontname fontsize

% set default font type
if(isempty(fontname)==1)
   fontname="'ArialMT'";
endif

% set default font name
if(isempty(fontsize)==1)
   fontsize = 24;
endif   

  static figure_list = create_set (0);

  if (nargin == 0)
    f = max (figure_list) + 1;
  else
    f = n;
  endif

n_str=int2str(f);
figure_title=(['"Figure ',n_str,'"']);

oneplot();

__gnuplot_set__(sprintf("term aqua %d title %s fname %s fsize %d\n", f,
figure_title,fontname,fontsize));

  figure_list = union (figure_list, f);






-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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