ruby - draw filled polygons/rect from dot coordinate list

For general discussion related FlowStone
Post Reply
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

ruby - draw filled polygons/rect from dot coordinate list

Post 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).
Attachments
img.png
img.png (12.71 KiB) Viewed 10080 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

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

Post 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
...

?
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
User avatar
martinvicanek
Posts: 1334
Joined: Sat Jun 22, 2013 8:28 pm

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

Post 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...]
;)
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

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

Post by tester »

Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Post Reply