Bar Graph Visualization

justintrigue's icon

HI Community,

I'm trying to build a what I imagined would be a simple patch. The idea was to tally votes for several different "options" of a live audience and create a dynamic bar graph representing the results as they come in. So far, I've been focusing on using gl gridshapes and figured I would scale my shapes to show growth in the vote count, but scaling increases along an axis in both directions. Has anyone done something like this before? The logic of the vote tally seems easy enough - the animation is the element that I'm stuck on. i'll paste the development patch below, but it's REALLY messy.

Thanks!

4893.bargraphtest.maxpat
Max Patch
Wetterberg's icon

it's messy yes, but it's just because it's the gridshape helpfile copied around a bit.

Max Patch
Copy patch and select New From Clipboard in Max.

the @scale argument can have multiple values, so that's good.
Here's a quick solution to give you some inspiration - what I simply did was offset the position by the scale value, which will then tie one end down, so to speak:

justintrigue's icon

Thanks, Wetterberg! I knew it must be possible!