--- title: "Bar Chart (Syntax)" id: 76321 type: "computer_media" slug: "bar-chart-syntax" url: "http://localhost/computer_media/bar-chart-syntax/" markdown_url: "http://localhost/computer_media/bar-chart-syntax.md" published_at: "2026-11-11T08:03:11+00:00" modified_at: "2026-11-11T08:03:11+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/bar-chart-syntax-1.png" excerpt: "Plot up to 15 values from 0 to 2000 as a bar chart on the ZX81, using PLOT with a scale marked in thousands." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" - name: "ZX81" slug: "zx81" taxonomy: "post_tag" url: "http://localhost/tag/zx81/" model: - name: "Sinclair ZX81" slug: "zx81" taxonomy: "model" url: "http://localhost/model/zx81/" - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" indiv: - name: "Jon Passler" slug: "jon-passler" taxonomy: "indiv" url: "http://localhost/indiv/jon-passler/" genre: - name: "Graphics" slug: "graphics" taxonomy: "genre" url: "http://localhost/type/graphics/" media_type: "Program" programmers: - name: "Jon Passler" slug: "jon-passler" taxonomy: "indiv" url: "http://localhost/indiv/jon-passler/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Bar%20Chart%20%28Syntax%29%20%281982%29%28Passler%2C%20Jon%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1982" images: - url: "http://localhost/wp-content/uploads/2026/11/bar-chart-syntax-1.png" article_media: - id: 52501 title: "Bar Chart" type: "article" url: "http://localhost/article/bar-chart-2/" media_type_tags: "Graphics" license: false --- # Bar Chart (Syntax) A compact bar chart for the 8K ROM. Enter up to 15 values between 0 and 2000; the program draws a scale on the left marked 0, 1 and 2 (thousands) and PLOTs each value as a vertical bar, with each pixel standing for 100. It stops at the first value of 0. To change a value, enter LET B(A)=(new value) and then GOTO 1, not RUN. The article explains how to change the pixel range in line 90, the spacing in line 100, and the size of the array. Published in Syntax January 1982 ([Bar Chart](https://timexsinclair.com/article/bar-chart-2/)). ## Source Code ``` 1 DIM B(15) 2 FOR X=1 TO 15 3 INPUT B(X) 4 NEXT X 10 REM BAR CHART (0-2000) 20 FOR A=11 TO 21 30 PRINT AT A,1;"-" 40 NEXT A 50 PRINT AT 11,0;"2";AT 16,0;"1";AT 21,0;"0" 60 FOR A=1 TO 15 70 FOR P=1 TO 43 80 IF B(A)=0 THEN STOP 90 IF B(A)