Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

ruby - draw filled polygons/rect from dot coordinate list

For general discussion related FlowStone

ruby - draw filled polygons/rect from dot coordinate list

Postby tester » Fri Jan 29, 2016 12:25 pm

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 9030 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

Postby tester » Thu Feb 04, 2016 12:11 pm

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

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

Postby martinvicanek » Thu Feb 04, 2016 10:22 pm

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...]
;)
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

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

Postby tester » Thu Feb 04, 2016 10:47 pm

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


Return to General

Who is online

Users browsing this forum: No registered users and 95 guests