Share

gnuplot development

Tracker: Bugs

5 custom colormap using postscript term - ID: 2516634
Last Update: Comment added ( mikulik )

When using the monochrome postscript terminal a custom colormap is ignored.
I suggest that the behavior should be to apply the colormap in a monochrome
fashion (as opposed to using the default monochrome colormap).

Two files are attached that were generated using Octave. In one,
debug-ud.gp, the monochrome colormap is inverted. However, the resulting
postscript file does not reflect the inverted monochrome colormap.

As I'm only able to attach one file, I'll submit this and attempt to add
the version with the normal monochrome color map.


Ben Abbott ( bpabbott ) - 2009-01-18 03:03

5

Closed

Fixed

Nobody/Anonymous

2D plot

None

Public


Comments ( 8 )

Date: 2009-01-26 18:10
Sender: mikulik

I have applied the patch to both 4.2 and cvs.


Date: 2009-01-19 13:17
Sender: bpabbott

ok, I overlooked the go.m script.

Now I understand the suggestion that Octave use rgb2gray when the output
is mono.


Date: 2009-01-19 07:38
Sender: mikulik

> In the event that the custom colormap is not BW what happens?

It stays color -- see the line
colormap(rainbow(4));
in the script testing go.m and similarly in go.gp. Have you tried these
examples as well?



Date: 2009-01-19 01:12
Sender: bpabbott

that last comment was me ... don't know why I came up "nobody" ;-)

Ben


Date: 2009-01-19 00:48
Sender: nobody

Petr,

Nice job. All my checks work as well.

In the event that the custom colormap is not BW what happens?


Date: 2009-01-18 21:33
Sender: mikulik

Please test the updated patch 02. I hope it works now for all plots ... I
couldn't find any plot in gnuplot neither Octave where it fails.



Date: 2009-01-18 18:53
Sender: bpabbott

Petr,

I've applied your patch. For the examples I ran previously, I don't see a
change.

For your simple example co.ps and mono.ps are the inverse of eachother.





Date: 2009-01-18 11:26
Sender: mikulik

Patch: Let postscript choose always colour palette for interpolated
colours
('set palette defined', 'set palette file') and colour/gray according to
Color
otherwise ('set palette gray', 'set palette rgb').

Ben, please test it with Octave. It seems there is a bug somewhere; please
try:
a=1./hilb(42);
colormap(rainbow);
colormap(flipud(gray));
imagesc(a); colorbar
print('mono.ps', '-dps');
print('co.ps', '-dpsc');

File Added: patch_test_01.zip


Attached Files ( 4 )

Filename Description Download
debug-ud.gp gnuplot input with inverted gray colormap Download
debug.gp gnuplot input with normal gray colormap Download
patch_test_01.zip patch and testing example Download
patch_test_02.zip updated patch with testing examples Download

Changes ( 8 )

Field Old Value Date By
close_date - 2009-01-26 18:10 mikulik
status_id Open 2009-01-26 18:10 mikulik
resolution_id None 2009-01-26 18:10 mikulik
allow_comments 1 2009-01-26 18:10 mikulik
File Added 309700: patch_test_02.zip 2009-01-18 21:33 mikulik
File Added 309625: patch_test_01.zip 2009-01-18 11:26 mikulik
File Added 309591: debug.gp 2009-01-18 03:04 bpabbott
File Added 309590: debug-ud.gp 2009-01-18 03:03 bpabbott