I'm making a plot of mean wind, gust and direction. These are all
going into one common plot by using PLOT, OPLOT and axis. The
problem I've got is that both mean wind and gust plots fine, but
the direction, which is using the right yaxis gets the same scale
as the other two (which both are approx the same values).
This is the part of code in question:
yrange_wind_gust = [Min(data(2, *)), Max(data(2, *))]
yrange_wind_dir = [Min(data(3, *)), Max(data(3, *))]
PLOT, jstime, reform(data[2, *]), $
xticks=xticks, xminor=xminor, xtickv=xtickv, $
xrange=xrange, xtickname=xtickname,$
ystyle=8, color=119, charsize=2.0,$
title = 'Local winds', $
YTITLE = 'Wind Gust (m/s)', yticklen=1,
ygridstyle=1, /nodata
OPLOT, jstime, reform(data[2, *]), color=12
OPLOT, jstime, reform(data[1, *]), color=66
axis, yaxis=1, ystyle=1, yrange=yrange_wind_dir, color=119,
charsize=2.0
OPLOT, jstime, reform(data[3, *]), color=212
xyouts, 100, 647, 'Max gust: ', color=12, charsize=1.2, /device
xyouts, 125, 647, color=214, maxgust, charsize=1.2, /device
xyouts, 250, 647, color=214, maxgust_time_latest[1],
charsize=1.2, /device
xyouts, 365, 647, 'Max mean: ', color=66, charsize=1.2, /device
xyouts, 398, 647, color=214, maxmean, charsize=1.2, /device
xyouts, 520, 647, color=214, maxmean_time_latest[1],
charsize=1.2, /device
How do I manage to scale the two sides of the plot so that it can
show both the left yaxis (wind speeds) and the right one
(direction) with correct scales?
-Kolbjorn
|