JPH055674B2 - - Google Patents
Info
- Publication number
- JPH055674B2 JPH055674B2 JP58196672A JP19667283A JPH055674B2 JP H055674 B2 JPH055674 B2 JP H055674B2 JP 58196672 A JP58196672 A JP 58196672A JP 19667283 A JP19667283 A JP 19667283A JP H055674 B2 JPH055674 B2 JP H055674B2
- Authority
- JP
- Japan
- Prior art keywords
- graph
- data
- maximum value
- register
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Landscapes
- Record Information Processing For Printing (AREA)
Description
【発明の詳細な説明】
〔発明の技術分野〕
本発明はグラフ印字機能を有するプリンタ装置
に関する。DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a printer device having a graph printing function.
従来、グラフ作成機能を有するグラフイツクプ
リンタにおいて、グラフの種類を指定し、データ
を入力すると自動的にグラフを作成するものがあ
る。この場合、グラフの縦方向のスケールは、最
大のデータに従つて自動的に設定されるため、第
1図に示すように最大データの量が他のデータと
比べて大きく異なつた場合、他のデータのグラフ
が極めて見難いものとなつていた。また、この種
のプリンタでは、グラフの縦方向のスケールを任
意に指定できるものであるが、この場合、指定さ
れたスケール以上のデータはグラフの作成は不可
能であり、グラフのオーバーフロー印字がなされ
るのみであつた。
2. Description of the Related Art Conventionally, some graphics printers have a graph creation function that automatically creates a graph when the type of graph is specified and data is input. In this case, the vertical scale of the graph is automatically set according to the maximum data, so if the amount of maximum data differs greatly from other data as shown in Figure 1, The data graphs were extremely difficult to read. In addition, with this type of printer, you can specify the vertical scale of the graph, but in this case, it is impossible to create a graph for data larger than the specified scale, and the graph will overflow. It was only possible.
本発明は上記の点に鑑みてなされたもので、入
力データに従つて自動的にグラフを作成する場
合、最大データ量が他のデータと比べて大きく異
なつている場合でも、見易いグラフを作成するこ
とができるグラフ印字機能を有するプリンタ装置
を提供することを目的とする。
The present invention has been made in view of the above points, and it is possible to create an easy-to-read graph even when the maximum amount of data is significantly different from other data when automatically creating a graph according to input data. An object of the present invention is to provide a printer device having a graph printing function capable of printing graphs.
以下図面を参照して本発明の一実施例を説明す
る。第2図において、11はCPUで、このCPU
11には、キー入力部12、表示部13、データ
バツフア14、X−Yプロツトコントローラ15
が接続されている。上記キー入力部12は、各種
データ入力用のキーと共に、GRAPHキー12a
及びMAXキー12bを備えている。そして、上
記X−Yプロツトコントローラ15には、キヤラ
クタジエネレータ16及びRAM17が接続され
ている。上記キヤラクタジエネレータ16は、第
1〜第3の記憶エリア16a〜16cを備え、各
記憶エリア16a〜16cに、棒グラフ、折線グ
ラフ、文字・記号等を印字する上での基本となる
ステツプデータをそれぞれ記憶している。また、
RAM17には、MAX,M,m,S,D1,D2の
レジスタが設けられており、MAXレジスタには
設定された縦方向の印字スケールの最大値、Mレ
ジスタにはデータバツフア14に記憶されている
データの最大値、mレジスタにはデータバツフア
14に記憶されているデータの最小値、Sレジス
タにはデータの最大値Mと最小値mとを比較する
場合に使用される定数「10」、D1,D2レジスタに
はデータバツフア14から読出されるデータが、
それぞれ書込まれる。しかして、上記X−Yプロ
ツトコントローラ15から、X方向モータドライ
ブ回路18及びY方向モータドライブ回路19に
駆動指令が送られてプロツタ部20が駆動される
ようになつている。すなわち、X−Yプロツトコ
ントローラ15からモータドライブ回路18に対
しては、印字ヘツドを1ステツプ移動させるX方
向ステツプ信号SX、印字ヘツドを「−X」方向
へ移動させるためのレフト信号L、印字ヘツドの
アツプ/ダウンを指令するアツプ/ダウン信号
U/Dが送られる。また、X−Yプロツトコント
ローラ15からモータドライブ回路19には、記
録紙を1ステツプ移動させるY方向ステツプ信号
SY、記録紙を「−Y」方向へ移動させるための
リバース信号Rが送られる。
An embodiment of the present invention will be described below with reference to the drawings. In Figure 2, 11 is the CPU, and this CPU
11 includes a key input section 12, a display section 13, a data buffer 14, and an X-Y plot controller 15.
is connected. The key input section 12 includes keys for inputting various data as well as a GRAPH key 12a.
and a MAX key 12b. A character generator 16 and a RAM 17 are connected to the XY plot controller 15. The character generator 16 has first to third storage areas 16a to 16c, each of which stores step data that is the basis for printing bar graphs, line graphs, characters/symbols, etc. I remember each. Also,
The RAM 17 is provided with registers for MAX, M, m, S, D 1 and D 2. The MAX register contains the maximum value of the set vertical print scale, and the M register contains the maximum value stored in the data buffer 14. The maximum value of data stored in the m register, the minimum value of data stored in the data buffer 14, the S register a constant "10" used when comparing the maximum value M and the minimum value m of data, The data read from the data buffer 14 is stored in the D 1 and D 2 registers.
Each is written. Drive commands are sent from the X-Y plot controller 15 to the X-direction motor drive circuit 18 and the Y-direction motor drive circuit 19 to drive the plotter section 20. That is, the X-Y plot controller 15 sends an X-direction step signal SX to the motor drive circuit 18 to move the print head one step, a left signal L to move the print head in the "-X" direction, and a print signal. Up/down signals U/D are sent to command the heads to go up/down. Further, a Y direction step signal for moving the recording paper one step is sent from the X-Y plot controller 15 to the motor drive circuit 19.
SY, a reverse signal R is sent to move the recording paper in the "-Y" direction.
次に上記実施例の動作を第3図のフローチヤー
トを参照して説明する。グラフ作成に際し、グラ
フ最大値を特に指定しない場合は、グラフの全デ
ータ入力後、GRAPHキー12aを操作する。ま
た、グラフ最大値を指定する場合は、グラフの全
データを入力した後、グラフ最大値を入力して
MAXキー12bを操作し、次いでGRAPHキー
12aを操作する。このGRAPHキー12aの操
作により第3図に示すフローチヤートに従つてX
−Yプロツトコントローラ15の処理が開始され
る。まず、第3図のステツプA1に示すようにグ
ラフ最大値が入力指定されているか否かを判断
し、グラフ最大値が入力指定されていない場合は
ステツプA2に進み、データバツフア14からグ
ラフデータの最大値を読出してRAM17内のM
レジスタに書込む。次いでステツプA3において
データバツフア14からデータ最小値を読出し、
mレジスタに書込む。その後、ステツプA4に進
み、mレジスタに保持しているデータ最小値mに
Sレジスタの内容「10」を乗じ、その乗算結果が
Mレジスタに保持しているデータ最大値Mより小
さいか否かを判断する。すなわち、データ最大値
Mがデータ最小値の約10倍より大きくなるとグラ
フが見難くなるので、その状態をステツプA4に
おいて判断している。そして、このステツプA4
において、「M>m×10」であると判断されると、
ステツプA5へ進み、データバツフア14に記憶
されているデータの平均値を算出し、その平均値
をグラフ最大値とみなし、MAXレジスタに設定
する。その後、ステツプA6に進み、MAXレジス
タに設定したグラフ最大値に従つてグラフの縦軸
スケールを印字する。また、上記グラフ最大値を
予めキー入力部12から入力指定した場合は、ス
テツプA1から直ちにステツプA6に進んで縦軸ス
ケールを印字する。続いてステツプA7に進み、
グラフの横軸を印字する。次いでステツプA8に
進み、データバツフア14から最初のグラフデー
タを読出し、D1,D2レジスタに書込む。そして、
ステツプA9に示すようなグラフ最大値がD2レジ
スタの保持データより大きいか否かを判断し、
MAX>D2であればステツプA10に進み、第4図
a,bに示すようにD2レジスタの保持データに
従つてグラフを印字すると共に、ステツプA11へ
進んで印字グラフの上部にD1レジスタに保持し
ている値を印字する。第4図aは、第4図cに示
すA社における1月〜6月の売上げをグラフ化し
た場合の例を示すものである。しかして、その
後、ステツプA12において、データバツフア14
に残データがあるか否かを判断し、残データがあ
ればステツプA8に戻る。以下同様にしてステツ
プA8〜A12の処理を繰返し、データバツフア14
に保持されているデータが順次読み出され、グラ
フ印字が行なわれる。この場合、例えばA社の4
月の売上げのようにデータが大きく、ステツプ
A9において、グラフ最大値よりもD2レジスタの
保持データの方が大きいと判断されると、ステツ
プA13へ進んで特殊グラフを印字する。すなわ
ち、第4図aの4月の売上げにおいて、グラフ最
大値までの特殊棒グラフG1を印字する。この特
殊棒グラフG1は、最上位の部分に横線を印字せ
ず、空白のままとする。次いでステツプA14に示
すようにD2レジスタの保持データからグラフ最
大値を減算し、その後、ステツプA9へ戻る。こ
のステツプA9において、再度グラフ最大値とD2
レジスタの内容を比較し、未だ最大値よりもD2
レジスタの保持データの方が大きければステツプ
A13に進んで上記棒グラフG1の次に同様の棒グラ
フG2を印字する。以下同様にしてステツプA9,
A13,A14の処理を繰返し、特殊グラフの印字を
行なう。そして、棒グラフG3まで印字した後、
ステツプA9においてMAX>D2であると判断され
ると、ステツプA10に進み、その時D2レジスタに
保持されているデータに合わせて通常の棒グラフ
G4を印字する。続いてステツプA11において棒グ
ラフG4の上部にD1レジスタに保持されている4
月の売上げ数値を印字する。以下同様の処理によ
りデータバツフア14からデータを読出してグラ
フ印字し、ステツプA12において残データ無しと
判断されるとグラフ作成を終了する。 Next, the operation of the above embodiment will be explained with reference to the flowchart of FIG. When creating a graph, if the graph maximum value is not specified, operate the GRAPH key 12a after inputting all data for the graph. Also, if you want to specify the graph maximum value, enter all the data for the graph, then enter the graph maximum value.
Operate the MAX key 12b and then operate the GRAPH key 12a. By operating this GRAPH key 12a, the
-The processing of the Y plot controller 15 is started. First, as shown in step A1 in FIG. 3, it is determined whether the maximum value of the graph has been specified as an input. If the maximum value of the graph has not been specified as input, the process proceeds to step A2 , where the graph data is transferred from the data buffer 14. Read the maximum value of M in RAM17.
Write to register. Next, in step A3 , the minimum data value is read from the data buffer 14,
Write to m register. After that, proceed to step A4 , multiply the minimum data value m held in the m register by the contents of the S register "10", and check whether the multiplication result is smaller than the maximum data value M held in the M register. to judge. That is, if the maximum data value M becomes larger than about 10 times the minimum data value, the graph becomes difficult to see, so this condition is determined in step A4 . And this step A 4
When it is determined that "M>m×10",
Proceeding to step A5 , the average value of the data stored in the data buffer 14 is calculated, the average value is regarded as the maximum value of the graph, and is set in the MAX register. Thereafter, the process proceeds to step A6 , where the vertical axis scale of the graph is printed according to the graph maximum value set in the MAX register. If the maximum value of the graph is specified in advance by inputting it from the key input unit 12, the process immediately proceeds from step A1 to step A6 to print the vertical axis scale. Then proceed to step A7 ,
Print the horizontal axis of the graph. Next, the process proceeds to step A8 , where the first graph data is read from the data buffer 14 and written into the D1 and D2 registers. and,
Step A Determine whether the maximum value of the graph as shown in 9 is greater than the data held in register D 2 ,
If MAX > D 2 , proceed to step A 10 , and print the graph according to the data held in the D 2 register as shown in Figure 4 a and b. At the same time, proceed to step A 11 , and print D at the top of the printed graph. 1 Print the value held in register. FIG. 4a shows an example of a graph of sales from January to June for company A shown in FIG. 4c. Then, in step A12 , the data buffer 14 is
It is determined whether or not there is any remaining data, and if there is any remaining data, the process returns to step A8 . Thereafter, the processes of steps A8 to A12 are repeated in the same manner, and the data buffer 14 is
The data held in the memory is sequentially read out and graphs are printed. In this case, for example, company A's 4
Large data such as monthly sales and step-by-step
If it is determined in A9 that the data held in the D2 register is larger than the maximum value of the graph, the process proceeds to step A13 and a special graph is printed. That is, for the April sales shown in FIG. 4a, a special bar graph G1 up to the maximum value of the graph is printed. This special bar graph G1 does not print a horizontal line at the top, leaving it blank. Next, as shown in step A14 , the maximum value of the graph is subtracted from the data held in the D2 register, and then the process returns to step A9 . In this step A 9 , the graph maximum value and D 2
Compare the contents of the registers, still less than the maximum value D 2
If the data held in the register is larger, step
Proceed to A 13 and print a similar bar graph G 2 next to the above bar graph G 1 . Similarly, step A 9 ,
Repeat steps A 13 and A 14 to print the special graph. Then, after printing up to bar graph G 3 ,
If it is determined in step A 9 that MAX > D 2 , the process proceeds to step A 10 and displays a normal bar graph according to the data held in the D 2 register at that time.
Print G 4 . Next, in step A11 , the 4 held in the D1 register is placed above the bar graph G4.
Print monthly sales figures. Thereafter, similar processing is performed to read data from the data buffer 14 and print the graph, and when it is determined in step A12 that there is no remaining data, the graph creation is terminated.
また、ステツプA4において、Mレジスタに保
持しているデータ最大値Mがmレジスタに保持し
ている最小値mの10倍より小さいと判断された場
合は、ステツプA15に進み、Mレジスタのデータ
最大値に合わせてグラフ最大値をMAXレジスタ
に設定する。次いでステツプA16に進み、第4図
bに示すように上記グラフ最大値に従つて縦軸ス
ケールを印字する。第4図bは第4図cに示すB
社における1月〜6月の売上げをグラフ化した場
合の例を示したものである。そして、ステツプ
A17において横軸を印字した後、ステツプA18に
示すようにデータバツフア14から1月のデータ
を読出し、D1レジスタに書込む。次いでステツ
プA19に進み、第4図bに示すようにD1レジスタ
の保持データに合わせてグラフ印字すると共に、
ステツプA20においてD1レジスタの保持データの
値をグラフの上部において印字する。その後、ス
テツプA21に進み、データバツフア14にデータ
が残つているか否か判断し、データが残つていれ
ばステツプA18へ戻つて同様の処理を繰返す。そ
して、データバツフア14から全データが読出さ
れ、その印字を終了するとステツプA21の判断結
果がNOとなつてグラフ作成処理を終了する。 Furthermore, if it is determined in step A4 that the maximum data value M held in the M register is smaller than 10 times the minimum value m held in the m register, the process proceeds to step A15 , and the data stored in the M register is Set the graph maximum value in the MAX register according to the data maximum value. Next, the process proceeds to step A16 , where a vertical axis scale is printed according to the maximum value of the graph as shown in FIG. 4b. Figure 4b is B shown in Figure 4c.
This is an example of a graph of sales for a company from January to June. And step
After printing the horizontal axis at step A17 , January data is read from the data buffer 14 and written to the D1 register as shown at step A18 . Next, proceed to step A19 , as shown in FIG. 4b, a graph is printed according to the data held in register D1 , and
In step A20 , the value of the data held in the D1 register is printed at the top of the graph. Thereafter, the process proceeds to step A21 , where it is determined whether or not there is any data left in the data buffer 14. If any data remains, the process returns to step A18 and the same process is repeated. Then, when all the data is read out from the data buffer 14 and printing is completed, the judgment result in step A21 becomes NO and the graph creation process ends.
なお、上記実施例では、全データを入力した後
にグラフ作成処理を開始するようにしたが、
MAXキー12bにより印字スケール最大値を設
定した後に、各月のデータを入力する毎に
GRAPHキー12aを操作してグラフ印字を行な
うようにしてもよい。 Note that in the above embodiment, the graph creation process is started after all data has been input.
After setting the maximum value of the print scale with the MAX key 12b, each time you enter data for each month.
Graph printing may also be performed by operating the GRAPH key 12a.
さらに、上記実施例では、記録紙移動の縦方向
にグラフを作成した場合について示したが、横方
向にグラフを作成してもよい。さらにまた、印字
方式はX/Yプロツタに限らずドツト式サーマル
プリンタ等、他の印字方式を使用することができ
る。 Further, in the above embodiment, the graph is created in the vertical direction of the movement of the recording paper, but the graph may be created in the horizontal direction. Furthermore, the printing method is not limited to the X/Y plotter, but other printing methods such as a dot type thermal printer can be used.
以上述べたように本発明によれば、入力データ
に従つて自動的にグラフを作成する場合、最大デ
ータ量が他のデータと比べて大きく異なつている
場合でも、非常に見易いグラフを作成できるグラ
フ印字機能を有するプリンタ装置を提供し得るも
のである。
As described above, according to the present invention, when a graph is automatically created according to input data, a graph that is very easy to read can be created even when the maximum amount of data is significantly different from other data. A printer device having a printing function can be provided.
第1図は従来のプリンタ装置によるグラフ作成
例を示す図、第2図ないし第4図は本発明の一実
施例を示すもので、第2図は回路構成を示すブロ
ツク図、第3図は動作内容を示すフローチヤー
ト、第4図a,bはグラフ作成例を示す図、第4
図cはグラフ作成用データ例を示す図である。
11……CPU、12……キー入力部、13…
…表示部、14……データバツフア、15……X
−Yプロツトコントローラ、16……キヤラクタ
ジエネレータ、17……RAM、18,19……
モータドライバ、20……プロツタ部。
Fig. 1 is a diagram showing an example of graph creation using a conventional printer device, Figs. 2 to 4 show an embodiment of the present invention, Fig. 2 is a block diagram showing the circuit configuration, and Fig. 3 is a diagram showing an example of graph creation using a conventional printer device. Flowchart showing the operation contents, Figure 4 a and b are diagrams showing examples of graph creation, Figure 4
Figure c is a diagram showing an example of graph creation data. 11... CPU, 12... Key input section, 13...
...Display section, 14...Data buffer, 15...X
-Y plot controller, 16... Character generator, 17... RAM, 18, 19...
Motor driver, 20... plotter section.
Claims (1)
機能を有するプリンタ装置において、 グラフの印字可能なデータ最大量を設定する最
大値設定手段と、 入力データが上記設定された最大値より小さい
か否かを判断する判断手段と、 この判断手段が小さいと判断した場合には入力
データの値に応じた長さの棒グラフを印字し、大
きいと判断した場合には減算結果が最大値より小
さくなるまで入力データから最大値を減算し、減
算を行つた回数分の最大値に応じた長さの棒グラ
フと最終減算結果に応じた長さの棒グラフとを並
列印字するグラフ印字手段とを 具備したことを特徴とするグラフ印字機能を有
するプリンタ装置。[Scope of Claims] 1. A printer device having a graph creation function for converting input data into a bar graph, comprising: maximum value setting means for setting a maximum amount of data that can be printed in a graph; and input data is larger than the set maximum value. Judgment means to judge whether the value is small or not, and if this judgment means judges it to be small, it prints a bar graph with a length according to the value of the input data, and if it judges it to be large, the subtraction result is less than the maximum value. It is equipped with graph printing means that subtracts the maximum value from the input data until it becomes smaller, and prints in parallel a bar graph with a length corresponding to the maximum value for the number of subtractions and a bar graph with a length according to the final subtraction result. A printer device having a graph printing function characterized by the following.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP58196672A JPS6087074A (en) | 1983-10-20 | 1983-10-20 | Printer with graph-printing function |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP58196672A JPS6087074A (en) | 1983-10-20 | 1983-10-20 | Printer with graph-printing function |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6087074A JPS6087074A (en) | 1985-05-16 |
| JPH055674B2 true JPH055674B2 (en) | 1993-01-22 |
Family
ID=16361669
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP58196672A Granted JPS6087074A (en) | 1983-10-20 | 1983-10-20 | Printer with graph-printing function |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS6087074A (en) |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS5947682A (en) * | 1982-09-10 | 1984-03-17 | Sharp Corp | graphing machine |
-
1983
- 1983-10-20 JP JP58196672A patent/JPS6087074A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6087074A (en) | 1985-05-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH0263763A (en) | Printing apparatus | |
| JPH055674B2 (en) | ||
| JPH0747337B2 (en) | output method | |
| JPH06115224A (en) | Print image display device | |
| JP2922068B2 (en) | Word processor with character font correction function | |
| JP2555558B2 (en) | Character processor | |
| JP3125906B2 (en) | Document processing device with item area designation function | |
| JPS62255175A (en) | Standard format printing device | |
| JP2555557B2 (en) | Character processor | |
| JP2555556B2 (en) | Character processor | |
| JP3026992B2 (en) | Display control method and device | |
| JPH0752496A (en) | Printer | |
| JP3036064B2 (en) | Document output device | |
| JPH0615317Y2 (en) | Document processor | |
| JP2564778B2 (en) | Character output device | |
| JPS6411985B2 (en) | ||
| JPH09305352A (en) | Form output method | |
| JPS61860A (en) | Format setting system for electronic typewriter of japanese word | |
| JPS61148065A (en) | Recorded information input/output control method | |
| JPS6034873A (en) | Printing apparatus | |
| JPH02297218A (en) | Document processor | |
| JPH07106666B2 (en) | Document creation device | |
| JPS62286160A (en) | Word processor | |
| JPH04294179A (en) | Printer | |
| JPS61286157A (en) | Document former |