plot issues -> how to produce a mono plot?

Ben Abbott bpabbott at mac.com
Fri Jun 5 00:52:24 CDT 2009


On Jun 3, 2009, at 11:58 AM, Petr Mikulik wrote:

>>> ***
>>>
>>> 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.


Petr,

I've tried to modify print.m to behave as you describe above.  
Unfortunately, my attempt has failed.

Presently, the terminal command piped to gnuplot is ...

	set terminal postscript enhanced eps mono dashed size  
7.98611111111111,5.98611111111111

As the "mono" option is present, I'd assumed that was sufficient to  
render a BW image. However, the image is color. Looking at gnuplot's  
documentation is appears that the "mono" option in the terminal  
command results in producing BW rendering as the default. However, if  
an object is given a color specification it is then rendered in the  
colors specified. This behavior makes it difficult for Octave to  
produce a BW image.

Is there a method to force gnuplot to render a mono image, even when a  
color spec is provided?

Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.gp
Type: application/octet-stream
Size: 9873 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/bug-octave/attachments/20090605/c688e97f/attachment.obj 
-------------- next part --------------





More information about the Bug-octave mailing list