comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » OPLOT, yaxis scale problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
OPLOT, yaxis scale problem [message #35025] Sun, 11 May 2003 04:12
Kolbjorn Bekkelund is currently offline  Kolbjorn Bekkelund
Messages: 20
Registered: August 2002
Junior Member
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: widget_control, <slider_id>, maximum=num ???
Next Topic: Re: OPLOT, yaxis scale problem

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:14:10 PDT 2025

Total time taken to generate the page: 0.00566 seconds