-
-
Notifications
You must be signed in to change notification settings - Fork 80
UnicodePlots 3.0.0
#272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnicodePlots 3.0.0
#272
Conversation
|
@johnnychen94, I'm pinging you since these are breaking changes and I'm guessing that this will require a major bump. Please comment if any change is required. EDIT: I've rebased this PR |
Codecov Report
@@ Coverage Diff @@
## master #272 +/- ##
===========================================
- Coverage 100.00% 99.94% -0.06%
===========================================
Files 29 29
Lines 1631 1700 +69
===========================================
+ Hits 1631 1699 +68
- Misses 0 1 +1
Continue to review full report at Codecov.
|
printrow - remove deprecations(w, h) - rename printrow - remove deprecated
abadc7e to
e36c483
Compare
1949be1 to
947b5f3
Compare
f1e288e to
dd372c5
Compare
9c9296f to
1cf453b
Compare
|
I will probably merge this PR tomorrow and release |
444cb7b to
1c548b4
Compare
I feels more natural in julia to store the canvas with
rows->plot heightandcols->plot width. However, since we print plots row by row in a terminal, it's inefficient to iterate over the columns of agridrow.The previous solution was to use
grid[width, height], but you have to mentally transpose the canvas for writing algorithms. I solve this by transposing the grid on creation yieldinggrid[height, width]so that we can index usinggrid[row, col]and retain the performance when iterating over columns of a given row (printing).nrows(c)mapping tosize(c.grid, 1)is more easy mentally.Thus, high level functions
lines!,points!,pixel!,char_point!,annotate!still retain the(x, y)order in their arguments, but the grid and colors access is now swapped:grid[y, x]being more intuitive.Follow up of #267.
ChangelogfileDeveloper NotessectionAll changes:
(w, h)on canvasgridandcolors- breaking change for canvas creation;printrowtoprint_row(breaking since exported);import UnicodePlots: lines!, ...);zscaletodscalefordensityplot(ok sincedensityplot: supportzscale- cleanup - immutability #271 not yet released);i/o(see ex below);arraykeyword toheatmapfor matrix display in array convention (origin at NW,ypointing downwards,xpointing to the right);lineplot(x::Vector, y::Matrix)for plotting multiple series mapping to matrix columns (same forscatterplot);width = :autoandheight = :autofor creating a plot based on the current terminal size (fix Auto-resize based on terminal size #264);ColorSchemes.jldependency, and remove all hard-coded colormap tables (no performance impact);head_tail_fracforlineplotusinghead_tail;hline!andvline!;spydefault title (redundant);