Abstract:
It is an object of the invention to solve problems with a calculator capable of displaying a graph of a function in that the characteristics of a graph displayed by inputting a function can not be recognized when a desired display range is not at an appropriate value and in that a value to change the display range has had to be input on a trial and error basis, which has made the operation very complicated. A calculator according to the invention displays a graph of a function on a reduced scale, further displays buttons for increasing and decreasing display ranges of an X-axis and a Y-axis around the graph and changes the graph of the function and displays it again in response to instructions by the user on the buttons. This makes it possible to correct the display ranges of the graph of the function easily.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a calculator capable of calculating a function and displaying a graph of the function. 
     2. Description of the Related Art 
     There are many conventional calculators capable of visually displaying a graph of a function. To display the graph of the function in such calculators, a user first inputs the function to be processed by the calculator. For example, assume the following Equations (1) and (2) as functions to be processed. 
     
         Y=X.sup.2                                                  (1) 
    
     
         Y=2X+3                                                     (2) 
    
     The user instructs the calculator to display graphs of the functions. Upon the instruction, the calculator displays graphs of the functions in which the left and right ends of the display unit of the calculator corresponds to X min  and X max  of X-axis, and the lower and upper ends thereof corresponds to Y min  and Y max  of Y-axis, respectively. X min  is a lower limit value of a display range of the X-axis of the graph, and X max  is an upper limit value of the display range of the X-axis of the graph. Y min  is a lower limit value of the display range of the Y-axis of the graph, and Y max  is an upper limit value of the display range of the Y-axis of the graph. While each of X min , X max , Y min  and Y max  can be specified by a user, their initial values are preset for the time at which the calculator is used. 
     For example, Y min , X max , Y min  and Y max  are set at X min  =-4.7, X max  =4.7, Y min  =-3.1 and Y max  =3.1, respectively. For example, those numerical values are set such that &#34;1&#34; corresponds to 10 dots. Therefore, when the display unit is a display having, for example, 96 dots×64 dots, the graph is displayed using 31 dots allocated to each of regions above and below the X-axis and 47 dots allocated to each of regions to the left and right of the Y-axis. 
     However, even when the user wishes to have the graph of the functions displayed such that the relationship between the two functions as a whole can be properly understood from Equations (1) and (2): 
     
         Y=X.sup.2                                                  (1) 
    
     
         Y=2X+3                                                     (2) 
    
     which represent the two functions, X min , X max , Y min  and Y max  may be values which have no relationship with the relationship between the two functions. Therefore, the graph of the functions displayed in the above-described case does not necessarily provide proper understanding of the relationship between the two functions as a whole. 
     Further, when each of X min , X max , Y min  and Y max  is set before the graph of the functions is displayed, intersections (-1, -1) and (3, 9) can be easily obtained if the functions are simple like Equations (1) and (2): 
     
         Y=X.sup.2                                                  (1) 
    
     
         Y=2X+3                                                     (2) 
    
     Therefore, X min , X max , Y min  and Y max  can be set at appropriate values which allow understanding of the relationship between the two functions as a whole. However, when a graph of a plurality of complicated functions is to be displayed on the calculator, it is difficult to recognize intersections in the graph of the complicated functions, i.e., intersections of lines representing sets of points having values (x, y) defined by the complicated functions as their coordinates and an image of the graph as a whole, and it is therefore difficult to set X min , X max , Y min  and Y max  properly. 
     As a result, when the complicated functions are displayed, X min , X max , Y min  and Y max  may provide no display on the display unit. In other words, in this case, the lines representing the points at coordinates defined by the complicated functions are not displayed on the display unit. In this case, the user must set the values X min , X max , Y min  and Y max  from the state of no display through repeated trial and error, which has been very inconvenient. 
     One of conventional techniques for calculators capable of displaying a graph of a function is disclosed in Japanese Unexamined Patent Publication JP-A 62-186347 (1987). The compact electronic calculator having a graph display function in this publication displays a graph on its display unit. To enlarge the graph, the operator presses a tablet overlaid on the display unit such that the locus of points touched with his or her finger forms a closed line. The calculator enlarges the region of the graph which is enclosed by the locus. To reduce the graph, the operator again presses the tablet such that the locus of points touched with his or her finger forms a closed line. The calculator reduces the graph such that the entire graph is displayed inside the region enclosed by the locus in the display unit. Even this calculator may fail to display a line representing points at coordinates defined by the function on the display unit when the graph is initially displayed, depending on the function to be processed. In this case, it is difficult to enlarge or reduce the graph to display the line. 
     SUMMARY OF THE INVENTION 
     It is an object of the invention to provide a calculator in which a display range of a graph of a function can be easily set by a user. 
     In a first aspect of the invention a calculator capable of displaying a graph of a function comprises: 
     function input means for inputting the function; 
     display means for displaying a graph of the function inputted by the function input means; 
     reduction display control means for causing the display means to display the graph of the function on a reduced scale; 
     display range changing means for changing display ranges for an X-axis and a Y-axis of the reduced graph of the function scaled down by the reduction display means; and 
     graph correcting means for causing the display means to display a graph of the function on the scale before the reduction based on the display ranges changed by the display range changing means. 
     According to the first aspect of the invention, the calculator can easily change the display ranges of the X-axis and Y-axis of the graph of the function. As a result, the graph of the function can be quickly displayed such that it agrees with an image that the user wishes for the graph to give. 
     In a second aspect of the invention, a calculator capable of displaying a graph of a function comprises: 
     function input means for inputting the function; 
     display means for displaying a graph of the function inputted by the function input means; 
     reduction display control means for causing the display means to display the graph of the function on a reduced scale; 
     button display control means for displaying a plurality of display range change instruction buttons for changing display ranges of an X-axis and a Y-axis of the reduced graph of the function; 
     instruction detecting means for individually detecting whether an instruction has been made on each of the display range change instruction buttons or not; 
     display range changing means for causing the instruction detecting means to detect whether an instruction has been made on each of the display range change instruction buttons or not and for changing the display ranges in accordance with the display range change instruction button on which an instruction is made; and 
     graph correcting means for causing the display means to display the reduced graph of the function on the scale before the reduction based on the display ranges changed by the display range changing means. 
     According to the second aspect of the invention, in response to instructions by the user on the display range change instruction buttons, the calculator can easily change the display ranges of the X-axis and Y-axis of the graph of the function. As a result, the graph of the function can be more quickly displayed such that it agrees with an image that the user wishes for the graph to give. 
     In a third aspect of the invention, each of the display range change instruction buttons of the calculator according to the second aspect respectively correspond to increase in upper limit value of the display range of the X-axis, decrease in upper limit value of the display range of the X-axis, increase in lower limit value of the display range of the X-axis, decrease in lower limit value of the display range of the X-axis, increase in upper limit value of the display range of the X-axis, decrease in upper limit value of the display range of the Y-axis, increase in lower limit value of the display range of the Y-axis and decrease in lower limit value of the display range of the Y-axis; and 
     the display range change instruction buttons are disposed in positions around the reduced graph of the function in accordance with the upper and lower limit values corresponding to the display range change instruction buttons, respectively. 
     According to the third aspect, each of the display range change instruction buttons has the configuration described above. This allows the operator to easily understand the process corresponding to each of the display range change instruction buttons. Therefore it is extremely easy to change the display ranges of the X-axis and the Y-axis. 
     In a fourth aspect of the invention, the display range changing means of the calculator according to the third aspect increases the current upper or lower limit value of the display range of the X-axis by a predetermined first value when an instruction is made on the display range change instruction button corresponding to increase in upper or limit value of the X-axis; decreases the current upper or lower limit value of the display range of the X-axis by the predetermined first value when an instruction is made on the display range change instruction button corresponding to decrease in upper or lower limit value of the X-axis; increases the current upper or lower limit value of the display range of the Y-axis by a predetermined second value when an instruction is made on the display range change instruction button corresponding to increase in upper or lower limit value of the Y-axis; and decreases the current upper or lower limit value of the display range of the Y-axis by the predetermined second value when an instruction is made on the display range change instruction button corresponding to decrease in upper or lower limit value of the Y-axis. 
     According to the fourth aspect, the display range changing means of the calculator operates as described above depending on which of the display range change instruction buttons is operated. As a result, since calculations to be made by the display range changing means are simplified, the display range can be more quickly changed. 
     In a fifth aspect of the invention, the display range changing means of the calculator according to the second aspect changes the display ranges each time an instruction is made on any one of the display range change instruction buttons, and 
     each time the display ranges are changed, the reduction display control means further causes the display means to display the graph of the function on the same scale as that of the reduced graph of the function based on the changed display ranges. 
     According to the fifth aspect of the invention, the reduction display instruction means and the display range changing means of the calculator perform the additional above-described operations. This allows the operator to confirm the display ranges each time the display ranges are changed. Further, since the graph of the function based on the changed display ranges is smaller than the graph initially displayed by the display means, the time required to display the graph of the function after an instruction on the display range change instruction buttons can be shortened. It is therefore possible to quickly and reliably change the display ranges. 
     In a sixth aspect of the invention, the calculator further comprises coordinate detecting means provided so as to overlay the display means, for detecting coordinates of a specified point in the display means, and 
     the instruction detecting means regards each of the display range change buttons displayed in a region including the detected coordinate in the display means as the display range change instruction button on which an instruction has been made. 
     According to the sixth aspect of the invention, the calculator further comprises the coordinate detecting means. The calculator can increase and decrease the display ranges of the X-axis and the Y-axis, i.e., X min , X max , Y min  and Y max  in response to the operator touching a part of the coordinate detecting means located on one of the display range change instruction buttons, for example, with instruction means such as a pen. As a result, the calculator can quickly display a graph of a function that has an image that the user wishes it to give. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Other and further objects, features, and advantages of the invention will be more explicit from the following detailed description taken with reference to the drawings wherein: 
     FIG. 1 is a block diagram showing an electrical configuration of a calculator of an embodiment of the present invention; 
     FIG. 2 is a diagram showing an example of a display of a graph before changing a display range of the calculator for graphs of functions; 
     FIG. 3 is a diagram showing an example of a display of graphs of functions and a periphery thereof when the display ranges of the calculator are changed; 
     FIG. 4 is a flow chart showing the flow of a process of changing the display ranges of the calculator; and 
     FIG. 5 is a diagram showing an example of a display of a graph after changing the display ranges of the calculator. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Now referring to the drawings, preferred embodiments of the invention are described below. 
     FIG. 1 is a block diagram showing a configuration of a calculator of one embodiment of the invention. The calculator comprises a key input unit 1, a display unit 2, a touched position detecting unit 3, a control unit 4. The calculator is capable of displaying a graph of a function. 
     The key input unit 1 is comprised of numerical keys such as &#34;1&#34; through &#34;0&#34;, symbol keys for inputting various symbols such as &#34;+&#34; and instruction keys for instructing display of a graph and commands. For example, the display unit 2 is constituted by a liquid crystal display having a display screen capable of displaying an image of 96 dots wide by 64 dots high. Further, the display unit 2 includes a transparent touch panel 5 provided in contact with the upper surface of its display screen. The touched position detecting unit 3 detects the X-coordinate and Y-coordinate of the position of a point in the touch panel 5 instructed by a user using instruction means such as a pen. The coordinates correspond to the coordinates of a point in the display screen directly under the position of the point in the touch panel 5. The control unit 4 is comprised of a microprocessor, a ROM, a RAM, a driving circuit for the liquid crystal display, a circuit for interface with the key input unit 1, a circuit for interface with the touched position detecting unit 3, etc. The configuration of each of those parts is not significantly different from conventional configurations. 
     The calculator for displaying a graph of a function displays a graph as shown in FIG. 2 in the manner described below. 
     First, the operator of the calculator operates a key for instructing the input of a function on the key input unit 1 and then inputs functions to be processed. Assume that the functions are two functions represented by Equations (3) and (4) in the following description. 
     
         Y=X.sup.2                                                  (3) 
    
     
         Y=2X+3                                                     (4) 
    
     Next, the operator operates a key for instructing the display of a graph of the functions on the key input unit 1. As a result, the calculator displays a graph of the functions with the coordinates of the left, right, lower and upper ends represented by X min , X max , Y min  and Y max , respectively. 
     The X min  is a lower limit value of a display range RX of the X-axis of the graph of the functions. The X max  is an upper limit value of the display range RX of the X-axis. The Y min  is a lower limit value of a display range RY of the Y-axis of the graph of the functions. The Y max  is an upper limit value of the display range RY of the Y-axis. For X min , X max , Y min  and Y max  and numerical values substituted to the variables in Equations (3) and (4), &#34;1&#34; corresponds to 10 dots on the display display ranges of the X-axis and Y-axis correspond to the ranges of sets of points at coordinates defined by the functions, i.e., the range of coordinates (x, y) of the points for determining a part of the graph of the function f(x) to be displayed on the display screen of the display unit 2. 
     Each of X min , X max , Y min  and Y max  can be set by the user before the graph of the functions is displayed. When the user does not set them, a predetermined initial value of each of X min , X max , Y min  and Y max  is used. The example in FIG. 2 is an example of a display of the graph of Equations (3) and (4) where X min  =-4.7; X max  =4.7; Y min  =-3.1, and Y max  =3.1. In the example in FIG. 2, both of an X-axis gx and a Y-axis gy have a scale in one increment. A numerical value &#34;1&#34; corresponds to a length for 10 dots on the display screen. The outer frame of the graph coincides with a frame &#34;a&#34; of the display screen. 
     The graph in FIG. 2 shows loci g1 and g2 of points (x, y) formed when a variable x moves in domains for Equations (3) and (4), i.e., a graph of Equations (3) and (4) is drawn. Referring to the graph in FIG. 2, the characteristics of the graph can be obtained from the display. However, while the loci of Equations (3) and (4) have two intersections, the graph on FIG. 2 shows only one intersection and does not show the other intersection and hence it can not be regarded as an optimum display that allows a total image of the graph to be properly obtained. 
     When the user operates a key for instructing a reduced display on the key input unit 1 in the state shown in FIG. 2, the display state of the display screen is switched to a state shown in FIG. 3. 
     The graph GR1 in FIG. 2 is displayed in a region 10 in FIG. 3 on a reduced scale. Assume that the reduced graph GR2 is displayed with vertical and horizontal lengths thereof which is 1/2 of the vertical and horizontal lengths of the display screen (FIG. 2) respectively and have an area which is one-fourth of the display screen. There is no special need for using the value 1/2 and the value may be changed depending on the layout of the screen as appropriate. Further, a plurality of buttons 11 through 18 are displayed around the reduced graph. The button 11 is for instructing an increase in the value of Y max . The button 12 is for instructing a decrease in the value of Y max . The button 13 is for instructing an increase in the value of X max . The button 14 is for instructing a decrease in the value of X max . Similarly, the button 15 is for instructing an increase in the value of Y min . The button 16 is for instructing a decrease in the value of Y min . The button 17 is for instructing an increase in the value of X min . The button 18 is for instructing a decrease in the value of X min . 
     FIG. 4 is a flow chart showing the flow of a process wherein an instruction is made on each of the buttons 11 through 18. X scl  in the flow chart is a predetermined value to serve as a unit for the scale on the X-axis and, Y scl  is a predetermined value to serve as a unit for the scale on the Y-axis similarly. In this embodiment of the invention, X scl  and Y scl  are both &#34;1&#34;. 
     When the user touches the touch panel 5 provided on the upper surface of the display unit 2 with a pen or the like, the touched position detecting unit 3 detects the coordinate of the touched position and sends it to the control unit 4. In response to this operation, the process in FIG. 4 is started. At step n1, it is determined whether the coordinate corresponds to the button 11 or not. If there is correspondence, the process proceeds from step n1 to step n2 and, if there is no correspondence, the process proceeds from step n1 to step n3. Similarly, steps n3, n5, n7, n9, n11, n13 and n15 are steps for determining whether the coordinate corresponds to the buttons 12 through 18, respectively. If there is correspondence, the process proceeds from steps n3, n5, n7, n9, n11, n13 and n15 to steps n4, n6, n8, n10, n12, n14 and n16 respectively and, if there is no correspondence, the process proceeds from steps n3, n5, n7, n9, n11, n13 and n15 to steps n5, n7, n9, n11, n13, n15 and n18 respectively. 
     At step n2, as indicated by Equation (5), the control unit 4 updates Y max  by adding Y scl  thereto. At step n4, as indicated by Equation (6), the control unit 4 updates Y max  by subtracting Y scl  therefrom. Similarly, at steps n8, n10, n12, n14 and n16, the control unit 4 carries out calculations indicated by Equations (7) through (12). As a result, the display ranges of the X-axis or Y-axis of the graph of the functions are updated in response to the buttons corresponding to the coordinates, i.e., the buttons on which the user has made an instruction. 
     
         Y.sub.max +Y.sub.scl →Y.sub.max                     (5) 
    
     
         Y.sub.max -Y.sub.scl →Y.sub.max                     (6) 
    
     
         X.sub.max +X.sub.scl →X.sub.max                     (7) 
    
     
         X.sub.max -X.sub.scl →X.sub.max                     (8) 
    
     
         Y.sub.min +Y.sub.scl →Y.sub.min                     (9) 
    
     
         Y.sub.min -Y.sub.scl →Y.sub.min                     (10) 
    
     
         X.sub.min +X.sub.scl →X.sub.min                     (11) 
    
     
         X.sub.min -X.sub.scl →X.sub.min                     (12) 
    
     When the processes at steps n2, n4, n6, n8, n10, n12, n14 and n16 are completed, the process proceeds to step n17 where the control unit 4 displays the graph of the functions again on the same scale as the graph GR2 in FIG. 3 based on the updated display range. After the second display, the process of the flow chart in FIG. 4 terminates at step n18. When the coordinate does not correspond to any of the buttons 11 through 18, the process directly proceeds from step n15 to step n18 to terminate the process of the flow chart in FIG. 4. 
     For example, when the control unit 4 determines that the coordinate corresponds to the button 11 (step n1), Y scl  is added to Y max  (step n2). In the case in FIG. 3, since the initial values X min  =-4.7; X max  =4.7; Y min  =-3.1; and Y max  =3.1, Y max  is added with Y scl  to obtain 3.1+1=4.1. The graph that resides in the region 10 in FIG. 1 is displayed again based on this newly determined value (step n17). When the user touches the button 11 again in this state, the processes at steps n1, n2 and n17 are performed again and therefore Y max  becomes 5.1. 
     Similarly, when the user touches the button 12 (step n3), Y scl  is subtracted from Y max  (step n4). In this example, Y max  becomes 3.1-1=2.1. When an instruction is made on the buttons 13 through 18, a similar process is performed respectively (steps n5 through n16) to provide a second display (step n17). 
     The user confirms the second display of the graph of the functions and presses a key for instructing display of the graph on the key input unit 1 when the graph enters into a desired state of display. In response to this, the calculator returns the graph GR3 displayed again as shown in the display of the graph in FIG. 5 to the same scale as that of the display of the graph in FIG. 2. Such a process allows the user to easily cause the calculator to display the graph in a desired range. 
     As described above, when a graph of functions is displayed on the calculator, the user can quickly cause a display of a proper graph by making instructions on the buttons provided around a reduction-displayed graph while checking the reduced display. 
     Further, when the display range is changed, since the region 10 for displaying the reduced graph is a region having an area which is one-fourth of that of the display screen, the time required for displaying the graph again after the instructions using the buttons can be reduced to allow the display range to be changed quickly. 
     The invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description and all changes which come within the meaning and the range of equivalency of the claims are therefore intended to be embraced therein.