<commit_before># hpgl
**A Node.js library to control HPGL-compatible plotters**

[![npm](https://img.shields.io/npm/v/hpgl.svg)](https://www.npmjs.com/package/hpgl)
[![npm](https://img.shields.io/npm/dt/hpgl.svg)](https://www.npmjs.com/package/hpgl)
[![Beerpay](https://beerpay.io/cotejp/hpgl/badge.svg?style=flat)](https://beerpay.io/cotejp/hpgl) 

### About

The `hpgl` library makes it possible to interact with plotters that support the *Hewlett-Packard 
Graphics Language* (a.k.a. **hpgl**). This language is the *de facto* standard for most plotters. 

**Warning: This library is still in early stages of development. It should not be used in 
production.**

### Compatibility

This library relies on external modules for serial communication. To use it in a pure Node.js, 
environment, you will need to install and use the 
[serialport](https://www.npmjs.com/package/serialport) module. If you want to use this library 
inside [Chrome Apps](https://developer.chrome.com/apps/about_apps) or [NW.js](http://nwjs.io/)
applications, you will need the 
[browser-serialport](https://www.npmjs.com/package/browser-serialport) module instead. 

> *Note: it is possible to use `node-serialport` within NW.js and Electron projects but it needs to 
> be specifically recompiled for those environment.*

So far, the library has only beed tested with an 
[HP 7475a plotter](http://hpmuseum.net/display_item.php?hw=74). If you have success with other makes
or models, [let me know](https://twitter.com/jpcote). Beware that some HP plotters are only equipped 
with a proprietary HPIB or GPIB interface. To use this library, your plotter must have a **serial**
interface (RS-232-C).

### Coordinate Sytem

The plotting coordinate system is anchored in the top-left corner, just like a computer screen. 
This means positive `x` goes right and positive `y` goes down. By default, plotters usually work 
differently, but I find it easier to stick with the computer screen standard.

### Getting Started

To get started, you will need a few pieces of hardware:

- HPGL-compatible plotter with a serial interface;
- USB-to-Serial adapter (unless your computer has a serial port);
- Male DB-25 to female DB-9 cable (a.k.a. null modem cable);
- Pens that fit your plotter;<commit_msg>Now tested with 7440A<commit_after># hpgl
**A Node.js library to control HPGL-compatible plotters**

[![npm](https://img.shields.io/npm/v/hpgl.svg)](https://www.npmjs.com/package/hpgl)
[![npm](https://img.shields.io/npm/dt/hpgl.svg)](https://www.npmjs.com/package/hpgl)
[![Beerpay](https://beerpay.io/cotejp/hpgl/badge.svg?style=flat)](https://beerpay.io/cotejp/hpgl) 

### About

The `hpgl` library makes it possible to interact with plotters that support the *Hewlett-Packard 
Graphics Language* (a.k.a. **hpgl**). This language is the *de facto* standard for most plotters. 

**Warning: This library is still in early stages of development. It should not be used in 
production.**

### Compatibility

This library relies on external modules for serial communication. To use it in a pure Node.js, 
environment, you will need to install and use the 
[serialport](https://www.npmjs.com/package/serialport) module. If you want to use this library 
inside [Chrome Apps](https://developer.chrome.com/apps/about_apps) or [NW.js](http://nwjs.io/)
applications, you will need the 
[browser-serialport](https://www.npmjs.com/package/browser-serialport) module instead. 

> *Note: it is possible to use `node-serialport` within NW.js and Electron projects but it needs to 
> be specifically recompiled for those environment.*

So far, the library has only beed tested with 
[HP 7475A](http://hpmuseum.net/display_item.php?hw=74) and  
[HP 7440A](http://www.hpmuseum.net/display_item.php?hw=80) plotters. If you have success with other 
makes or models, [let me know](https://twitter.com/jpcote). Beware that some HP plotters are only 
equipped with a proprietary HPIB or GPIB interface. To use this library, your plotter must have a 
**serial** interface (RS-232-C).

### Coordinate Sytem

The plotting coordinate system is anchored in the top-left corner, just like a computer screen. 
This means positive `x` goes right and positive `y` goes down. By default, plotters usually work 
differently, but I find it easier to stick with the computer screen standard.

### Getting Started

To get started, you will need a few pieces of hardware:

- HPGL-compatible plotter with a serial interface;
- USB-to-Serial adapter (unless your computer has a serial port);
- Male DB-25 to female DB-9 cable (a.k.a. null modem cable);
- Pens that fit your plotter;
{'fraction_non_alphanumeric': 0.1126057713169885, 'fraction_numerical': 0.007376871338685182, 'mean_word_length': 4.410798122065728, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 20, 'lorem ipsum': 0, 'www.': 9, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '583954', 'n_tokens_mistral': 1498, 'n_tokens_neox': 1394, 'n_words': 542}