byeGraph_Logo2.gif

Japanese2.png

Top page / Overview & Download / Basic usage / Sample data
Version 2.5 / Bug info / Version history / Q & A / Donation


Sample data

  1. How to use the “fread” function
  2. Characteristic of Power Amp Gain
  3. Usage of Sum function
  4. Health Control
  5. Loan Payment
  6. Date-formated X axis labels
  7. Regression Analysis and Coefficients
  8. Scatter with labels
  9. Character-based X axis labels
  10. Lissajous figures (May 04 2023)

1. How to use the “fread” function

Set the following measured data into one of the “Data” sections. (Omitted after the 5th line.)

1.5 26
2.0 25
2.1 32
2.5 34
  :
  :

Set the following expressions into the “Exp.” section.

%symbol l s ! Assign symbol and line to drawn data
%label calc. meas. ! Set data labels
x=fread(0)@ ! Read the above data via the fread function.
a=7.5@
b=12@
z=a*x+b@ ! Calculate theoretic values
y={z,fread(1)} ! Output theoretic values and measured data as plotted data

bg_sample1.gif


2. Characteristic of Power Amp Gain

This is a semi-logarithmic graph. “Eng. Unit(+Symbol)” is chosen as a type of the x axis.

By using proper tools on the Tool palette, several kinds of objects, such as rectangle, line and text, can be created as follows.

bg_sample3.gif


3. Usage of Sum function

Set the following expressions into the “Exp.” section.

%label k=1 k=2 Sum(k=1~10) ! Set data labels
x=<-2*pi:2*pi:0.02*pi>@ ! Specify a range of the loop variable
z=sin(x)@
z1=sin(3*x)/3@
z2=z+z1+sum(sin((2*k-1)*x)/(2*k-1),k=3:10)@
y={z,z1,z2}

bg_sample4-e.gif


4. Health Control

Set the following data the first column data of which are formatted in date-time into one of the “Data” sections. (Omitted after the 5th line.)

XDATE DAY ! The first column data are read as date-time-formatted ones. (Then, “DAY” is used as a base unit.)
%label Upper Lower Pulsation
07/01/08-07:20 150 96 71
07/01/09-08:01 163 94 73
07/01/10-11:15 163 94 74
07/01/11-09:22 143 93 78
     :
     :

Like the heath control data above, even if data are revised every day, the graph can be updated each time without changing its attributes by using the “Renew” function.

bg_sample7-2-e.png


5. Loan Payment

“monthly payment” = “the amount of loan” ×(interest÷12)÷
                  (1−(1÷((1+(interest÷12))^“the number of payment”)))

The expression above is a formula for “equal principal and interest payment”. Set the following expressions, which are based on the formula, to the “Exp.” section

it is possible to output the calculation results of expressions with several formats.

%label mon_payment mon_principal mon_interest tot_principal the_balance
%yscale 2 2 2 1
%format d y ! Set desired formats for numerical output
nMax = 240@ ! Number of payment
mRate = 0.03/12@ ! Interest ÷ 12
x = <1:nMax:1>@
kariire = 30000000@ ! The amount of loan
mHensai = kariire*mRate/(1-(1/((1+mRate)^ nMax)))@ ! Monthly payment
mGankin = mHensai/((1+mRate)^(nMax-x+1))@ ! Monthly principal
mRisoku = mHensai-mGankin@ ! Monthly interest
_M0(+) = mGankin@ ! The total principal is managed by a global variable
y={mHensai, mGankin, mRisoku, _M0, kariire-_M0}

bg_sample8-e.gif

** Numerical output for expressions (an extracted part) **

                  :
L mon_payment mon_principal mon_interest tot_principal the_balance
                  :
   1  166,379   91,379  75,000     91,379  29,908,621
   2  166,379   91,608  74,772    182,987  29,817,013
   3  166,379   91,837  74,543    274,824  29,725,176
   4  166,379   92,066  74,313    366,890  29,633,110
   5  166,379   92,297  74,083    459,187  29,540,813
                  :
                  :


6. Date-formated x axis labels

Set the following data into one of the “Data” sections. (The date-formatted strings are set to the first column of every line. The data are left out after the 5th line.)

XDATE YEAR ! Read the first column data as date-formatted ones (The basic unit is “YEAR”.)
CHOICE 0 ! Since output are done through expressions, data themselves are not directly outputted.
! Date, monthly charge, amount of monthly use and the number of days of every month, from the left.
05/05/01 3964 182 33
05/06/01 3755 172 28
05/07/01 5264 245 31
05/08/01 5974 279 31
     :
     :

Set the following expressions at the “Exp.” section. (The expressions are used to get values per day.)

%symbol b
%label Charge Amount
%yscale 1 2 ! Assign “charge” to the 1st Y axis, and “amount” to the 2nd.
x=fread(0)@ ! Read the above data via the fread function. (x is the variable for reading date.)
a1=fread(1)/fread(3)@ ! Calculate daily charge.
a2=fread(2)/fread(3)@ ! Calculate daily amount of power.
y={a1,a2}

bg_sample9-e.gif


7. Regression Analysis and Coefficients

After the creation of the graph, open the “Symbol/Line” pane of the “Graph Attributes” panel to use regression analysis.

You can choose from 13 types of regression curves: linear, exponential, logarithmic, power, polynomial (degree 2 - 9) and gaussian curves. In addition to curves, you can also put regression coefficients beside them onto the graph. (To keep the coefficients invisible is also OK.)

bg_sample10-2.png


8. Scatter with labels

Set the following data into one of the “Data” sections. (The data are left out after the 6th line.)

! The 1st column data are read as label strings.
! The 4th column data are for X data. The 5th are for Y data.
SCATTER STR:0 X:3 Y:4
     :
_END_
Spain 3909 505 14020 2526 73.9 82 13.4
Holland 1518 41 20590 7210 30.2 311 12.8
France 5737 552 22300 3996 212.6 210 14.2
Finland 504 338 22980 5932 91.8 559 13.5
Italy 5678 301 20510 3676 85.8 107 14.5
     :

After the creation of the graph, Choose “As labels” at the “Scatter strings” on the “Symbol/Line” pane of the “Graph Attributes” panel. In this mode, scatter labels can be freely changed their positions, angles, fonts and others as well as other ordinary objects can.

If you choose “Instead of Symbol” of another mode, symbols are not displayed and corresponding labels are drawn at the data points instead.

bg_sample201.png


9. Character-based X axis labels

Set the following data into one of the “Data” sections. (The strings for x data are set to the fist column of every line. The data are left out after the 6th line.)

%xstrings
    :
_END_
Japan 6.6 33.2 60.2 45.9
USA 2.9 24.3 72.3 163.9
Chaina 60.2 21.6 18.2 98.9
China 14.0 42.0 44.0 76.2
Spain 10.2 30.8 59.0 73.9
     :
"U K" 2 26.1 71.9 107.5
     :

bg_sample202-2-e.png


10. Lissajous figures (May 04 2023)

Write the following expressions to calculate four Lissajous figures and to arrange them at different positions. They are located using the two sets of serial parameters (=[ , , , ]) which vary the values of x0 and y0.

%axislabel title "Lissajous figures"
%label "a=1,b=1,delta=-π/4":"a=1,b=2,delta=-π/4":"a=2,b=3,delta=-π/4":"a=3,b=4,delta=-π/4"
%symbol l
!%symboltype 1
t=<0:2*pi:0.02>@
a=[1, 1, 2, 3]@
b=[1, 2, 3, 4]@
delta=pi/4@
A=1@
B=1@
x0=[1.5, 1.5, -1.5, -1.5]@
y0=[1.5, -1.5, 1.5, -1.5]@
x=A*cos(a*t)+x0@
y=B*sin(b*t+delta)+y0

bg_sample_Lissajous.png
(v2.6)