Priyash Mistry
Priyash Mistry

Reputation: 23

Add image in Octave plot instead of color

I want to create an animation of hydrogen atom with one proton at centre and one electron revolving around. But instead of adding colour to it, I want to add image i.e.

plot3(x,y,z,'.','markersize',10,'r')

Above code will give me a point at location (x,y,z) of color red. But instead of red color, I want an image in it uploaded below.

image

Is it possible with Octave?

Upvotes: 0

Views: 195

Answers (1)

Ethan
Ethan

Reputation: 15093

Since you have tagged this question gnuplot I will give an answer in the form of a gnuplot command. I leave it to someone else to show how to pass this command through to gnuplot from inside octave. This syntax assumes the current version of gnuplot (5.4)

set pixmap 1 "TaGR5m.jpg" at x,y,z center

This will use the native size of the image. If you need to rescale it, add the additional qualifiers width <dx>, height <dy>, or size <dx>,<dy>.

Upvotes: 1

Related Questions