[26200] in Athena Bugs

home help back first fref pref prev next nref lref last post

linux 9.3.16: Matlab R14

daemon@ATHENA.MIT.EDU (Nayden D Kambouchev)
Sun Nov 28 14:42:10 2004

Message-Id: <200411281941.iASJfbOh010257@m37-318-5.mit.edu>
To: bugs@mit.edu
Date: Sun, 28 Nov 2004 14:41:37 -0500
From: Nayden D Kambouchev <nayden@mit.edu>
Errors-To: bugs-bounces@mit.edu

System name:		m37-318-5.mit.edu
Type and version:	i686 9.3.16
Display type:		Intel Corp. 82865G Integrated Graphics Device (rev 02)

Shell:			/bin/athena/tcsh
Window manager:		sawfish

What were you trying to do?
	Generate some nice plots.  Chances are this bug needs to be refered to Mathworks.

What's wrong:
	The label fonts print incorrectly. Open the eps figures generated by the attached code with gv and you will see some problems.  Better yet print the figures and the problem will be even more obvious.  

What should have happened:
	Well, seems like that incorrect font types are written to the eps files and that causes the labels to look bad when printed.  The labels on the screen are OK.

Please describe any relevant documentation references:
	I am using Matlab R14 SP1 (7.0.1 on Athena).  I tried the following code on both Linux and Sun with the same result.  A workaround will be appreciated.

Code attached below
****************************************************************************

clear all;
set(0,'defaulttextinterpreter','tex')
rand('state',sum(100*clock));
randn('state',sum(100*clock));
scrange=1:.05:5;
ncount=1000;

figure(1);
clf;

for levent=3:6
  cntr=0;
  for scfactor=scrange
    cntr=cntr+1;
    sarray=normrnd(0,scfactor*1,1,ncount);
    sarray2=(sarray>=levent);
    sarray3=scfactor*normpdf(sarray,0,1)./normpdf(sarray/scfactor,0,1);
    sarray4=sarray2.*sarray3;
    mn(cntr)=mean(sarray4);
    st(cntr)=std(sarray4);
  end;
  
  subplot(2,2,levent-2);
  if (levent==4)
    figure(2);
    plot(scrange,mn,'xb',scrange,mn+3*st/sqrt(ncount),'g:',...
	scrange,mn-3*st/sqrt(ncount),'c--');
    lh1=line([0 6],[normcdf(-levent),normcdf(-levent)]);
    axis([0 6 normcdf(-levent)*(-2) normcdf(-levent)*3]);
    set(lh1,'Color','r');
    xlabel('Scaling Factor $a$','Interpreter','latex');
    ylabel('Probability $p_i$, $\hat{p_i}$','Interprete','latex');
%    ylabel('Probability $p_i$, $\hat{p_i}$','Interpreter','tex');
    legend('Predicted Probability','Upper 99% Bound',...
	'Lower 99% Bound','True Value',4);
    figure(1);
  end;
  plot(scrange,mn,'xb');
  xlabel('Scaling Factor $a$','Interpreter','latex');
  ylabel('Probability $p_i$, $\hat{p_i}$','Interpreter','latex');
  lh1=line([0 6],[normcdf(-levent),normcdf(-levent)]);
  set(lh1,'Color','r');
  if(levent==3)
    legend([lh1],['True Value']);
  end;
  if(levent==4)
    legend('Predicted Values');
  end;
end;
print -depsc performancesc1
%laprint(1,'performancesc1');
%laprint(2,'performancesc2');
figure(2);
print -depsc performancesc2

home help back first fref pref prev next nref lref last post