[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PLOT question
Maybe a small example will be of help - hopefully it will be a bit clearer
than my first message. Imagine a periodic signal (sin wave for example)
and we are plotting more than one cycle, Normally the signal would be
plotted as a function of time, e.g:
y value |
| x x
| x x x x
__ _|__________________x__________________x_____
time | 0 1 2 3 4 5 6 7 etc...
What I want to do is swap time for phase angle, so the phase is
somewhere between 0 - 2pi, but the problem is that the phase angle
repeats, so what I was looking for on the axis was something
like:
y value |
|
| x x
| x x x x x
________|__________________x_____________________x___________
time | 0 pi/2 pi 3pi/2 0 pi/2 pi 3pi/2 0 etc...
|
end of first cycle, start of second
What I'll probably do is use xtickv and xtickname to set the ticks, since
as far as I can tell, you MUST 'plot, t, y' to get the plot right,
'plot, phase, y' results in the data being merged together and only one
cycle being plotted.
The reason I sent the first post - I was wondering if there was an easier
way than xtickv/xtickname since it can't automatically choose the tick
values like PLOT can, and isn't so flexible when I'm trying to write a
general purpose routine. Time for some more code I think....
cheers,
S