From 7cb91953587736fc96a7b85a116d543ae940cbe3 Mon Sep 17 00:00:00 2001 From: Sachinn-64 Date: Fri, 14 Aug 2026 14:10:07 +0530 Subject: [PATCH 1/2] feat: add plot/base/symbol2shape --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: passed - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../@stdlib/plot/base/symbol2shape/README.md | 131 ++++++++++++++++++ .../base/symbol2shape/benchmark/benchmark.js | 56 ++++++++ .../plot/base/symbol2shape/docs/repl.txt | 28 ++++ .../base/symbol2shape/docs/types/index.d.ts | 50 +++++++ .../plot/base/symbol2shape/docs/types/test.ts | 45 ++++++ .../plot/base/symbol2shape/examples/index.js | 25 ++++ .../plot/base/symbol2shape/lib/index.js | 46 ++++++ .../plot/base/symbol2shape/lib/main.js | 130 +++++++++++++++++ .../plot/base/symbol2shape/package.json | 64 +++++++++ .../plot/base/symbol2shape/test/test.js | 97 +++++++++++++ 10 files changed, 672 insertions(+) create mode 100644 lib/node_modules/@stdlib/plot/base/symbol2shape/README.md create mode 100644 lib/node_modules/@stdlib/plot/base/symbol2shape/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/plot/base/symbol2shape/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/plot/base/symbol2shape/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/plot/base/symbol2shape/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/plot/base/symbol2shape/examples/index.js create mode 100644 lib/node_modules/@stdlib/plot/base/symbol2shape/lib/index.js create mode 100644 lib/node_modules/@stdlib/plot/base/symbol2shape/lib/main.js create mode 100644 lib/node_modules/@stdlib/plot/base/symbol2shape/package.json create mode 100644 lib/node_modules/@stdlib/plot/base/symbol2shape/test/test.js diff --git a/lib/node_modules/@stdlib/plot/base/symbol2shape/README.md b/lib/node_modules/@stdlib/plot/base/symbol2shape/README.md new file mode 100644 index 000000000000..256f246ddcb7 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/base/symbol2shape/README.md @@ -0,0 +1,131 @@ + + +# symbol2shape + +> Convert a [symbol][@stdlib/plot/base/assert/is-symbol] alias or shorthand to a [Vega symbol mark shape][vega-symbol-shape]. + + + +
+ +
+ + + + + +
+ +## Usage + +```javascript +var symbol2shape = require( '@stdlib/plot/base/symbol2shape' ); +``` + +#### symbol2shape( value ) + +Converts a symbol alias or shorthand to a [Vega symbol mark shape][vega-symbol-shape]. + +```javascript +var out = symbol2shape( 'o' ); +// returns 'circle' + +out = symbol2shape( 'circle' ); +// returns 'circle' +``` + +For symbols which do not have a corresponding [Vega symbol mark shape][vega-symbol-shape], the function returns an SVG path string. + +```javascript +var out = symbol2shape( '|' ); +// returns 'M0,-1L0,1' +``` + +If unable to resolve a shape, the function returns `null`. + +```javascript +var out = symbol2shape( 'beep' ); +// returns null +``` + +
+ + + + + +
+ +## Notes + +- As stipulated by the [Vega documentation][vega-symbol-shape], returned SVG path strings are defined within a square bounding box having coordinates ranging from `-1` to `1` along both the x and y dimensions. + +
+ + + + + +
+ +## Examples + + + +```javascript +var logEachMap = require( '@stdlib/console/log-each-map' ); +var symbolAliases = require( '@stdlib/plot/base/symbol-aliases' ); +var symbol2shape = require( '@stdlib/plot/base/symbol2shape' ); + +logEachMap( '%s => %s', symbolAliases(), symbol2shape ); +``` + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/plot/base/symbol2shape/benchmark/benchmark.js b/lib/node_modules/@stdlib/plot/base/symbol2shape/benchmark/benchmark.js new file mode 100644 index 000000000000..baf3859cd72c --- /dev/null +++ b/lib/node_modules/@stdlib/plot/base/symbol2shape/benchmark/benchmark.js @@ -0,0 +1,56 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var isString = require( '@stdlib/assert/is-string' ).isPrimitive; +var pkg = require( './../package.json' ).name; +var symbol2shape = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var values; + var out; + var i; + + values = [ + 'o', + '+', + 'circle', + 'triangle-up' + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + out = symbol2shape( values[ i%values.length ] ); + if ( typeof out !== 'string' ) { + b.fail( 'should return a string' ); + } + } + b.toc(); + if ( !isString( out ) ) { + b.fail( 'should return a string' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/plot/base/symbol2shape/docs/repl.txt b/lib/node_modules/@stdlib/plot/base/symbol2shape/docs/repl.txt new file mode 100644 index 000000000000..806ed08cfb79 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/base/symbol2shape/docs/repl.txt @@ -0,0 +1,28 @@ + +{{alias}}( value ) + Converts a symbol alias or shorthand to a Vega symbol mark shape. + + If unable to resolve a shape, the function returns `null`. + + Parameters + ---------- + value: string + Symbol alias or shorthand. + + Returns + ------- + out: string|null + Symbol mark shape. + + Examples + -------- + > var v = {{alias}}( 'o' ) + 'circle' + > v = {{alias}}( 'circle' ) + 'circle' + > v = {{alias}}( 'beep' ) + null + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/plot/base/symbol2shape/docs/types/index.d.ts b/lib/node_modules/@stdlib/plot/base/symbol2shape/docs/types/index.d.ts new file mode 100644 index 000000000000..a749e18060ac --- /dev/null +++ b/lib/node_modules/@stdlib/plot/base/symbol2shape/docs/types/index.d.ts @@ -0,0 +1,50 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/** +* Converts a symbol alias or shorthand to a Vega symbol mark shape. +* +* ## Notes +* +* - For symbols having a corresponding [Vega symbol mark shape][1], the function returns the shape name. Otherwise, the function returns an SVG path string. +* - As stipulated by the [Vega documentation][1], returned SVG path strings are defined within a square bounding box having coordinates ranging from `-1` to `1` along both the x and y dimensions. +* - If unable to resolve a shape, the function returns `null`. +* +* [1]: https://vega.github.io/vega/docs/marks/symbol/ +* +* @param value - symbol alias or shorthand +* @returns symbol mark shape +* +* @example +* var v = symbol2shape( 'o' ); +* // returns 'circle' +* +* v = symbol2shape( 'circle' ); +* // returns 'circle' +* +* v = symbol2shape( 'beep' ); +* // returns null +*/ +declare function symbol2shape( value: string ): string | null; + + +// EXPORTS // + +export = symbol2shape; diff --git a/lib/node_modules/@stdlib/plot/base/symbol2shape/docs/types/test.ts b/lib/node_modules/@stdlib/plot/base/symbol2shape/docs/types/test.ts new file mode 100644 index 000000000000..892d597e2e5b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/base/symbol2shape/docs/types/test.ts @@ -0,0 +1,45 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import symbol2shape = require( './index' ); + + +// TESTS // + +// The function returns a string or null... +{ + symbol2shape( 'o' ); // $ExpectType string | null +} + +// The compiler throws an error if the function is not provided a string... +{ + symbol2shape( 1 ); // $ExpectError + symbol2shape( true ); // $ExpectError + symbol2shape( false ); // $ExpectError + symbol2shape( null ); // $ExpectError + symbol2shape( undefined ); // $ExpectError + symbol2shape( [] ); // $ExpectError + symbol2shape( {} ); // $ExpectError + symbol2shape( ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + symbol2shape(); // $ExpectError + symbol2shape( 'o', {} ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/plot/base/symbol2shape/examples/index.js b/lib/node_modules/@stdlib/plot/base/symbol2shape/examples/index.js new file mode 100644 index 000000000000..7532a42d2968 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/base/symbol2shape/examples/index.js @@ -0,0 +1,25 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var logEachMap = require( '@stdlib/console/log-each-map' ); +var symbolAliases = require( '@stdlib/plot/base/symbol-aliases' ); +var symbol2shape = require( './../lib' ); + +logEachMap( '%s => %s', symbolAliases(), symbol2shape ); diff --git a/lib/node_modules/@stdlib/plot/base/symbol2shape/lib/index.js b/lib/node_modules/@stdlib/plot/base/symbol2shape/lib/index.js new file mode 100644 index 000000000000..157b543f5648 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/base/symbol2shape/lib/index.js @@ -0,0 +1,46 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Convert a symbol alias or shorthand to a Vega symbol mark shape. +* +* @module @stdlib/plot/base/symbol2shape +* +* @example +* var symbol2shape = require( '@stdlib/plot/base/symbol2shape' ); +* +* var v = symbol2shape( 'o' ); +* // returns 'circle' +* +* v = symbol2shape( 'circle' ); +* // returns 'circle' +* +* v = symbol2shape( 'beep' ); +* // returns null +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/plot/base/symbol2shape/lib/main.js b/lib/node_modules/@stdlib/plot/base/symbol2shape/lib/main.js new file mode 100644 index 000000000000..2bb8525bffed --- /dev/null +++ b/lib/node_modules/@stdlib/plot/base/symbol2shape/lib/main.js @@ -0,0 +1,130 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var hasOwnProp = require( '@stdlib/assert/has-own-property' ); + + +// VARIABLES // + +// SVG path strings defined within a square bounding box having coordinates ranging from -1 to 1 along both the x and y dimensions... +var ASTERISK = 'M0.2,-1L-0.2,-1L-0.2,-0.34641L-0.76603,-0.67321L-0.96603,-0.32679L-0.4,0L-0.96603,0.32679L-0.76603,0.67321L-0.2,0.34641L-0.2,1L0.2,1L0.2,0.34641L0.76603,0.67321L0.96603,0.32679L0.4,0L0.96603,-0.32679L0.76603,-0.67321L0.2,-0.34641Z'; +var DOT = 'M0.25,0A0.25,0.25,0,1,1,-0.25,0A0.25,0.25,0,1,1,0.25,0Z'; +var HEXAGRAM = 'M0,-1L-0.28868,-0.5L-0.86603,-0.5L-0.57735,0L-0.86603,0.5L-0.28868,0.5L0,1L0.28868,0.5L0.86603,0.5L0.57735,0L0.86603,-0.5L0.28868,-0.5Z'; +var LINE = 'M0,-1L0,1'; +var STAR = 'M0,-1L-0.22452,-0.30902L-0.95106,-0.30902L-0.36327,0.11803L-0.58779,0.80902L0,0.38197L0.58779,0.80902L0.36327,0.11803L0.95106,-0.30902L0.22452,-0.30902Z'; +var X = 'M-0.42426,-0.98995L-0.98995,-0.42426L-0.56569,0L-0.98995,0.42426L-0.42426,0.98995L0,0.56569L0.42426,0.98995L0.98995,0.42426L0.56569,0L0.98995,-0.42426L0.42426,-0.98995L0,-0.56569Z'; + +var SYMBOLS = { + 'arrow': 'arrow', + '->': 'arrow', + + 'asterisk': ASTERISK, + '*': ASTERISK, + + 'circle': 'circle', + 'o': 'circle', + + 'cross': 'cross', + 'plus': 'cross', + '+': 'cross', + + 'diamond': 'diamond', + 'd': 'diamond', + + 'dot': DOT, + '.': DOT, + + 'hexagram': HEXAGRAM, + 'h': HEXAGRAM, + + 'line': LINE, + '|': LINE, + + 'square': 'square', + 's': 'square', + + 'star': STAR, + 'pentagram': STAR, + 'p': STAR, + + 'stroke': 'stroke', + '_': 'stroke', + + 'triangle': 'triangle', + 't': 'triangle', + + 'triangle-down': 'triangle-down', + 'v': 'triangle-down', + + 'triangle-left': 'triangle-left', + '<': 'triangle-left', + + 'triangle-right': 'triangle-right', + '>': 'triangle-right', + + 'triangle-up': 'triangle-up', + '^': 'triangle-up', + + 'wedge': 'wedge', + 'w': 'wedge', + + 'x': X +}; + + +// MAIN // + +/** +* Converts a symbol alias or shorthand to a Vega symbol mark shape. +* +* ## Notes +* +* - For symbols having a corresponding [Vega symbol mark shape][1], the function returns the shape name. Otherwise, the function returns an SVG path string. +* - As stipulated by the [Vega documentation][1], returned SVG path strings are defined within a square bounding box having coordinates ranging from `-1` to `1` along both the x and y dimensions. +* - If unable to resolve a shape, the function returns `null`. +* +* [1]: https://vega.github.io/vega/docs/marks/symbol/ +* +* @param {string} value - symbol alias or shorthand +* @returns {(string|null)} symbol mark shape +* +* @example +* var v = symbol2shape( 'o' ); +* // returns 'circle' +* +* v = symbol2shape( 'circle' ); +* // returns 'circle' +* +* v = symbol2shape( 'beep' ); +* // returns null +*/ +function symbol2shape( value ) { + if ( hasOwnProp( SYMBOLS, value ) ) { + return SYMBOLS[ value ]; + } + return null; +} + + +// EXPORTS // + +module.exports = symbol2shape; diff --git a/lib/node_modules/@stdlib/plot/base/symbol2shape/package.json b/lib/node_modules/@stdlib/plot/base/symbol2shape/package.json new file mode 100644 index 000000000000..1e7e22c8e0a5 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/base/symbol2shape/package.json @@ -0,0 +1,64 @@ +{ + "name": "@stdlib/plot/base/symbol2shape", + "version": "0.0.0", + "description": "Convert a symbol alias or shorthand to a Vega symbol mark shape.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "plot", + "base", + "symbol", + "shape", + "vega", + "utilities", + "utility", + "utils", + "util" + ], + "__stdlib__": {} +} diff --git a/lib/node_modules/@stdlib/plot/base/symbol2shape/test/test.js b/lib/node_modules/@stdlib/plot/base/symbol2shape/test/test.js new file mode 100644 index 000000000000..a7e9c551c93d --- /dev/null +++ b/lib/node_modules/@stdlib/plot/base/symbol2shape/test/test.js @@ -0,0 +1,97 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var isString = require( '@stdlib/assert/is-string' ).isPrimitive; +var symbolShorthands = require( '@stdlib/plot/base/symbol-shorthands' ); +var symbolAliases = require( '@stdlib/plot/base/symbol-aliases' ); +var symbol2shape = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof symbol2shape, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns a shape when provided a symbol alias', function test( t ) { + var values; + var v; + var i; + + values = symbolAliases(); + for ( i = 0; i < values.length; i++ ) { + v = symbol2shape( values[ i ] ); + t.strictEqual( isString( v ), true, 'returns expected value for ' + values[ i ] ); + } + t.end(); +}); + +tape( 'the function returns a shape when provided a symbol shorthand', function test( t ) { + var values; + var v; + var i; + + values = symbolShorthands(); + for ( i = 0; i < values.length; i++ ) { + v = symbol2shape( values[ i ] ); + t.strictEqual( isString( v ), true, 'returns expected value for ' + values[ i ] ); + } + t.end(); +}); + +tape( 'the function resolves the same shape for a symbol alias and its corresponding shorthand', function test( t ) { + t.strictEqual( symbol2shape( 'circle' ), symbol2shape( 'o' ), 'returns expected value' ); + t.strictEqual( symbol2shape( 'cross' ), symbol2shape( '+' ), 'returns expected value' ); + t.strictEqual( symbol2shape( 'star' ), symbol2shape( 'p' ), 'returns expected value' ); + t.end(); +}); + +tape( 'the function resolves the same shape for each accepted alias of a symbol', function test( t ) { + t.strictEqual( symbol2shape( 'plus' ), symbol2shape( 'cross' ), 'returns expected value' ); + t.strictEqual( symbol2shape( 'pentagram' ), symbol2shape( 'star' ), 'returns expected value' ); + t.end(); +}); + +tape( 'if unable to resolve a shape, the function returns `null`', function test( t ) { + var expected; + var actual; + var values; + var i; + + values = [ + '', + 'beep', + 'boop', + '==', + 'toString', + 'constructor' + ]; + expected = null; + for ( i = 0; i < values.length; i++ ) { + actual = symbol2shape( values[ i ] ); + t.strictEqual( actual, expected, 'returns expected value for ' + values[ i ] ); + } + t.end(); +}); From 2c4b0087fcaebbe931a4fe5b778f5d6121a6e6c6 Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 14 Aug 2026 03:07:05 -0700 Subject: [PATCH 2/2] docs: update links Signed-off-by: Athan --- .../@stdlib/plot/base/symbol2shape/README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/plot/base/symbol2shape/README.md b/lib/node_modules/@stdlib/plot/base/symbol2shape/README.md index 256f246ddcb7..4c0a1104c3d2 100644 --- a/lib/node_modules/@stdlib/plot/base/symbol2shape/README.md +++ b/lib/node_modules/@stdlib/plot/base/symbol2shape/README.md @@ -20,7 +20,7 @@ limitations under the License. # symbol2shape -> Convert a [symbol][@stdlib/plot/base/assert/is-symbol] alias or shorthand to a [Vega symbol mark shape][vega-symbol-shape]. +> Convert a symbol [alias][@stdlib/plot/base/symbol-aliases] or [shorthand][@stdlib/plot/base/symbol-shorthands] to a [Vega symbol mark shape][vega-symbol-shape]. @@ -42,7 +42,7 @@ var symbol2shape = require( '@stdlib/plot/base/symbol2shape' ); #### symbol2shape( value ) -Converts a symbol alias or shorthand to a [Vega symbol mark shape][vega-symbol-shape]. +Converts a symbol [alias][@stdlib/plot/base/symbol-aliases] or [shorthand][@stdlib/plot/base/symbol-shorthands] to a [Vega symbol mark shape][vega-symbol-shape]. ```javascript var out = symbol2shape( 'o' ); @@ -76,7 +76,7 @@ var out = symbol2shape( 'beep' ); ## Notes -- As stipulated by the [Vega documentation][vega-symbol-shape], returned SVG path strings are defined within a square bounding box having coordinates ranging from `-1` to `1` along both the x and y dimensions. +- As stipulated by the [Vega documentation][vega-symbol-shape], returned SVG path strings are defined within a square bounding box having coordinates ranging from `-1` to `1` along both the `x` and `y` dimensions. @@ -122,7 +122,9 @@ logEachMap( '%s => %s', symbolAliases(), symbol2shape );