Display Image behind plot?
2 views (last 30 days)
Show older comments
Is it possible to display an image behind this plot?
thetaE= linspace(-pi,pi,1000); %E=Earth
thetaMC=linspace(-pi,pi,800); %MC=Mercury
thetaV=linspace(-pi,pi,900); %V=Venus
thetaM=linspace(-pi,pi,2000); %M=Mars
thetaJ=linspace(-pi,pi,3000); %J=Jupiter
thetaS=linspace(-pi,pi,5000); %Saturn
thetaU=linspace(-pi,pi,5800); %U=Uranus
thetaN=linspace(-pi,pi,10000); %N=Neptune
xSun=cos(thetaE); %Sun=Sun
ySun=sin(thetaE);
xMC=cos(thetaMC);
yMC=-sin(thetaMC);
xV=cos(thetaV);
yV=sin(thetaV);
xE=cos(thetaE);
yE=sin(thetaE);
xM=cos(thetaM);
yM=sin(thetaM);
xJ=cos(thetaJ);
yJ=sin(thetaJ);
xS=cos(thetaS);
yS=sin(thetaS);
xU=cos(thetaU);
yU=-sin(thetaU);
xN=cos(thetaN);
yN=sin(thetaN);
plot(xE,yE)
plot(19*xN,19*yN)
set(gca,'color','none')
hold on
pSun=plot(xSun(1),ySun(1),'o','MarkerSize',30,'MarkerFaceColor','y')
pMC=plot(4*xMC(1),4*yMC(1),'o','MarkerSize',3,'MarkerFaceColor','k')
pV= plot(6*xV(1),6*yV(1),'o','MarkerSize',4,'MarkerFaceColor','y')
pE= plot(8*xE(1),8*yE(1),'o','MarkerSize', 5,'MarkerFaceColor','b')
pM= plot((10*xM(1)),(10*yM(1)),'o','MarkerSize',3,'MarkerFaceColor','r')
pJ= plot((12*xJ(1)),(12*yJ(1)),'o','MarkerSize',15,'MarkerFaceColor','r')
pS= plot((14*xS(1)),(14*yS(1)),'o','MarkerSize',10,'MarkerFaceColor','y')
pU= plot((16*xU(1)),(16*yU(1)),'o','MarkerSize',9,'MarkerFaceColor','c')
pN= plot((18*xN(1)),(18*yN(1)),'o','MarkerSize',8,'MarkerFacecolor','b')
hold off
axis manual
for j = 1:length(thetaE)
for j = 1:length(thetaM)
pMC.XData=4*xMC(j);
pMC.YData=4*yMC(j);
pV.XData = 6*xV(j);
pV.YData = 6*yV(j);
pE.XData = 8*xE(j);
pE.YData = 8*yE(j);
pM.XData= 10*xM(j);
pM.YData= 10*yM(j);
pJ.XData= 12*xJ(j);
pJ.YData= 12*yJ(j);
pS.XData= 14*xS(j);
pS.YData= 14*yS(j);
pU.XData= 16*xU(j);
pU.YData= 16*yU(j);
pN.XData= 18*xN(j);
pN.YData= 18*yN(j);
drawnow
end
end
0 Comments
Accepted Answer
More Answers (1)
See Also
Categories
Find more on Line Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!