I am trying to fix part of the BodePlot phase portion as it does not wrap correctly. And there is no option that I can use to report this.
So, instead of doing the full storyline myself (I can do it if I need to), I'm thinking of creating a BodePlot, capturing data points, wrapping data (as soon as I get x, y, the rest is easy), then I need to put a new list of points back to the chart, and then use Show to display it.
The part I'm stuck on is extracting points from FullForm. I cannot get the correct template for this.
This is what I'm going for:
hz=z/(z^2-z+0.3); tf=TransferFunctionModel[hz,z,SamplingPeriod->2]; phasePlot=BodePlot[tf,{0.001,2 Pi}, ScalingFunctions->{Automatic,{"Linear","Degree"}},PlotLayout->"List"][[2]]

You see how it does not wrap around 180 degrees. In dsp, flow around Bode phases is more common. Here's how it should look:

So this is what I did:
FullForm[phasePlot] Graphics[List[ List[List[], List[], List[Hue[0.67, 0.6, 0.6], Line[List[List[0.0010000243495554542, -0.2673870119911639], List[0.0013659538057574799, -0.36521403872250247], List[0.0017318832619595053, -0.46304207336414027], ....
I see the data there (x, y) But how to get it out? I tried this:
Cases[FullForm[phasePlot], List[x_, y_] -> {x, y}, Infinity];
But the above coincidences are in addition to the list of items, other things that I don't need. I tried many other things, but I can not get only a list of points.
I was wondering if someone knows how to get only points (x, y) from the above graph. Is there a better way to do this other than using FullForm?
thanks
Update:
I just found a post here that shows how to extract data from the plot. So I used it:
points = Cases[ Normal@phasePlot , Line[pts_] -> pts, Infinity]