Plot temperature and Bar precipitation

Hello,
sorry for my English, but i try to do the best i can...
Is it possible to draw in the same figure a plot of a temperature and a bar of the precipitations ???
A sort of plotyy(), but the second data is a bar one... it's a classic graph in environnement and i'm very surprise not to find something on it...
Thanks for your answers
Eric ./.

답변 (2개)

the cyclist
the cyclist 2012년 2월 14일

0 개 추천

Here is a simple example. In general, you can plot anything with anything, as long as you put the "hold" statement so that the first plot is not overwritten (which is the default behavior.)
figure
hold on
bar(1:3,magic(3))
x= 1:0.1:3;
y = x.^2;
plot(x,y)
Travaglini eric
Travaglini eric 2012년 2월 14일

0 개 추천

Thanks for your answer the cyclist, but i forgot an essential condition... I'd like to see the two data with the best range/scale for each of them...
In my case my temperature's data could be negative, and the precipitations are higher, and i want to have a good resolution for my two set of data...
With the function plotyy we can have two scales, one for each set of value... but in environnement we like to represent the precipitation with bar. Have you got an other Idea ?

카테고리

도움말 센터File Exchange에서 Weather and Atmospheric Science에 대해 자세히 알아보기

질문:

2012년 2월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by