fionn
fionn

Reputation: 57

Using images for points in gnuplot

I have a frivolous question. Is there any way to use an image in lieu of points in gnuplot? For example, if I was plotting data about pasta consumption or something, I would have pictures of pasta (instead of usual gnuplot points).

Upvotes: 3

Views: 1392

Answers (4)

Ethan
Ethan

Reputation: 15093

Revisited 10 years later

Gnuplot 5.4 supports pixmap objects that can be placed within the coordinate space of a plot. See answer to gnuplot: Use an image instead of a point type

Upvotes: 1

sfeam
sfeam

Reputation: 276

Another option is to find a dingbats type of font with a suitable glyph. Then you can use "plot with labels" using that glyph as the label string. See for example the 5th plot in the demo http://gnuplot.sourceforge.net/demo/stringvar.html

Upvotes: 2

mgilson
mgilson

Reputation: 309841

I haven't played around with this feature at all myself, however, there is:

http://gnuplot.sourceforge.net/demo/barchart_art.html

Which shows the use of png files on a bar chart (Note, that this feature was added in Gnuplot 4.5 -- I think). With a little creativity, it seems like you could use that feature to do what you're asking -- although it would require a whole bunch of plot commands so it might be useful to write a script to generate the gnuplot script (or use iteration depending on your dataset) -- Obviously your image files would have to be in a format that your version of gnuplot understands as well ...

Upvotes: 1

Bernhard
Bernhard

Reputation: 3694

A possible strategy may be the plot with rgbimage option in gnuplot.

See the second example over here: http://www.gnuplot.info/demo_4.2/image.html

If you relate the center option with your data points, this may be possible.

Upvotes: 0

Related Questions