plot issues

Petr Mikulik mikulik at physics.muni.cz
Wed Jun 3 10:58:06 CDT 2009


> >***
> >
> >x=-5:5;
> >plot(x,x, x,1-x, x,1+x)
> >print -dps mono.ps
> >print -dpsc color.ps
> >print -deps mono.eps
> >print -depsc color.eps
> >
> >Bug: mono.(e)ps should be monochromatic and solid, but they are color and
> >dashed; it should use:
> > set term postscript {eps} monochrome solid
> 
> Running Matlab, the -dps and -deps devices produce color output for patches
> but BW for images (the colorbar for example).
> 
> Thus, it is not clear to me what constitutes compatible behavior. To produce
> BW images running Octave, add the "-mono" option.

Compatibility seems to be:
-  -dps, -deps ... monochromatic solid

-  -dpsc, -depsc ... color solid

- There seems to be no   -mono   option in Matlab neither. So I propose that
  "-dps" and "-deps" produce  monochrome solid  and  Octave's extention
  "-mono" would produce "monochrome dashed".

- Actually, dashes are produced by:
	plot(x,-x,'-', x,y, '-.', x,x, '--')
  which means solid, dash-dot, dash-dash. They are equivalent in postscript
  to
	plot ... lt 1 lc rgb ..., ... lt 5 ..., ... lt 2 ...

  If Octave uses lt 1,5,2, then it could pass the "dash" option always and 
  it will be compatible with Matlab's dashes.

> >***
> >
> >printing to pdfcairo
> >
> >plot(1:100)
> >print -dpdf z.pdf
> >print -dpdfcairo zz.pdf
> >
> >... the output file is called pdfcairo:zz.pdf
> 
> This behavior is intended. However, there have been a few complaints. Thus,
> perhaps it makes sense to not modify the output filename, and to append the
> proper suffix if needed.

Please let the print command know that pdf and pdfcairo are both pdf 
output files.

> >***
> >
> >set(h,'yscale','lin');
> >Octave supports 'log', but not 'lin'.
> 
> Try
> 	set (h, "yscale", "linear")

Yes, it works. 
Can you please add "lin" as a synonym, in order to be compatible?

> >***
> >
> >b=logspace(1,10,24); a=repmat(b,10,1);
> >imagesc(a); h=colorbar;
> >set(h, 'YScale', 'log');
> >There is just a visual difference: Matlab puts tic labels 10^0, 10^1,
> >10^2, ... while gnuplot puts 1, 10, 100, ..., 100000, 1e+6, 1e+7, ...
> 
> I like the Matlab format as well. Presently, it is left to gnuplot to handle
> the formating.

Please add the following gnuplot command if the terminal is enhanced:
	set format cb "10^{%T}"

---
Petr Mikulik


More information about the Bug-octave mailing list