Plotting graph with given points

basically we always plot graph of certain function such as x = 0 : 1 : 10 y = sinx; plot(x,y,'-r^')
lets say given x = 2 y = 15 x = 3 y = 8 x = 8 y = 30 the point is random, how to plot this graph?

 Respuesta aceptada

Danny Alvarez
Danny Alvarez el 5 de Ag. de 2015

4 votos

x=[2,3,8]; y=[15,8,30]; plot(x.y)
or
plot(x,y,'o') for dots

4 comentarios

Odien
Odien el 5 de Ag. de 2015
Movida: DGM el 6 de Mzo. de 2024
after the graph is plot, how can we snip the following graph and paste it to mic.word?
Danny Alvarez
Danny Alvarez el 5 de Ag. de 2015
Movida: DGM el 6 de Mzo. de 2024
If you have windows, use the snipping tool! Or, you can save the figure by clicking the save icon.
Jorge Luis Dominguez Martinez
Jorge Luis Dominguez Martinez el 13 de Jun. de 2022
Movida: DGM el 6 de Mzo. de 2024
From the Graph window, you can go to File -> Save as
or click on Save Figure
and then select JPEG image (*jpg) as a type .
DGM
DGM el 6 de Mzo. de 2024
... and save it as a PNG, not a JPG. Never save plots as a JPG.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Line Plots en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 5 de Ag. de 2015

Comentada:

DGM
el 6 de Mzo. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by