0

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?

2
  • JFI: For 2D plots, it has been answered before: Custom Markers for Matlab plot Commented Feb 13, 2021 at 7:37
  • In MATLAB, to obtain a marker like above, you may do: x=linspace(0,1,10); y=sin(2*pi*x); z=cos(2*pi*x); scatter3(x,y,z,'ro','filled','SizeData',100); hold on; h=plot3(x, y,z,'wo','markersize',5); pause(0.01); h.MarkerHandle.Style = 'hbar'; Note that hbar is an undocumented property Commented Feb 13, 2021 at 9:00

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.