user2105632
user2105632

Reputation: 781

Gnuplot matrix plot without interpolation not working

I am trying to plot a matrix plot with Gnuplot version 5.0 without interpolation between values.

I am using the following code and data from http://www.gnuplotting.org/tag/matrix/.

However, the image I does not produce discrete regions in the plot and instead interpolates between values. Why is the "with image" option not working?

code

set palette grey
plot 'color_map.dat' matrix with image

with the following data

0 1 2 3 4 3 2 1 0
0 1 2 3 4 3 2 1 0
0 1 2 3 4 3 2 1 0
0 1 2 3 4 3 2 1 0
0 1 2 3 4 3 2 1 0
0 1 2 3 4 3 2 1 0

Upvotes: 3

Views: 1139

Answers (1)

Stefan Jaumann
Stefan Jaumann

Reputation: 47

I've been searching for this command for quite some time and stumbled across the answer recently. By using

plot 'color_map.dat' matrix u 1:2:3 with image pixels

one can keep the vectorgraphics (pdf) terminal.

The solution was taken from here.

Upvotes: 2

Related Questions