Java drawing graphs or trees in console

chartscommand-line-interfaceconsolegraphicsjava

Does anyone know a mean to "render" plots or at least trees in console mode (draw it in the console)?

I would be able to render small plots at end of a very long process, by drawing some figures in ASCII mode, in order to have a geeky & fun view of some stats collected into the process.

I would be pleased to discover a library which does that, and I would keep the process 100% java, no shell-hack or third-party software.

— EDIT

@lbalazscs and @Fortega made interesting answers, but the background of my question is to know if it exists such a library, and I will add some details I missed the first time :

The output should be able to display trees, binary trees (linked by @lbalazscs here), but also simple graphs such as bargraphs or so.

I will let this question "unanswered" for a while, and if there is no probant answer, @lbalazscs will get the point 😉

Best Answer

You can print ascii trees with minimal code. See the second answer to this question: How to print binary tree diagram?

(the second answer because this one is not only for binary trees)