Ocean - Plotting multiple expressions in different strips

Guest
Hi,

I need some help on this.
I'm simulating an amplifier for many corners and need to plot gain and phase response.
For the plots, I need appended plots (of all corners) of gain in one strip and phase (of all corners) in another strip.

I tried doing the following in my script:

Gain_plot=dB20(getData("loopGain" ?result "stb-stb"))
Phase_plot=phase(getData("loopGain" ?result "stb-stb"))

y=newWindow()
awvPlotWaveform( currentWindow(y) list(Gain_plot Phase_plot) ?expr list("Gain" "Phase" ) ?stripNumber list(1 2) )

However, when the gain and phase expressions are re-evaluated in an outer loop(not shown here), the plots are replaced.

I also tried using awvSimplePlotExpression() and awvSimplePlotExpression(). What I understand is that these cannot be used to plot multiple expressions. Am i wrong?

Can anybody help me out with this?
Appreciate your patience.

Thanks,
Prashant
 
On Monday, 16 September 2013 19:49:02 UTC+5:30, prasha...@gmail.com wrote:
Hi,



I need some help on this.

I'm simulating an amplifier for many corners and need to plot gain and phase response.

For the plots, I need appended plots (of all corners) of gain in one strip and phase (of all corners) in another strip.



I tried doing the following in my script:



Gain_plot=dB20(getData("loopGain" ?result "stb-stb"))

Phase_plot=phase(getData("loopGain" ?result "stb-stb"))



y=newWindow()

awvPlotWaveform( currentWindow(y) list(Gain_plot Phase_plot) ?expr list("Gain" "Phase" ) ?stripNumber list(1 2) )



However, when the gain and phase expressions are re-evaluated in an outer loop(not shown here), the plots are replaced.



I also tried using awvSimplePlotExpression() and awvSimplePlotExpression(). What I understand is that these cannot be used to plot multiple expressions. Am i wrong?



Can anybody help me out with this?

Appreciate your patience.



Thanks,

Prashant

Hi,

Solved it.

Indeed I was wrong about awvSimplePlotExpression.

It works. This is what I did:

x=newWindow()

Gain_plot=dB20(getData("loopGain" ?result "stb-stb"))

Phase_plot=phase(getData("loopGain" ?result "stb-stb"))

awvSimplePlotExpression( currentWindow(x) "Gain_plot Phase_plot" nil nil ?expr list("gain" "phase") ?stripNumber list(1 2) )

I now get overlapped plots of gain and phase in 2 strips of the same window.

Cheers,

Prashant
 
2013 m. rugsėjis 16 d., pirmadienis 17:19:02 UTC+3, prasha...@gmail.com rašė:
Hi,



I need some help on this.

I'm simulating an amplifier for many corners and need to plot gain and phase response.

For the plots, I need appended plots (of all corners) of gain in one strip and phase (of all corners) in another strip.



I tried doing the following in my script:



Gain_plot=dB20(getData("loopGain" ?result "stb-stb"))

Phase_plot=phase(getData("loopGain" ?result "stb-stb"))



y=newWindow()

awvPlotWaveform( currentWindow(y) list(Gain_plot Phase_plot) ?expr list("Gain" "Phase" ) ?stripNumber list(1 2) )



However, when the gain and phase expressions are re-evaluated in an outer loop(not shown here), the plots are replaced.



I also tried using awvSimplePlotExpression() and awvSimplePlotExpression(). What I understand is that these cannot be used to plot multiple expressions. Am i wrong?



Can anybody help me out with this?

Appreciate your patience.



Thanks,

Prashant

If I understand correctly, You should do it like this:
1) create a window - newWindow()
2) create 2 subwindows in it by adding addSubwindow()
3) now You have subwindows nr "1" and "2"
4) do simulations
5) set currentSubwindow(1) command - now You'll plot in the 1st subwindow
6) plot everything needed, for example gain. I personally plot stuff with plot( Gain_plot ?expr '( "Gain_plot" ) ). awv commands are useful in labeling or naming windws/subwindows. Keep it simple :)
7) set currentSubwindow(2)
8) plot everything needed, for example phase.
9) repeat 1-8 with all corners

Hope it helps,
Aleksandr
 

Welcome to EDABoard.com

Sponsor

Back
Top