plot: make 8x1 the default glyph geometry

pull/632/head
nick black 4 years ago
parent fc998510a0
commit 2b5546fc4c
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -2663,13 +2663,13 @@ API int ncmenu_destroy(struct ncmenu* n);
// NCPLOT_1x1 has two states: empty and full block. NCPLOT_1x1x4 has five
// states: empty, the three shaded blocks, and the full block.
typedef enum {
NCPLOT_8x1, // eight vert/horz levels █▇▆▅▄▃▂▁ / ▏▎▍▌▋▊▉█
NCPLOT_1x1, // full block █
NCPLOT_2x1, // full/(upper|left) blocks ▄█
NCPLOT_1x1x4, // shaded full blocks ▓▒░█
NCPLOT_2x2, // quadrants ▗▐ ▖▄▟▌▙█
NCPLOT_4x1, // four vert/horz levels █▆▄▂ / ▎▌▊█
NCPLOT_4x2, // 4 rows, 2 cols (braille) ⡀⡄⡆⡇⢀⣀⣄⣆⣇⢠⣠⣤⣦⣧⢰⣰⣴⣶⣷⢸⣸⣼⣾⣿
NCPLOT_8x1, // eight vert/horz levels █▇▆▅▄▃▂▁ / ▏▎▍▌▋▊▉█
} ncgridgeom_e;
// Plots. Given a rectilinear area, an ncplot can graph samples along some axis.

@ -13,13 +13,14 @@ static const struct {
const wchar_t* egcs;
bool fill;
} geomdata[] = {
// default is NCPLOT_8x1
{ .geom = NCPLOT_8x1, .width = 1, .height = 9, .egcs = L" ▁▂▃▄▅▆▇█", .fill = false, },
{ .geom = NCPLOT_1x1, .width = 1, .height = 2, .egcs = L"", .fill = false, },
{ .geom = NCPLOT_2x1, .width = 1, .height = 3, .egcs = L" ▄█", .fill = false, },
{ .geom = NCPLOT_1x1x4, .width = 1, .height = 5, .egcs = L" ▒░▓█", .fill = false, },
{ .geom = NCPLOT_2x2, .width = 2, .height = 3, .egcs = L" ▗▐▖▄▟▌▙█", .fill = false, },
{ .geom = NCPLOT_4x1, .width = 1, .height = 5, .egcs = L" ▂▄▆█", .fill = false, },
{ .geom = NCPLOT_4x2, .width = 2, .height = 5, .egcs = L"⠀⡀⡄⡆⡇⢀⣀⣄⣆⣇⢠⣠⣤⣦⣧⢰⣰⣴⣶⣷⢸⣸⣼⣾⣿", .fill = true, },
{ .geom = NCPLOT_8x1, .width = 1, .height = 9, .egcs = L" ▁▂▃▄▅▆▇█", .fill = false, },
};
template<typename T>

Loading…
Cancel
Save