Hi everybody I want to draw this plot exactly like the picture.
imshow(imread('f.jpg'))

3 Kommentare

Walter Roberson
Walter Roberson am 28 Apr. 2025
Unfortunately, attaching the image did not work properly :(
Star Strider
Star Strider am 28 Apr. 2025
Bearbeitet: Star Strider am 28 Apr. 2025
There is nothing in the image.
The URL is:
However that apparently does not lead to anything.
The size may be a problem, so check that to be sure it is less than the 5 MB limit.
EDIT — (28 Apr 2025 at 17:57)
The second time also failed.
See if it works using the 'Picture' icon (the left-most icon in the 'INSERT' part of the top toolstrip).
.
S AsZ
S AsZ am 28 Apr. 2025

I attached the file of picture

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Sam Chak
Sam Chak am 28 Apr. 2025
Verschoben: Sam Chak am 28 Apr. 2025

0 Stimmen

Perhaps try this:
sphere(100)
colormap copper % select color scheme from the colormap library
shading interp
light
lighting phong
axis equal
xlim([-2 2])
zlim([-2 2])
view(0, 0)

4 Kommentare

S AsZ
S AsZ am 28 Apr. 2025
Bearbeitet: Walter Roberson am 28 Apr. 2025
I wrote this code but the output is terrible and I don't know how to fix it.
[x,y,z] = sphere;
figure
surf(x+2014,y,z+2) % centered at (2014,0,2)
hold on
surf(x+2016,y,z+1)
surf(x+2017,y,z+1)
surf(x+2018,y,z+4)
surf(x+2019,y,z+1)
surf(x+2020,y,z+2)
surf(x+2021,y,z+2)
surf(x+2022,y,z+2)
surf(x+2023,y,z+4)
surf(x+2024,y,z+4)
surf(x+2025,y,z+1)
xlabel('Publication year');
zlabel('Number of publications');
colormap autumn % select color scheme from the colormap library
shading interp
light
lighting phong
view(0, 0)
[x,y,z] = sphere;
figure
surf(x+2014,y,z+2) % centered at (2014,0,2)
hold on
surf(x+2016,y,z+1)
surf(x+2017,y,z+1)
surf(x+2018,y,z+4)
surf(x+2019,y,z+1)
surf(x+2020,y,z+2)
surf(x+2021,y,z+2)
surf(x+2022,y,z+2)
surf(x+2023,y,z+4)
surf(x+2024,y,z+4)
surf(x+2025,y,z+1)
xlabel('Publication year');
zlabel('Number of publications');
colormap autumn % select color scheme from the colormap library
shading interp
light
lighting phong
view(0, 0)
axis equal
Sam Chak
Sam Chak am 29 Apr. 2025
If you want to display the statistical data on the number of publications over the years, wouldn't a bar chart be more effective?
Creating metallic spheres with an Nvidia-like ray tracing effect is unlikely to impress the presentation audience, journal editor or increase the acceptance chances of the manuscript. Furthermore, it can obstruct the other "sphere" like in the case of Year 2017.
S AsZ
S AsZ am 29 Apr. 2025

I agree with you. Sphere chart is beautiful but using a bar chart is more sensible for this type of data. Thanks for your sphere code.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte

Version

R2019b

Tags

Gefragt:

am 28 Apr. 2025

Kommentiert:

am 29 Apr. 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by