plot issues
Ben Abbott
bpabbott at mac.com
Wed Jun 3 08:16:38 CDT 2009
On Jun 3, 2009, at 8:20 AM, Petr Mikulik wrote:
> I went through my list of plot discrepancies of current Octave
> 3.1.55, and
> found the issues below. Ben, can you please fix them?
>
> ***
>
> 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.
> ***
>
> There is a bug in printing plot with colorbar:
>
> imagesc(1./hilb(33)); colorbar
> print a.ps -dps
>
> => 1. the colorbar gets hidden under the plot
> 2. width of the colorbar (compared to tics distance) is different
> on screen and in the postscript file
The colorbar needs some work. The same problem can be produced on the
screen as well (using a different sequence of commands). For example
imagesc(1./hilb(33)); colorbar; axis square
> ***
>
> 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.
> ***
>
> set(h,'yscale','lin');
> Octave supports 'log', but not 'lin'.
Try
set (h, "yscale", "linear")
> ***
>
> Bug: 'Colorbar' tag is hidden in Octave, while it should be exposed
> according to Matlab:
>
> imagesc(10./hilb(99)); colorbar
> h=findobj(gcf, 'tag', 'Colorbar')
> ... this fails in Octave (note: findall works OK)
This does need to be fixed.
> ***
>
> 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.
Ben
More information about the Bug-octave
mailing list