[Question]
  [
## What I want:
Quite simply, I want a text based display, that asks for an input, `n`, then shows that value on the display! But there's a catch. Each of the 'true' 'pixels' (the ones filled in) has to be represented by that number `n`.. 
## Example :
You are given an input `n`. You can assume `n` will be a single digit
```
Input: 0
Output:
000
0 0
0 0
0 0
000
Input: 1
Output:
  1
  1 
  1
  1
  1
Input: 2
Output:
222
  2
222
2
222
Input: 3
Output:
333
  3
333
  3
333
Input: 4
Output:
4 4
4 4
444
  4
  4
Input: 5
Output:
555
5  
555
  5
555
Input: 6
Output:
666
6    
666
6 6
666
Input: 7
Output:
777
  7
  7
  7
  7
Input: 8
Output:
888
8 8
888
8 8
888
Input: 9
Output:
999
9 9
999
  9
999
```
# Challenge:
Do the above it in as few bytes as possible.
I will only accept answers that meet all requirements. 
**Surrounding whitespace is optional,** as long as the digit is displayed properly.
Also, <75 bytes is a vote from me, the lowest accept, but I could always change the accepted answer, so don't be discouraged to answer.
  
[Answer]
## JavaScript (ES6), 88 bytes
```
f=
n=>`019
2 3
459
6 7
889`.replace(/\d/g,c=>[2,18,142,96,130,131,698,4,146][c]>>n&1?` `:n)
```
```
<input type=number min=0 max=9 oninput=o.textContent=f(this.value)><pre id=o>
```
The numbers encode which squares contain spaces for a given digit e.g. the bottom left corner has a value of 146 because the 1, 4 and 7 don't use it and 146 = 2¹ + 2⁴ + 2⁷.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~40~~ ~~39~~ 38 bytes
```
•Y¤ŸèK'¦ú’ò™^N•4B5ô¹èvð¹«5714yè8+b¦Sè,
```
[Try it online!](https://tio.run/nexus/05ab1e#AUEAvv//4oCiWcKkxbjDqEsnwqbDuuKAmcOy4oSiXk7igKI0QjXDtMK5w6h2w7DCucKrNTcxNHnDqDgrYsKmU8OoLP//NQ "05AB1E – TIO Nexus")
**Explanation**
```
•Y¤ŸèK'¦ú’ò™^N•            # the compressed string "318975565561233953387608032537"
4B                         # convert to base-4
  5ô                       # split into strings of size 5
    ¹è                     # get the string at index <input>
      v                    # for each digit y in string
          5714yè           # get the digit in 5714 at index y
                8+         # add 8
                  b        # convert to binary
                   ¦       # remove the leading 1
       ð¹«          Sè     # with each digit in the binary number, 
                           # index into the string " <input>"   
                      ,    # print with newline
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 43 bytes
```
"Ýûÿ©ÿßY÷ß"®c s4Ã¤ëAU ¬£2839¤ë4XÃ·d0S1U
```
Contains some unprintables. [Try it online!](https://tio.run/nexus/japt#@690eO7h3Yf3H5p6qPHQysP7D88/NDHy0NzD2w/PVzq0Llmh2ORw86Elh1c7hiocWnNosZGFsSWIaxIBFN6eYhBsGPr/vyUA "Japt – TIO Nexus")
Tallies: 13 bytes of compressed data, 9 bytes to decompress it, and 21 bytes to form the output.
### Explanation
Ungolfed code:
```
"Ýûÿ©ÿßY÷ß"®   c s4Ã ¤  ëAU ¬ £  2839¤  ë4XÃ ·  d0S1U
"Ýûÿ©ÿßY÷ß"mZ{Zc s4} s2 ëAU q mX{2839s2 ë4X} qR d0S1U
```
There are exactly 4 different row possibilities: (`#` represents a digit)
```
#  
  #
# #
###
```
Thus, each number can be stored as a set of five base-4 digits. Since each number can be then stored in 10 bits, the total is 100 bits, which corresponds to 13 bytes. I'll skip the compression process and instead explain the decompression.
```
mZ{Zc s4} 
mZ{     }  // Replace each character Z in the compressed string with the following:
   Zc      //   Take the char-code of Z.
      s4   //   Convert to a base-4 string.
```
After decompression, the 13-byte compressed string looks like this:
```
3131332333332111200122213333313321011121213133133133
```
Note that this would fail if any of the 4-digit runs started with `0`, as the leading zeroes would be left off when `s4` is run. We can fix this by having `0` represent `#`, which only appears three times, and none of those fall at the start of a 4-digit run.
```
s2         // Slice off the first two chars of the result.
```
Okay, so in order to get our 50-digit string to compress nicely in chunks of 4, we had to add two extra digits. Adding them to the beginning of the string means we can chop them off with the one-byter `¤`.
```
ëAU        // Take every 10th (A) char in this string, starting at index <input> (U).
```
Embarrassingly, Japt lacks a built-in for splitting a string into slices of length X. It does have a built-in for getting every Xth char, however, so we can store all the data by encoding all of the top rows first, then all of the second rows, etc.
So now we have the 5-digit string encoding the digit we want to create, e.g. `32223` for `0`.
```
q mX{2839s2 ë4X} qR
q                    // Split the resulting string into chars.
  mX{          }     // Replace each char X with the result of this function:
     2839s2          //   Convert the magic number 2839 to a binary string.
            ë4X      //   Take every 4th char of this string, starting at index X.
                 qR  // Join the result with newlines.
```
To explain the magic number, refer back to the four distinct rows. If you replace `#` with `1` and  with `0`, you get
```
100
001
101
111
```
Transposing this and then joining into a single string gives us `101100010111`. Convert to decimal and, voilà, you have 2839. Reversing the process maps the digits `0123` into the four binary rows shown above.
Almost done! Now all that's left to do is add in the spaces and digits:
```
d0S1U      // In the resulting string, replace 0 with " " (S) and 1 with <input> (U).
```
And presto, implicit output takes care of the rest. I'm sorry this explanation is so long, but I don't see any real way to golf it without making it less understandable (if it is understandable...)
[Answer]
## JavaScript (ES6), ~~115~~ 111 bytes
Takes input as a string.
```
n=>'02468'.replace(/./g,c=>(n+n+n+`   ${n} `+n).substr([126,341,36,68,327.5,66,98,340,102,70][n]*4>>c&6,3)+`
`)
```
### How it works
**Pattern encoding**
The four distinct patterns `"XXX"`, `"X.."`, `"..X"` and `"X.X"` can be compressed as `"XXX...X.X"` and extracted this way:
```
XXX...X.X
^^^        --> XXX  (id = 0 / pointer = 0)
  ^^^      --> X..  (id = 1 / pointer = 2)
    ^^^    --> ..X  (id = 2 / pointer = 4)
      ^^^  --> X.X  (id = 3 / pointer = 6)
```
By substituting the input digit `n` for `"X"` and using actual spaces, this gives the expression:
```
n+n+n+`   ${n} `+n
```
**Digit encoding**
Using the pattern identifiers defined above, each digit can be represented by a 5 \* 2 = 10-bit quantity.
For instance:
```
XXX  -->  0 *   1 =   0
X.X  -->  3 *   4 =  12
XXX  -->  0 *  16 =   0
..X  -->  2 *  64 = 128
XXX  -->  0 * 256 =   0
                    ---
                    140
```
The complete list is:
```
[252, 682, 72, 136, 655, 132, 196, 680, 204, 140]
```
However, dividing these values by 2 allows to save two bytes. So instead we store:
```
[126, 341, 36, 68, 327.5, 66, 98, 340, 102, 70]
```
### Demo
```
let f =
n=>'02468'.replace(/./g,c=>(n+n+n+`   ${n} `+n).substr([126,341,36,68,327.5,66,98,340,102,70][n]*4>>c&6,3)+`
`)
console.log(f('0'))
console.log(f('1'))
console.log(f('2'))
console.log(f('3'))
console.log(f('4'))
console.log(f('5'))
console.log(f('6'))
console.log(f('7'))
console.log(f('8'))
console.log(f('9'))
```
[Answer]
# [SOGL V0.12](https://github.com/dzaima/SOGL), 30 [bytes](https://github.com/dzaima/SOGL/blob/master/chartable.md)
```
■'τč▲Β►║⁰ΡāQšJ┘tXdnοO¹‘'¹n.w3n
```
[Try it Here!](https://dzaima.github.io/SOGLOnline/?code=JXUyNUEwJTI3JXUwM0M0JXUwMTBEJXUyNUIyJXUwMzkyJXUyNUJBJXUyNTUxJXUyMDcwJXUwM0ExJXUwMTAxUSV1MDE2MUoldTI1MTh0WGRuJXUwM0JGTyVCOSV1MjAxOCUyNyVCOW4udzNu,inputs=NQ__)
The compressed string `■'τč▲Β►║⁰ΡāQšJ┘tXdnοO¹‘` is
```
  ŗ  ŗ  ŗ  ŗ  ŗŗŗŗ  ŗŗŗŗŗ  ŗŗŗŗŗŗ  ŗŗŗŗ  ŗŗŗŗŗ ŗŗ ŗŗŗŗ  ŗ  ŗŗŗŗŗ  ŗŗŗ  ŗŗŗŗŗŗŗŗ  ŗŗŗŗ ŗŗŗŗŗŗŗ  ŗ  ŗ  ŗ  ŗŗŗŗŗ ŗŗŗŗŗ ŗŗŗŗŗŗŗŗ ŗŗŗŗ  ŗŗŗŗŗŗŗŗ ŗŗ ŗŗ ŗŗŗŗ
```
which is (starting with 1, ending with 0) the numbers, line by line, number to number.
The rest
```
...‘             push the compressed string, replacing the ŗs with pop - the input
    '¹n          split into chunks of 15
       .w        push the (1-indexed, wrapping) input-th item of that array
             3n  split into chunks of 3
                 implicitly output the array, line by line
```
[Answer]
# Bash + GNU utils, 114
* 2 bytes saved thanks to @SophiaLechner
There are probably some more opportunities for compression here, but here's a start:
```
dc<<<4o16iEAC00CDF33AC373DEF00EEFB3p|fold -5|sed "$[$1+1]!d
s/0/  x\n/g
s/1/x\n/g
s/2/x x\n/g
s/3/xxx\n/g
y/x/$1/"
```
### Explanation
Each row of of every digit is one of these four patterns:
```
  x
x
x x
xxx
```
By labeling these 0-3, each digit can be represented by 5 base-4 digits. E.g. 0 would be `32223`, and the full list of digits is encoded in base-4 as `32223000003031330303223003130331323300003232332303`. This encoded in hex as `EAC00CDF33AC373DEF00EEFB3`.
* `dc` converts hex `EAC00CDF33AC373DEF00EEFB3` to base-4.
* `fold` puts 5 base-4 digits on each line
* `sed`:
	+ deletes all input lines apart from line number n+1 (sed 1-indexes lines)
	+ translates the base-4 digits to the pattern (of `x`es) for each line of the given digit, along with a newline for the end of each row
	+ transliterates the `x`es to digit n.
[Try it online](https://tio.run/##PcqxDoIwFIXhnae4km4GbmsVY@yCUF5CHZAWJTGtsR1qxGevJAbP9OXkv7TuFnv7BK@d71qnYTDwpnm@@@xB2QSmOe0hy4DMSVSdEGJtWTHIsqK0qhvOy4pveS0bSqVsDvwx9vauINuMTitIyZGwJTsvVOKQIkA4GbxOZjhrheH/cgzh5xcGJAzTqKzR8Qs).
[Answer]
# [MATL](https://github.com/lmendo/MATL), ~~45~~ 43 bytes
```
'V~4;LR`I-D2q (z%eI)P-nc'F TFZa15eiZ)5eGV*c
```
[Try it online!](https://tio.run/nexus/matl#@68eVmdi7ROU4KnrYlSooFGlmuqpGaCbl6zuphDiFpVoaJqaGaVpmuoeppX8/78lAA "MATL – TIO Nexus")
### Explanation
```
'V~4;LR`I-D2q (z%eI)P-nc' % Compressed string using printable ASCII except '
F TFZa                    % Decompress (change of base) into alphabet [1 0]
15e                       % Reshape into 15-row matrix. Each column contains the
                          % art for one digit, packed in column-major order
iZ)                       % Take input number and pick the corresponding column.
                          % Indexing is 1-based and modular, so 0 is at the end
5e                        % Reshape into a 5-row matrix. This already looks like
                          % the number, with active pixels as 1 and inactive as 0
GV                        % Push input number again. Convert to string, of one char
*                         % Multiply, element-wise. The previous char is
                          % interpreted as its ASCII code. This changes 1 into the 
                          % ASCII code of the input digit, and leaves 0 as is
c                         % Convert to char. Implicitly display. Char 0 is shown as
                          % a space
```
[Answer]
# Retina, ~~166~~ ~~164~~ 163 bytes
Two spaces on the third line from the bottom
```
0
0addda
d
0 0
1
1b1b1b1b1b1
2
2ab2a2b222
3
3ab3ab3a
4
44 44 4ab4b4
5
55ab555b5a
6
66ab6a 6a
7
7ab7b7b7b7
8
88a 8a8 8a
9
99a 9ab9a
(\d)a
$1$1$1$1
^.
b
    
.{3}
$+¶
```
[Try it Online!](https://tio.run/nexus/retina#PY5BCsIwFET37xRZVKgIJU2TNDmBlxBxPrmFeC0P4MVqY0Hem@3MnMbrY/N4tdZEwzvPzGx/CARZULAQAguL7CeRGF1XFi2SSEmWUrIkMjnLslwWK6tsPaBQilxR2UOlVrkqq2K8tbMY5gPuExjOMT2XF8Pl8962fqw/6FuZ3lW/)
An improved version of [@Okx's](https://codegolf.stackexchange.com/a/117721/65425) solution
[Answer]
# Pyth 82 85 91 100 bytes
```
Km?dC+48Q\ m.&C@"w$kn<^_d\x7f~"Qdj1906486293414135453684485070928 128V5p.)Kp.)K.)K
```
A lot of golfing probably possible, my first challenge.
[Answer]
## Batch File, 8 + 184 bytes
Here's my obligatory batch solution. Unfortunately the standard method of accomplishing this is over 300 bytes in batch, so we resort to much cheaper tactics.
```
@type %1
```
---
In the current directory, I have 10 files set up, named from 0 to 9. In each of these is the respective 5x3 grid of pixels. For example:
[![enter image description here](https://i.stack.imgur.com/etQqB.png)](https://i.stack.imgur.com/etQqB.png)
The byte counts for these are:
```
19 0
19 1
17 2
19 3
19 4
17 5
17 6
19 7
19 8
19 9
Total - 184
```
***Still beat Java.***
[Answer]
# Ruby, 94 bytes
```
->n{20.times{|i|print i%4>2?$/:[" ",n]["_Q_@@_]UWUU_GD_WU]_U]AA__U_WU_"[n*3+i%4].ord>>i/4&1]}}
```
**Ungolfed in test program**
```
f=->n{
  20.times{|i|                           #4 characters * 5 rows = 20
    print i%4>2?$/:                      #If i%4=3 print a newline else
    [" ",n][                             #either a space if the expression below is 0 or the digit n if 1.
      "_Q_@@_]UWUU_GD_WU]_U]AA__U_WU_"[  #bitmap data for digits, one character for each column
        n*3+i%4].ord>>i/4&1              #Select the correct character for the column, convert to ascii code,
    ]                                    #rightshift to find the correct bit for the row, 
  }                                      #use & to isolate the bit: 0 or 1
}
f[gets.to_i]
```
[Answer]
# PHP, 115 Bytes
```
for(;$i<5;)echo strtr(sprintf("%03b\n","1754"[[425,0,465,273,26,285,413,1,409,281][$argn]/4**$i++%4]),[" ",$argn]);
```
[Try it online!](https://tio.run/nexus/php#JcxNDsIgEEDhvadoJjSh7STyM7QaajwIslBjLRtKKPdHo8v3Ld58TWs6sHt@x4u2ddkytyzMxnav57o1e8kl8z3lEMvCoRX6cYuAICdD4BwpgwJpNKgmjWpEdTJIUqNEEudvSe9@b3@kvmdhGFryHTpoAP/e2Vo/ "PHP – TIO Nexus")
Expanded
```
for(;$i<5;)
  echo strtr(
    sprintf("%03b\n",  # make a binary
      "1754"[[425,0,465,273,26,285,413,1,409,281][$argn]/4**$i++%4])
    ,[" ",$argn]); # replace 0 with space and 1 with the input
```
Encoding
[Try it online!](https://tio.run/nexus/php#XZDbaoQwEIbv5ymGmAuruYiHeMDGPogrxWq2CssqyraF0me3M7uUbnvx800@/hAyj0/LuOzHeXVdP/qN0FqDxrtoLRQIxAj@hXUcxzTGwIwRmayTJCGdwB1Zp5jCNWlK@hrWxhgwdJmJaJissyyDjPSNGZN1nufU@hPWRVFAgZRfsi7LEkqkEPFG0WK3ybeHT7lZOVldwc/v5bt1H8tpHpwvDmehqETNCzUvdlnd6/PqllPXO1qTdxg8oYSHnmhVI2gZQtNE5QrkFtomtXWiIltrZWwdq9zWUdu8TOfB9T612iANAjmFYQVfrh9nITd6kQ77/g0 "PHP – TIO Nexus")
[Answer]
# [Retina](https://github.com/m-ender/retina), 125 bytes
```
.
A$&¶B$&¶C$&¶D$&¶E$&
([ACE][235689]|A0|E0|C4|A7)(?<=(.))
$2$2$2
(B[0489]|D[068]|A4|C0)(?<=(.))
$2 $2
D2
2
B5
5
B6
6
[A-E]
    
```
[Try it online!](https://tio.run/nexus/retina#TcrNCQMhFEbR/VeFCzPoQOTFjGYCCcE/UoQIU4h1WYCNmXEXLtzVwY34CgWujt56w0V8j6Hg@NKbnwtzcS7xBSK7kErWd2P3Z6mOaqIatuoeUnxeb6GkBNczCJ9pmyhmsvtptxroX7ETRQ0Nb2DgLSyyu6YCxsb4AQ "Retina – TIO Nexus") (Delete test suite in header to test individual input digits.) Last line contains two spaces.
[Answer]
# PowerShell, ~~126~~ ~~120~~ ~~113~~ ~~109~~ 101
```
$n="$args"
-split'ϽϭϿ·ͱ Ο·ͽͼϿ·Ņ ϻ·ͭͭϿ'|%{-join($_[0..2]|%{"$n·"[!($_-band1-shl$n)]})}
```
Unicode is fun. Characters are also way shorter than numbers. Above code contains U+0000 twice, thus cannot be copied directly (works fine in a file, though). The following code can be copied:
```
$n="$args"
-split"ϽϭϿ ͱ`0Ο ͽͼϿ Ņ`0ϻ ͭͭϿ"|%{-join($_[0..2]|%{"$n "[!($_-band1-shl$n)]})}
```
We lose three bytes because we need the UTF-8 signature at the start. Otherwise the string won't work.
[Answer]
# [Retina](https://github.com/m-ender/retina), 190 bytes
```
0
000¶aaa000
a
0 0¶
1
aaaaa
a
b1¶
2
ab2¶a2¶a
a
222¶
3
ab3¶ab3¶a
a
333¶
4
4 4¶4 4¶444¶b4¶b4
5
a5b¶ab5¶a
a
555¶
6
a6¶a6 6¶a
a
666¶
7
777aaaa
a
¶b7
8
a8 8¶a8 8¶a
a
888¶
9
a9 9¶ab9¶a
a
999¶
b
    
```
There are two spaces on the last line ~~but SE doesn't want to render it :/~~ Fixed!
[Try it online!](https://tio.run/nexus/retina#LY/ZEcQgDEP/VYVLINwuxxSZAtJY9hGWGQtZI2zxJqWUnjsiuBVKRqdLsQ/9umizYmVMu9ByhqggFoQPUEuBqKpafe4DFVhfqSna2u523K1B1BWdvls/au8QDY0x/vt5PDQV0yaWg8hzQuQKN99T/cjuEC2ZvW8S3yA6QUlFALYxmmH@Aw "Retina – TIO Nexus")
[Answer]
# Java 8, ~~278~~ ~~214~~ ~~210~~ 204 bytes
```
n->("A"+n+"\nB"+n+"\nC"+n+"\nD"+n+"\nE"+n).replaceAll("([ACE][235689]|A0|E0|C4|A7)(?<=(.))","$2$2$2").replaceAll("(B[0489]|D[068]|A4|C0)(?<=(.))","$2 $2").replaceAll("D2|B5|B6",n).replaceAll("[A-E]","  ")
```
Port of [*@Neil*'s Retina answer](https://codegolf.stackexchange.com/a/117776/52210). Takes the input as a `String`.
[Try it here.](https://tio.run/##bZHLbsIwEEX3/YqR1YWtQBTRkIIgrfJalg1LNws3hMo0caLEUFU1355OwJvSyo/rGfuO7OODOIlp05bqsPsYikr0PbwIqb7vAKTSZbcXRQmbMQTY6k6qdyioXSi2wvwZB/YNKAhhUNMnSiLiKIe8qthqYjW1mqEytyvbCqtHVUUJ5VGS5Xz2MA8Wy9xEnsk8k/gmemT0eR1SlzEyIfezsZEba8w9fzSl3AsW6PVN4v12wR9TOjPx3MQBmdxchEfTLEcTAGHD6vq09vhWyQJ6LTTKqZE7qJGRxcBzEOwKaCQHNWJQ5ecloBdCAPumo4gTZOitQK7DJc6OY10I9qvXZe02R@22WFJXitaucgsqHUKYrfHvMbt3vvzDefgB)
[Answer]
# [Python 2](https://docs.python.org/2/), ~~174~~ 125 bytes
```
lambda n:'\n'.join('xxx  x x'[int(i):][:3]for i in oct(0x3028000adba93b6b0000c0ad36ebac30180c0)[:-1][n::10]).replace('x',`n`)
```
[Try it online!](https://tio.run/##Xc2xDoMgFIXhvU9xNyBpzUVaqyR9EiQRUFMaC8Y40Ke3pEkXtvN/y1k/@zOG@pgf/bGYtx0NBEn6QKpX9IGSlBJAgkSUDzv1TGolhZ7jBh58gOh2iklg3SKiGa3phG1s3uhyimayxgnkbU6m5IVrFaTkqFm1Teti3JQfyHkIAzvWLT/ATJGdfvP0B15CXYIo4VrCrYSmhHsJbQkdO74 "Python 2 – Try It Online")
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell),159 135 128 118 bytes
```
param($n);0..4|%{("$n$n$n","$n $n","  $n","$n  ")['01110333330203002020110220302003010022220101001020'[$_+($n*5)]-48]}
```
Current answer: removed extraneous variable naming
[Try it online!](https://tio.run/##K8gvTy0qzkjNyfn/vyCxKDFXQyVP09pAT8@kRrVaQ0klDwSVdIAMBTCtoADjKihpRqsbGBoaGhiDgIGRgbEBkDACChkYgThGBkDCECgGBEAayAJKGKhHq8RrAy3RMtWM1TWxiK39//@/GQA "PowerShell – Try It Online")
I'll have to see if I can get some tricks from the other answers :P
**EDIT** Getting smarter with calling the mega string
**EDIT2** Switched to using a string of numbers to index into `$a` to save 7 bytes. Although I liked my previous dynamic variable name calls in the below code (135 bytes)
```
param($n);$a="$n$n$n";$b="$n $n";$c="  $n";$d="$n  ";$r="abbbadddddacadaacacabbaccadacaadabaaccccababaabaca";0..4|%{gv $r[$_+($n*5)]-v}
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~35~~ 32 bytes
```
Ṿ⁶,“SÐ~ẈoI9Ẇ¦Y./,0&Ƥɓ€ọ’ṃs15ị@s3
```
[Try it online!](https://tio.run/##AUYAuf9qZWxsef//4bm@4oG2LOKAnFPDkH7huohvSTnhuobCplkuLywwJsakyZPigqzhu43igJnhuYNzMTXhu4tAczP/w4dZ//8z "Jelly – Try It Online") or [see them all](https://tio.run/##AVUAqv9qZWxsef//4bm@4oG2LOKAnFPDkH7huohvSTnhuobCplkuLywwJsakyZPigqzhu43igJnhuYNzMTXhu4tAczP/MTDhuLbDh1kk4oKsauKBvsK2wrb/).
Same as dzaima's method.
[Answer]
# [Perl 5](https://www.perl.org/) `-Mbigint -pa`, 101 bytes
```
$_=sprintf"%16b",0xf79ef7dee492f3def39eb792e79ee7ce4924f6de>>16*$_&65535;eval"y/01/ @F/";s/...\K/\n/g
```
[Try it online!](https://tio.run/##Fc5PC4IwGIDx@/spYliHyP1xbmtI0qlL9A0EcflOBNGhEvXlW3Z64Hd6As6DijGpL0uY@3H1ZC@0Iyf@9saiNy1ibjMvW/TSojM2w83RPP@ce91iWQp9TOqDVkqqAl/NQD6MC7a73hgpFkYpre6sGlkXIwcBGUjIQYEGA2ew3yms/TQuMX0oygXf6vpuO4npEJof "Perl 5 – Try It Online")
[Answer]
# [Python 3](https://docs.python.org/3/), 119 bytes
```
lambda n:(3*f"%s%s{n}\n%s %s\n")[:30]%(*[n if i//(2**n)%2else" "for i in[1021,1005,881,927,893,892,325,1019,877,877]],)
```
[Try it online!](https://tio.run/##TclLCoMwFEDReVcRAoFEAuZTm0ToStSBpYYG7FOMk1K69tROyhtcOHDX1/5YwJZ47cs8Pm/3kUDLbRUpyyy/4dMDy4TlHqjoWqsGxqsOSIok1TU3VQWCmWnOEyU0LhtJJEGnldFSK9VI77UMxkkf7JGR1jTH0EF6534NgxTltG4Jdh65EuJvjWyQLfIZuUG@IDtkjxyEKF8 "Python 3 – Try It Online")
Each 'pixel' is represented as an integer where each power of two indicates whether the pixel is solid.
This takes advantage of the fact that the three right-hand corners are always the digit.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), ~~61~~ ~~38~~ 33 bytes
```
Ｅ§⪪”{⊞¶↙⬤\→(Ｂ⊘K→υ^⎇\`｜;ε”⁵Ｎ⮌⍘Ｉι⁺ θ
```
[Try it online!](https://tio.run/##HY29DsIwDIRfJcrkSGVASuSBCZg6gCr6BKFYECmEkJ@Ktw9Ob/D5/Onk5WXT8rG@tSm5UOBiIxzLGB70gzl6V0CiMQZ1F2rcI3bbLhw08jC4YXbeGKAchFGDGEOs5Vrfd0qgON9opZQJTjbTXPjdE842F3DMJl8zSMHNr@o6tGbabvV/ "Charcoal – Try It Online") Link is to verbose version of code. Explanation:
```
   ”...”            Compressed data string
  ⪪     ⁵           Split into groups of 5 digits
 §                  Indexed by
         Ｎ          First input as an integer
Ｅ                   Map over digits
             ι      Current digit
            Ｉ       Cast to integer
           ⍘        Converted to custom base
              ⁺ θ   Space concatenated with input digit
          ⮌         Reversed
                    Implicitly print
```
A generic port is a bit boring, so here's a more idiomatic 61-byte answer:
```
ＧＨ✳✳§⟦⟦↑L↓¬⟧⟦↓↓⟧⟦T↓→⟧⟦T→¬⟧⟦↑↑¬↑⟧⟦←↓T⟧⟦T↑L⟧⟦→↓↓⟧⟦+L↓⟧⟦+↓T⟧⟧Ｎ³θ
```
[Try it online!](https://tio.run/##S85ILErOT8z5///9nuXv96x4NGczEB1a/mj@MhBqm@jzqG3yoTWP5oNF2iaDEJgdAuZMgnMmIRRNBCIgD0hDBSYA1YbAVQKNhIpPQjZQ2wfBhKsHOmndoc3ndvz/bwkA "Charcoal – Try It Online") No verbose version as the deverbosifier doesn't understand lists of directions or even multidirectionals inside ordinary polygons. Explanation:
```
     ⟦...⟧      Array of paths, see below
          Ｎ     Input as an integer
    §           Index into the array
  ✳✳            Treat the element as direction data
           ³    Length of each segment (including 1 character overlap)
            θ   Draw using the input character
ＧＨ              Draw a path
```
Each path is specified using a list of directions (`←↑→↓`). Four usable shortcuts save bytes: `L` represents `↑→`, `¬` represents `↓←`, `T` represents `→↓←` while `+` represents `→↓←↑`, although at least one arrow must remain for the list to be recognised as a direction list (so for instance `TT` cannot be used for `3`).
60 bytes using the newer version of Charcoal available on ATO:
```
ＧＨ✳✳§⟦⟦⌈¬↑↑⟧⟦↓↓⟧⟦T↓→⟧⟦T→¬⟧⟦↑↑¬↑⟧⟦←↓T⟧⟦+↑→⟧⟦⌈↓⟧⟦+↑⌈⟧⟦+↓T⟧⟧Ｎ³θ
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m70iOSOxKDk_MWfBgqWlJWm6Fje_B-TnVKbn53nk5-Tkl2u4ZBalJpdk5ucVaziWeOalpFZoREdbPerp0FGwOrQGSIQWgIlYHYVoK5f88jwgD0SB-SFQDpAKykzPKIELgnlgE8BCUDMQRoJFfVLTShAGhIDFtGEKEeZB3AK3E64CKA4XgJsBFPHMKygt8SvNTUot0tDU1NRRMNZRKNS0XlKclFwMDYTl0Uq6ZTlKsQtNIXwA "Charcoal – Attempt This Online") Link is to verbose version of code. Explanation: The order in which multidirectionals execute changed which means that `7` can now be drawn using a multidirectional and an arrow instead of three arrows. Some of the other digits have had to have their multidirectionals tweaked but this was possible without changing the length of the code.
[Answer]
# [Befunge](https://github.com/catseye/Befunge-93), ~~192~~ 174 bytes
```
3040040403333004010030103304403030010302222204440&:09p5*>:  #v_v
   9g86*+:00p:10p:20p:01p:12p:23p:04p24p 6v             ^-1$\< >
   ,+55,g\2,g\1:,g\0:\_@#:-1p31p30:p41:*84<$
```
[Try it online!](https://tio.run/##TUzLCoNAELv3KwaUHnxAZncUHUT6IVKhYL2VvdTf32ZvzSQhyWFex/v7OY@cIwykIRIlKRBpLMaRVwpCARfD3TGnoVldpLr26yYi8zmNTetAcqUCBWUOzJHZUrAk4yX/ePZab4us5UHXDkN3boFSp8G3/VF5rymS8GTqzWRLnfP0Aw "Befunge-93 – Try It Online")
First stab was ~360 bytes doing if/else & pushing characters to stack. Which was devoting 150 characters to encoding numbers. So instead encode characters as 5 numbers based on each line. Then pop 5x input to have top 5 stack elements be desired character. 2nd line sets up line pieces with correct characters in top left 3x5 of memory
[Answer]
# JavaScript (ES8), 87 bytes
```
n=>`019
2 3
459
6 7
889`.replace(/\d/g,c=>[2,18,142,96,130,131,698,4,146][c]>>n&1?' ':n)
```
]