question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Minus sign instead of hyphen for negative numbers

See original GitHub issue

When displaying negative numbers, use a minus sign (unicode 2212) instead of a hyphen -. There could be an option (like this one in matplotlib) to specify either option (but defaulting to the minus sign would be optimal).

In IDLE, you can see the difference between a true minus sign and a hyphen with this: print(u'f\u2212f\nf\u002Df') or print(u'f\u2212f\nf-f')

Reference: Unicode for “hyphens”

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
domoritzcommented, Apr 12, 2021

@kirkpsmith I’m sorry that we lead you from Altair to Vega-Lite to Vega to D3 here but this feature request really tickles down. At least I don’t think we will send you to the browser vendor. Thank you for your persistence.

0reactions
tunercommented, Apr 12, 2021

@dankrusi, this one https://github.com/d3/d3-format/issues/62 ?

Stumbled upon that issue when my minus signs (hyphens actually) broke when using an ASCII-only font…

Read more comments on GitHub >

github_iconTop Results From Across the Web

The difference between a dash and a minus sign
Sure, but it isn't ideal. Note that the hyphen is a bit lower-down on the line of text than the minus sign and...
Read more >
En dashes - Microsoft Style Guide
For a minus sign. Example 12 – 3 = 9. To indicate negative numbers. Example –79. Use an en dash (–) instead of...
Read more >
Em Dash, En Dash, Hyphen, Minus: Dashes in English
The minus symbol, a different character from the hyphen or en dash, appears in mathematical expressions.
Read more >
A hyphen is not a minus sign, and other mistaken characters
A hyphen is not a minus sign, and other mistaken characters ; Character, Purpose, Bad replacement ; Minus, −, Subtraction, negative, Hyphen, –....
Read more >
What's the difference between a hyphen, a dash, and ...
The minus sign (−) is used with numbers to indicate negative amounts or as the symbol for the subtraction operation. The hyphen (‐)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found