On Mon, Jun 4, 2012 at 4:44 AM, ambily joseph <josephamb...@gmail.com> wrote:
> Sir
>
>
> I wanted to take float datas from a file sink and plot those values .
> I am using the below python script for this.
> I need to change my x -axis and y-axis limits.
> What command should i add to this script for this task?
>
> #!/usr/bin/env python
> from array import array
> import matplotlib.pyplot as plt
>
> input_file = open('mySID_output','r')
> float_array = array('d')
>
> float_array.fromstring(input_file.read())
>
> #print float_array
>
> plt.plot(float_array)
> plt.show()
>
> Thank you

You need to apply a set_xlim or set_ylim on the axes of the plot.
There should be a way to get the current axes after you've created the
plot. Generally, though, what I do is create a figure (plt.figure()),
create a subplot (add_subplot()) and use the subplot to plot and
manipulate the axes.

Tom

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to