Status & Roadmap
Authors & License
Funding Ultimate++
Search on this site
Search in forums

SourceForge.net Logo
Home » U++ Library support » ScatterDraw & ScatterCtrl » [solved] ScatterCtrl: program access to the "Measures" ? (Need to set per axis min/max and major unit, no clue how to)
[solved] ScatterCtrl: program access to the "Measures" ? [message #52677] Sun, 10 November 2019 01:13 Go to previous message
xrysf03 is currently offline  xrysf03
Messages: 43
Registered: November 2018
Location: CZ
Dear gentlemen,

I wasn't really sure if this would better be asked in the newbie corner, but anyway, other than being a noob, hopefully I am not off topic here... Smile

I keep playing with the ScatterCtrl a bit, discovering its endless capabilities - I haven't found any hard limits yet, and I keep coming across amazing things, such as the inherent "save image" context menu option (a true marvel).

And the question today is: I've been wondering for a while, how to nail particular dimensioning/limits per X/Y axis. I would be fine with a fixed setup, I just don't know *how* for the life of me Smile More specifically, I've been fumbling through the ScatterCtrl demo, I'm slightly disoriented in the source code... I liked the RangePlot example, but I guess that the whole dimensioning in the source code is handled by a single call to ZoomToFit(), which is something I'd prefer not to use... But, at runtime, I have discovered another inherent menu of the ScatterCtrl object: the "properties" dialog, containing a "Measures" tab. See the screenshot attached. Is there any chance to access those attributes from my own program? I'd love to set them even before I hand over my dataset to the control.

I've noticed a recent topic on "Grid lines at round dates or values." That's not exactly my problem. I can choose a nice round per-axis "major unit" (= grid line spacing, if I understand correctly) and configure the respective per-axis min/max such that they're integer multiples of the "unit". It's no problem to come up with those numbers, I just don't know *how* to do it in my program.

Looking at the configurable attributes of the control, I suspect a slightly different problem just around the corner: my data is a "spectrum", the output of FFT. (Several FFT outputs combined, in fact.) In the data plane it's pretty similar to time series, but let me be frank and speak the actual axis units that I have. I can smell a problem in that the data set has a single explicit dimension: the amplitude per a frequency "bucket" or quantum = the height of each "spectral line". The data set is a series of evenly spaced "discrete frequency bands". Say one kHz bandwidth per frequency line. The ScatterCtrl tends to label the X axis e.g. 0 to 2048 = just counting the "data points". I'd love to tell ScatterCtrl that the data set really starts at 540 MHz and ends at 542.048 MHz - and have a grid line per 1 MHz or per 10 MHz or some such nice step. I can align the min and max on the X axis to integer multiples thereof. But I'm not sure if this is gonna fly... would I perhaps have to provide the data as two-dimensional series, having the X axis as a second dimension? Or is there an easier way to scale+shift+decorate the X axis?

So far, I've been passing a plain C array of Double to the ScatterCtrl... is there perhaps some container object that would allow me to set the Y-axis limits and to describe the scaling of the implicit X dimension, for ScatterCtrl to understand it?

Thanks for your time and patience with me Smile


[Updated on: Wed, 13 November 2019 23:11]

Report message to a moderator

Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Compilation of ScatterDraw cause warnings
Next Topic: Remove a Surf from a ScatterDraw
Goto Forum:

Current Time: Sat Jul 04 07:31:15 CEST 2020

Total time taken to generate the page: 0.02433 seconds