das-developers / das2java

The original das2 library. Provides interactive publication-ready 2-D plotting
https://das2.org
GNU Lesser General Public License v3.0
4 stars 0 forks source link

editor for tick locations is needed #4

Open jbfaden opened 3 years ago

jbfaden commented 3 years ago

A special editor for tick locations is needed. This will be used to create strings like "+10/5" which means a tick every two units with five divisions per major tick. These specs have been effective, used with the axes and contour plots, but potentially with any place intervals need to be enumerated.

This editor could have an axis showing the proposed tick locations as feedback, and have examples in a droplist, and a description of the specification.

jbfaden commented 3 years ago

If the spec were extended to have a range, like "0-100;+20/5" to mean 0,20,40,60,80,100/0,5,10,15, then it could be used in the run batch tool to generate lists.

cpiker commented 3 years ago

Hey, nice idea. Will there be a QDataSet property containing this information?

jbfaden commented 3 years ago

I wasn't planning on it. In general, I'd like to get the data model and visualization separate, but there are "hints" found in RENDER_TYPE which abuse this. It's also difficult because the renderer doesn't control the axis. What was the application?

cpiker commented 3 years ago

We currently have some presentation hints that are streamed to the data consumer. Some das2 stream property examples are: [xyz]Format, [xyz]TagWidth [xyz]ScaleType and as you mentioned, renderer. Specifying the preferred ticks felt like it was similar to these, especially if I know when generating the data that some coordinate values are more notable than others.

For example, when generating Voyager PWS waveform streams I know that the center point values of the spectrum analyzers are more significant than other frequency bins that naturally fall out of the DFT, because those points can be used to compare between high-rate and low-rate data from the same instrument.

jbfaden commented 3 years ago

That's an interesting use case I hadn't thought of. I was thinking you were wanting to have data that is degrees have ticks at 0,90,180,270, and 360. I don't see this as appropriate because there's a more general solution, which is to indicate that the space is "mod360" and the middle of the [259,1] interval is 0. Anyway, this is a bit off-topic so maybe there should be a new ticket. For the Voyager case, and really any time one wants to control a display, I'd rather see them writing a spec addressing the presentation (like a .vap in Autoplot), than trying to completely specify display in the data stream.

cpiker commented 3 years ago

To me data and plot style information are related to each other in a similar manner as HTML and CSS. Over in HTML land, the presentation information is referenced from (and embeddable within) the data stream. For example the display information can come from:

So there is a common precedent for referencing presentation information from a data stream. But yea, I also think of them as two distinct classes of information and ought to be handled separately somehow. Maybe something like:

<stream version="?" >
  <style>....</style>
</stream>
<packet>
</packet>

would make sense.

jbfaden commented 3 years ago

Could you start a new ticket on this? This is just about the need for an editor for the control for the ticks...

jbfaden commented 3 years ago

This document describes the format: https://github.com/autoplot/documentation/wiki/tickValues

jbfaden commented 2 years ago

See the Autoplot ticket https://sourceforge.net/p/autoplot/feature-requests/758/

jbfaden commented 2 years ago

This shows the current state of the GUI, which is usable: 2022-08-25T06-31-11