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

Home » Public Forums » archive » How to shift the values of x axis from position of x axis to other
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
How to shift the values of x axis from position of x axis to other [message #70419] Fri, 16 April 2010 04:32 Go to next message
sid is currently offline  sid
Messages: 50
Registered: January 1995
Member
Hi,
I am having a plot, with xaxis varies from 0 to 1023(pixels) and
yaxis varies from 5000 to 7000(intensity),
likewise i am having 21 plots, each of this plot having different y
axis value but same x axis values.

Now I need to find an interval in the xaxis, say suppose from 537 to
567 and I need to find the minimum y value in this particular interval
of x values.

ok that I can find using where command.

But if suppose this minimum y value is occuring at 545th pixel for one
of the plots out of 21 plots and for the other plot it occurs at 543th
pixel, then how to make the minimum value of y at the interval 537 to
567(x values) fall on one particular pixel for all the 21 plots.

please give some suggesions and tips in this regard.
regards
sid
Re: How to shift the values of x axis from position of x axis to other [message #70511 is a reply to message #70419] Fri, 16 April 2010 09:14 Go to previous message
cgguido is currently offline  cgguido
Messages: 195
Registered: August 2005
Senior Member
On Apr 16, 6:32 am, sid <gunvicsi...@gmail.com> wrote:
> Hi,
>     I am having a plot, with xaxis varies from 0 to 1023(pixels) and
> yaxis varies from 5000 to 7000(intensity),
> likewise i am having 21 plots, each of this plot having different y
> axis value but same x axis values.
>
> Now I need to find an interval in the xaxis, say suppose from 537 to
> 567 and I need to find the minimum y value in this particular interval
> of x values.
>
>  ok that I can find using where command.
>
> But if suppose this minimum y value is occuring at 545th pixel for one
> of the plots out of 21 plots and for the other plot it occurs at 543th
> pixel, then how to make the minimum value of y at the interval 537 to
> 567(x values) fall on one particular pixel for all the 21 plots.
>
> please give some suggesions and tips in this regard.
> regards
> sid

Sounds like a job for min() with a DIMENSION keyword...

Result = MIN( Array [, Min_Subscript] [, /ABSOLUTE] [,
DIMENSION=value] [, MAX=variable] [, /NAN] [,
SUBSCRIPT_MAX=variable])

e.g. for two "plots" :

x=indgen(7); fake x values
y1=[3,2.2,3,3,3,3,4] ; fake plot 1 values
y2=[2,2,2,1,2,2,2]; fake plot 2 values
plot, x, y1, /xstyle
oplot, x, y2
yy=[[y1],[y2]]; concatenate arrays together
mm=min(yy,w, dim=1); get minimum along dim=1 (ie for each column)
print, mm ; the minima
w=array_indices(yy, w)
print, yy[w[0,*],w[1,*]]
oplot, x[w[0,*]], yy[w[0,*],w[1,*]], ps=6, syms=4
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: mandelbrot
Next Topic: Multi-core techniques

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

Current Time: Fri Nov 28 07:51:46 PST 2025

Total time taken to generate the page: 0.00975 seconds