On Monday 16 December 2002 12:41, Piyush Laddha wrote:
> Hi
> Can any body help in the solving my problem ?
>
> When we create a Plplotwin object we specify the viewpoint and window
> boundary using plvsta and plwind option. By doing this we restricts the
> size of the plot to be plotted. If suppose our data at runtime (say inp=
ut
> from some port) increase beyond these boundaries. How we can plot this =
data
> ?
Just plotting the data again, specifying the new limits? Or is a strip-ch=
art=20
plotter what you want? see the x17c c example.
Joao
> Is there any way ? To make it my problem more clear I am sending the
> piece of code.
>
>
> package require Plplotter
> Plplotwin .p
>
> .p cmd plsvpa 0.0 100.0 0.0 100.0
> .p cmd plwind 0.0 100.0 0.0 100.0
>
>
> grid .p -columnspan 6 -sticky news
> grid rowconfigure . 0 -weight 1
> grid columnconfigure . 5 -weight 1
>
> button .bpl -text "Play" -command "play"
> grid .bpl -sticky "ew"
>
> matrix x f 2
> matrix y f 2
> matrix x1 f 2
> matrix y1 f 2
>
> proc play {} {
> .p cmd pllab "X-axis" "Y-axis" "MyGraph"
> global k
> global xscroll
> set xscroll 0
> set k 1
> while {$k < 50} {
> .p cmd plcol 1
> .p cmd plbox "abnhst" 20.0 0 "abnhstv" 20.0 0
>
> x 0 =3D 0
> y 0 =3D 30
> #I have define the boundary on X-axis 100 here I am exceeding it the #
> beyond the limit for {set i 0} {$i < 300} {incr i} {
> .p cmd plcol 5
> set a [expr 1 * $i]
> x 1 =3D $a
> y 1 =3D 30
> .p cmd plline 2 x y
> x 0 =3D $a
>
> after 25
> update
> }
> incr k
> after 500
> .p cmd plspause 1
> .p cmd plbop
> }
> }
>
> Please go through this and suggest the needful .
>
> Looking forward for ur reply
>
> Regards
> Piyush L.
|