The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Changing plot scaling within HPPPL program
05-25-2024, 05:00 AM
Post: #1
Changing plot scaling within HPPPL program
I wrote the following code such that a sinusoidal function is drawn point by point using the plot view of Statistics 1Var. The scaling is adjusted according to the maximum values of the x-axis and y-axis. The scaling is updated with each new value of the function.
Unfortunately, the scaling is just adjusted at the first round and not updated after that. Please advise what could be the problem.



Code:

EXPORT Data_Grapher()
BEGIN
LOCAL b,j;
D1:={};
D2:={};
H1(1):="D1";
H1(2):="D2";
H1(3):=4;
STARTAPP("Statistics 1Var");
FOR j FROM 0 TO 360
DO
D1:=append(D1,j);
b:=SIN(j*π/180);
D2:=append(D2,b);
0▶Xmin;
(MAX(D1)*1.1)▶Xmax;
(MIN(D2)-ABS(MIN(D2))*0.1)▶Ymin;
(MAX(D2)+ABS(MAX(D2))*0.1)▶Ymax;
STARTVIEW(1,1);
END;
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Changing plot scaling within HPPPL program - amindanial - 05-25-2024 05:00 AM



User(s) browsing this thread: 1 Guest(s)