Giter VIP home page Giter VIP logo

orgtblasciiplot's Introduction

orgtbl-ascii-plot

News

  • This package is now part of Org Mode. It is no longer needed as a separate Melpa package.
  • Standard key-binding is now C-c " a. This is reflected in this package.

Bar plot

Draws bar plots in Emacs OrgMode tables.

  • Put the cursor in a column containing numerical values of an Org-Mode table,
  • type C-c " a, or use the menu entry Tbl > Column > Ascii plot a new column is added with a bar plot.
  • When the table is refreshed (C-u C-c * or menu Tbl > Calculate > Recalculate all), the plot is updated to reflect the new values.

Detailed documentation is here: http://orgmode.org/worg/org-contrib/orgtbl-ascii-plot.html

Example

| ! |  x |    sin(x/4) |              |
|---+----+-------------+--------------|
| # |  0 |           0 | WWWWWW       |
| # |  1 |  0.32719470 | WWWWWWWW     |
| # |  2 |  0.61836980 | WWWWWWWWWh   |
| # |  3 |  0.84147098 | WWWWWWWWWWW  |
| # |  4 |  0.97193790 | WWWWWWWWWWWV |
| # |  5 |  0.99540796 | WWWWWWWWWWWW |
| # |  6 |  0.90929743 | WWWWWWWWWWWu |
| # |  7 |  0.72308588 | WWWWWWWWWW-  |
| # |  8 |  0.45727263 | WWWWWWWWh    |
| # |  9 |  0.14112001 | WWWWWWV      |
| # | 10 | -0.19056796 | WWWWH        |
| # | 11 | -0.50127705 | WWW          |
| # | 12 | -0.75680250 | Wu           |
| # | 13 | -0.92901450 | ;            |
| # | 14 | -0.99895492 |              |
| # | 15 | -0.95892427 | :            |
| # | 16 | -0.81332939 | W.           |
| # | 17 | -0.57819824 | WWu          |
| # | 18 | -0.27941550 | WWWW-        |
| # | 19 | 0.050127010 | WWWWWW-      |
| # | 20 |  0.37415123 | WWWWWWWW:    |
| # | 21 |  0.65698660 | WWWWWWWWWH   |
| # | 22 |  0.86749687 | WWWWWWWWWWW: |
| # | 23 |  0.98250779 | WWWWWWWWWWWH |
| # | 24 |  0.98935825 | WWWWWWWWWWWH |
| # | 25 |  0.88729411 | WWWWWWWWWWW- |
| # | 26 |  0.68755122 | WWWWWWWWWW.  |
| # | 27 |  0.41211849 | WWWWWWWWu    |
| # | 28 | 0.091317236 | WWWWWWu      |
| # | 29 | -0.23953677 | WWWWl        |
| # | 30 | -0.54402111 | WWh          |
| # | 31 | -0.78861628 | W-           |
#+TBLFM: $3=sin($x/3);R::$4='(orgtbl-ascii-draw $3 -1 1)

License

Copyright (C) 2013-2023 Thierry Banel

orgtblasciiplot is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

orgtblasciiplot is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author

Thierry Banel, tbanelwebmin at free dot fr

Change Log

  • Make C-c p key-binding autoloaded
  • Added menu entry Tbl > Column > Ascii plot
  • Change key-binding from C-c p to C-c " a
  • This software is now part of Org Mode

orgtblasciiplot's People

Contributors

tbanel avatar

Stargazers

 avatar Juan A. Ruz avatar  avatar Juri Grabowski avatar Grant Rettke avatar Jeremy Bae avatar Dmitry Akatov avatar salotz avatar a13ph avatar David Duncan avatar Alexandr Priezzhev avatar Raimon Grau avatar

Watchers

Juri Grabowski avatar  avatar

Forkers

gvol emacsmirror

orgtblasciiplot's Issues

MIN MAX: allow cell references or min/max values of column

Hi!

The following table works fine:

| level | seconds |             |  links |              |
|-------+---------+-------------+--------+--------------|
|     2 |       7 | ▏           |  46861 | ▊            |
|     3 |      27 | ▌           | 116671 | █▉           |
|     4 |     136 | ██▊         | 292039 | ████▋        |
|     5 |     547 | ███████████ | 733399 | ███████████▊ |
#+TBLFM: $3='(orgtbl-uc-draw-cont $2 0 600 12)::$5='(orgtbl-uc-draw-cont $4 0 750000 12)

Awesome feature, I really do thank you for providing that.

What would be even more awesome would be something like this:

| level | seconds |        |  links |        |
|-------+---------+--------+--------+--------|
|     2 |       7 | #ERROR |  46861 | #ERROR |
|     3 |      27 | #ERROR | 116671 | #ERROR |
|     4 |     136 | #ERROR | 292039 | #ERROR |
|     5 |     547 | #ERROR | 733399 | #ERROR |
#+TBLFM: $3='(orgtbl-uc-draw-cont $2 0 @>$2 12)::$5='(orgtbl-uc-draw-cont $4 min($4) max($4) 12)

Please note the @>$2 and the very naïve min() and max() expressions.

This would ease the manual effort to find the local maximum and/or minimum of a column in order to visualize their distribution with your cool tool.

However, @>$2 currently ends up in an error. Maybe there is at least a trick to get those min/max expressions working.

What do you think?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.