Live data from Hacker News

Creating beautiful charts with JRuby and JFreeChart

blog.headius.com

11–20 of 26 posts

Re: Creating beautiful charts with JRuby and JFreeChart

#11

article complains about a ruby gem(Charty) calling a python library(matplotlib) yet author is running Ruby in Java so they can access some Java library!

The Ruby code is already running on the JVM so utilizing the library isn’t calling out to another runtime to execute like you normally would have to in order to do something like this.

Re: Creating beautiful charts with JRuby and JFreeChart

#12
post #10
post #7

Wow, the first chart on that web page is really, really ugly. It has these weird 3-d effects that look like from 2001. All it's missing are reflections...

I read your comment first and was like it can’t be that bad. I then opened the page, scrolled frantically down and boy oh boy were you right.

Title needs a correction: Hideous charts with JRuby and JFreeChart.

Re: Creating beautiful charts with JRuby and JFreeChart

#13

> Everyone loves pie! Oh gosh, no! Count me among those who greatly dislike pie charts in almost every context. "Almost never use a pie chart for data" https://theconversation.com/heres-why-you-should-almost-neve... https://news.ycombinator.com/item?id=38912534

In early 1990s I worked at a mid-sized software company making software to help big businesses do big-business stuff. One day, another programmer pops into my cube and says:

"Hey, how do you draw a 3d pie chart?"

"What?" I asked. "Why?"

"Well, Excel can do them. And somebody saw one. Now they want our software to draw them."

"Are you serious?"

"Yes, I need it like now. I'm supposed to demo it later today."

So I get out a sheet of paper, draw some triangles, and work out that projection math. He walks away with the paper. Half an hour later, he calls me over.

"Hey, it's a 3d pie chart!"

And there it was: On a screen I was all too familiar with, where the 2d pie chart used to be, was a squat 3d pie chart, looking like it was a fat inch thick. Of course, there was too much margin above and below, because of the flatter aspect ratio, but hey, it was 3d and it was good enough for a demo.

I think that was the first day I realized that programming can be used for evil.

Re: Creating beautiful charts with JRuby and JFreeChart

#14
post #7

Wow, the first chart on that web page is really, really ugly. It has these weird 3-d effects that look like from 2001. All it's missing are reflections...

A real throwback, I remember using JFreeChart back in 2006 or so. Looks like the design hasn't changed a bit since then. That's thanks to Java's backwards compatibility ethos I suppose ...

Re: Creating beautiful charts with JRuby and JFreeChart

#15
Being able to add an interpreted script engine to a Java application is a super-power for some uses. I embedded a Jython (Python in the JVM) command line into a Java Swing app to provide a level of flexibility that I never could with a GUI. Every time I look at JRuby I wonder if Jython was the right choice. It is too late now but JRuby looks awfully nice.

Re: Creating beautiful charts with JRuby and JFreeChart

#17

article complains about a ruby gem(Charty) calling a python library(matplotlib) yet author is running Ruby in Java so they can access some Java library!

The whole point of the JVM is that languages don’t need to be limited to the low-level types C FFI forces you into.

Re: Creating beautiful charts with JRuby and JFreeChart

#20

> Everyone loves pie! Oh gosh, no! Count me among those who greatly dislike pie charts in almost every context. "Almost never use a pie chart for data" https://theconversation.com/heres-why-you-should-almost-neve... https://news.ycombinator.com/item?id=38912534

3d pie charts are literally the devil.

It's 3d pie charts, dot charts, pie charts, and any chart that has the origin set to greater than 0 in descending order of evilness.

We need a ## anniversary edition of Lying with Statistics.

Post reply on HN