Search Results

Posts containing pie chart

The feedback I recieved from Reddit about locidesktop.com (my hobby project) was encouraging.

If you would like to join the beta program for locidesktop, please leave a comment below…

One of the comments pointed out that although there is a large choice of icons available, there isn't always a clear recognizable image for each site, and it would be nice if locidesktop would use ‘favicons’. I had considered using favicons previously, but rejected the idea because they are just 16x16 pixels in size, and I wanted to use large images for icons. continue reading…

I spent another afternoon working on my pie chart project. I'm using PyCairo to render labels over the chart render. The tricky part was finding the position at the center of each pie segment to render the label over. There's no way of retrieving that information from Povray, so I had to do the math myself and calculate the coordinates manually. Fortunately I had a 3D math module that I was intimately familiar with, having written it just last year (its always gratifying to re-use code for a new purpose)!

After posting my latest pie chart image, it occurred to me that it would be pretty cool if the text flowed around the edge of the pie chart image rather than around a rectangle. This is not something that can be done simply with HTML / CSS, but it can be done by breaking the images up in to horizontal slices so that they extend only to the edge of the image, rather than to the absolute border.

If I googled for it, I suspect I could find tools to do this for me -- but where is the fun in that? Instead, I wrote a Python script that uses the Python Image Library to scan an image and output HTML that will allow text to wrap smoothing around the image. No additional images are produced, because the 'slicing' is done with CSS to select the part of the original image that is seen. continue reading…

I've been doing a little more work on my 3D pie-chart renderer. I've added beveling and tweaked colors to a point where I can render charts that -- in my opinion -- are a better quality than those produced from Apple's Numbers. Next step is to add labels over the main image. Povray does support rendering of True Type Fonts, but it is a 2D overlay that I'm looking for (not 3D text), so I plan to use PyCairo to render the labels. Once I've perfected the chart renderer I can build a polished web interface, and a web service for the render queue. All in Python, of course!

Since I've moved to Linux as my primary desktop (I know, about time), I've been motivated in porting some of my old software. This shouldn't be too difficult, since I try to work in as platform agnostic manner as possible, and when I do use a platform specific API I keep it nice and modular. Food File is probably the most popular app I ever created, although only since I made it free. As a commercial app, it didn't do to well, probably because it didn't get noticed amongst all the diet / food applications for Windows out there, or possibly because I am lousy at marketing. continue reading…

I've just spend a couple of hours dusting off an old project of mine, that involved generating pretty 3D pie charts by combining Mako templates with the Povray scene description language. I improved the image quality by enabling radiosity, and the end result is quite appealing (see below).

Now I'm thinking that there may be some people out there who would be prepared to pay to generate such images for websites or for print, and it wouldn't be too hard to extend the idea to other forms of chart, such as bar graphs. So, dear lazyweb, is there a big enough market in such a thing to warrant sinking my valuable spare time into?

To further my bid for the worlds dullest hobby award, I have been creating pie charts. I wanted to investigate generating Povray scene description files with Python. It turns out to be a winning combination; it didn't take long to build a system where I can generate a scene containing pie segments of various colors and angles. I can also vary the height and explode individual pie segments. Povray can render very high quality scenes so this system could be used to make pie charts for television or print.

I will experiment with other charts, bar charts etc. Maybe I'll even generate an animation with it.

This isn't entirely just for the heck of it. I plan to write an article about it for the Python magazine.