Plotting wind direction and speed over time

Hi,
I need to plot wind speed and directon over time, with data over two weeks (data is attached). I would like to have the time on the x-axis and wind on the y-axis, but I don't know how to go about it. I've read a bit about quiver but not sure how to use it, it hasn't worked for me so far..
Any help is appreciated!

답변 (1개)

Ameer Hamza
Ameer Hamza 2020년 6월 15일
편집: Ameer Hamza 2020년 6월 15일

0 개 추천

This plot direction value vs date
T = readtable('smhi-wind-data.csv');
plot(T.Date, T.Direction)
To use quiver, you need 4 vectors (x-coordinates, y-coordinates, x-velocity, and y-velocity). Or at least two vectors (x-velocity and y-velocity), the x and y-coordinate are just chosen to be integers.
.

댓글 수: 5

Lindazeta
Lindazeta 2020년 6월 15일
I was able to do that same graph, but I think it's hard to understand. I think I would like something easier, perhaps arrows showing the direction of the wind with different colors showing the intensity (speed).
Ameer Hamza
Ameer Hamza 2020년 6월 15일
편집: Ameer Hamza 2020년 6월 15일
Can you give an example of how it can be visualized using arrows w.r.t. time. I cannot think of any straightforward way.
Lindazeta
Lindazeta 2020년 6월 15일
Something like this, where green is calmer winds and red is stronger, and arrows indicate the direction of the wind.
buschman
buschman 2022년 2월 10일
hints to that solution would help me aswell!
Quiver should have something that disables the link between vectors and the coordinate system. in Python the vectors are unlinked by default, and you have to make them scale with x and y explicitly. In Matlab I cannot find an option to do or undo that. I would very much like a solution to this too!

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

제품

릴리스

R2019b

질문:

2020년 6월 15일

댓글:

2022년 11월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by