Adding a slider to ILNumerics Plot - ilnumerics

I'd like to make use of an ILNumerics 3D plot but I would like to add a slider control. The slider would be responsible for filtering values on the backing data set so I can visualize my data under certain conditions. Basically, user moves slider and plot automatically updates based on criteria set by slider.
The functionality that I am looking for is very similar to Mathematica's manipulate feature. Is this type of functionality possible?
Thanks!

Yes. Interactivity is one specialty of ILNumerics. All objects can be modified dynamically. Simply place your code into the event handler of the slider and change everyting you need there.
Afterwards, call Configure() on the affected part of the scene in order to lock your changes in. ILPanel.Refresh() causes an immediate refresh of the display.

Related

How to overlap view in swift using storyboryboard

I am using xcode-14.2. I need to overlay like below image. Here is my image
I have tried in storyboard. But overlap the textfield. Here is the image like
The desired interface, of itself, is not difficult to achieve; our app uses it:
We do not, however, overlap two views; it just looks as if we do. The illusion is achieved by drawing.
So my first recommendation is that you use drawing, not true overlapping, to achieve the desired interface. If you insist upon using overlapping, then keep in mind that the order in the document outline at the left is back to front order. If you want the "select source account" to overlap in front of "available balance", you would need to bring the former to the front.

Can leaflet notify me when a certain area is in the view?

I have several GeoJSON features on the map and wonder if leaflet could notify me when I am over a feature. I think that's geofencing?
Yes, and there is nothing very complicated to implement it.
What do you mean by "I am over a feature"?
If you mean your mouse pointer or a kind of marker / point that represents your current position, you would simply need a plugin like leaflet-pip to determine which features contain your position, if any (react on map"mousemove" event for the mouse).
If you mean the current map view intersects some of the features, that would be slightly more complex, but still easily solved through another library like turf. Look for turf.intersect method. You would need to iterate over all your features, checked against a rectangle built from the current map view (probably something like: L.rectangle(map.getBounds()).toGeoJSON()).

how to create dynamic UI that adjust itself to current screen dimensions after loading?

I have created a level editor using new UI system in Unity3D.
Using Level Editor:
I can drag the ui elements,
I am able to save them in scriptable objects
But how could i save and load them at runtime?
I mean, if i create a level with some {width x hight} resolution and if i load it on different resolution, then the whole UI positioning get distorted.
How could i anchor them correctly programmatically?
Any help would be appreciated.
There are good video tutorials about the 4.6.x UI here:
http://unity3d.com/learn/tutorials/modules/beginner/ui.
Especially for positioning the elements I recommend watching: http://unity3d.com/learn/tutorials/modules/beginner/ui/rect-transform.
I suggest you learn how to use the anchor correctly first. If you want to change the position and size of UI element in a script you can do that through the RectTransform component. It offers functions like offsetMax,offsetMin and sizeDelta for position your UI element. The functions you need to use depend on your anchor setting.
as LokiSinclair said. You just need to Adjust the Scale that the new UI provided. It is the four Arrow on the Canvas of each Object and every UI object is inheriting their scale behavior from their Parent.

Core Plot show 'Loading' spinner

I am using core plot (0.4) to render a graph and it is working fine. However (especially when on the iPad) the graph can take a while to render. I have added a UIActivityIndicatorView to the graph which shows up when the graphs starts to be drawn, but I can't find any event to hook that I can use to stop the spinner.
I have tried using the numberForPlot method and detecting when the last datapoint has been requested, but this is called multiple times for each line on the scatterGraph, so I can't easily use this. Is there any sort of graph rendered event that I can hook for this?
If you're doing [graph reloadData] to update the graph, can you just bracket that call with your indicator start/stop calls? I think that core-plot does everything in the main thread.
Core Plot uses Core Animation for all rendering. A single graph contains many CA layers that are rendered independently. -reloadData just tells the graph to update its data cache next time it draws and tells Core Animation that it needs to be redrawn. Similarly, just bracketing the data source calls only captures the data caching that happens before the render. You would miss the actual drawing time and would never know if Core Animation re-rendered the graph at another time, such as after a resize.
If you only care about the time to render the plot and not the other parts of the graph, one way to do this would be to subclass CPTScatterPlot and override the -renderAsVectorInContext: method. Bracket the calls to super with your activity indicator code.

Core Plot: Data point labels shown, or when data points touched?

Is there a way using Core Plot to have periodic labels assigned to data plots? Such as 10-20 labels listed across my plot points.
Here is an example (mockup) of what I am hoping to do:
Is it possible to do this when the graph loads, or maybe when you swipe across the graph you see the data points showing their call out?
You'll have to draw the callout bubbles yourself, but it is possible to label data points. To make a callout, you could subclass CPTextLayer and have it draw the bubble around the text. Use this new class to make your labels.
You can implement a datasource method to inform Core Plot which data points should be labeled and provide your own labels if you wish (this is how you'd do the callouts). You can also respond to touch events (click events on the Mac) and show a label for the point that was touched. You have to touch each point individually--you won't get the delegate notification if you drag from one point to the next.
The examples included with Core Plot demonstrate how both techniques work.