Page 1 of 1

ruby - draw filled polygons/rect from dot coordinate list

Posted: Fri Jan 29, 2016 12:25 pm
by tester
Hey KG, I guess you can help.

I have following scenario here, which requires slightly different graph than previous ones.

I have series of min, max and avg values. These are frequencies. What I need to get, is a frequency graph (optional: lin/log switchable on x axis), to show audible and null zones in the frequency spectra (x axis). The y axis is reserved for span sizes and avgs, to compare bands, side by side so to speak. Attached image illustrates it.

In arrays I can set it like in previous graphs. array of mins, array of avgs and array of max's.

Can you help with this? (data only, axes are here for aesthetical preview)

BTW, if this is not too complex, 4th array (of strings) could contain a series of values, displayed centrically over each bar (that would be qty of samples).

Re: ruby - draw filled polygons/rect from dot coordinate lis

Posted: Thu Feb 04, 2016 12:11 pm
by tester
I will re-phrase my question.

In ruby - how to draw filled polygons (or just rectangles) from a list of dot coordinates like this:

a1,b1,c1,d1
a2,b2,c2,d2
a3,b3,c3,d3
...

?

Re: ruby - draw filled polygons/rect from dot coordinate lis

Posted: Thu Feb 04, 2016 10:22 pm
by martinvicanek
Pssst: Flowstone User Guide page 158:
A rectangle is represented by a four element array. The first two elements are the x and y coordinates of the top-left corner followed by the width and the height.
[Code examples on the following page...]
;)

Re: ruby - draw filled polygons/rect from dot coordinate lis

Posted: Thu Feb 04, 2016 10:47 pm
by tester