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

3 commentaires

Walter Roberson
Walter Roberson le 28 Avr 2025
Unfortunately, attaching the image did not work properly :(
Star Strider
Star Strider le 28 Avr 2025
Modifié(e) : Star Strider le 28 Avr 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 le 28 Avr 2025

I attached the file of picture

Connectez-vous pour commenter.

 Réponse acceptée

Sam Chak
Sam Chak le 28 Avr 2025
Déplacé(e) : Sam Chak le 28 Avr 2025
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 commentaires

S AsZ
S AsZ le 28 Avr 2025
Modifié(e) : Walter Roberson le 28 Avr 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 le 29 Avr 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 le 29 Avr 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.

Connectez-vous pour commenter.

Plus de réponses (0)

Produits

Version

R2019b

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by