Get all series inside the axis and setinterval with min max - lightningchart

Hi I have one axis and multiple series inside it.I want to setInterval Y axis for max Y value and min Y value.
My question is can I setInterval for series instead of axis ? Because one of my series is from 50 to 100 and another is 200 to 500... sometimes min max is set in axis wrongly.
If I cannot setInterval for series, how do I get all the series inside axis so I will process min , max manually.
something like below , but for axis
chart.getSeries().forEach(series => {
});

Axis interval is configured on Axis, not Series.
You said you only have one Axis, which would mean that all your series are inside the same axis - why do you want to get all the series inside some axis? All series are created in application code, so you should be able to keep references to all of them, and make a list if you need.

Related

Trying to setting a range for abline in R

When I use the abline in R ,
plot(NULL,xlim=c(0,50),ylim=c(-30,0))
abline(h=-15,col='black')
how do I set the range of x axis to a certain range?
(like a horizontal line at y=-15,but end with x =50) (not using xlim)
You can use the lines() function, taking an x and y coordinate of start/end point. This example has starting point (0|-15) and end point (50|-15):
lines(x=c(0,50), y=c(-15,-15))

how to set octave x-axis limitation and interval

I want to plot a graph in octave in which the x-axis maximum value is 2048, and the they start with 0 and increment by 100.
The y data is a vector of 2049 numbers.
here is my code :
ydata = load ("data.txt");
x = linspace(1,2048,2048);
plot(x,ydata(:,1));
this figures the x-axis with maximum value of 2500.
To add to Silver's answer, you might also want to set the XTick property of the axes:
ydata = rand(2048,1);
plot(ydata(:,1))
xlim([0 2048])
set(gca,'XTick',0:100:2048)
This produces the following, which I think is what you're after (note the axis labels are a bit on top of each other but that's because you wanted them every 100 - changing the aspect ratio of the figure will help):
I think what you are looking for is xlim
xlim([0 2048]);
That will limit the x-axes in the plot between 0 and 2048.
See the documentation here for more info.

find the x value where y is at its minimum value

im currently using the following script in an area under curve analysis:
min(data[,2])
to find the min value for my x axis, i would like to create another script which returns the x value where y is at its minimum value?
Cheers

Creating a 2-D plot using three parameters in IDL

I am able to create a 2-D plot using two parameters in IDL, i.e., star formation rate (y-axis) vs. time (x-axis).
But I would like to include the redshift (another variable) corresponding to each data point, say, as the top x-axis. It didn't work when I tried adding the third variable to PLOT procedure, and I have not been able to find any discussion on how to accomplish this online. Any help is appreciated.
First run PLOT.PRO with the NODATA keyword set and XAXIS=4 and YAXIS=4 to suppress each axis. Then you can use the AXIS.PRO program to define each axis. Then you can use OPLOT.PRO to draw the points of Z vs. X and Z vs. Y, where Z = star formation rate, X = time, and Y = redshift. Look up details on the [XYZ]AXIS keywords to determine which axis to draw at each time. You can even color each axis using the COLOR keyword with the AXIS.PRO program.
The only trick is that you will have to scale the Y data points to the X-axis scale prior to plotting because you will explicitly define the [XYZ]RANGE when calling PLOT.PRO (well you could do the converse and scale it to Y and redefine X, it's your choice). You need to do this scaling because OPLOT.PRO and, say, PLOTS.PRO use the original [XYZ]RANGE defined when calling PLOT.PRO to convert device coordinates to data coordinates.
Does that make sense?
first call PLOT, TIME, SFR with XSTYLE=9 to force exact range and suppress the top x-axis
then use the AXIS procedure to create the top x-axis
be careful with the ticks of that axis, which you want to correspond to a REDSHIFT that you compute from the TIME variable
example with a bottom x-axis in velocity and a top y-axis in frequency:
> plot, vel, spec, xsty=9, xtick_get=xtick, xtit='Velocity (km/s)', ytit='Antenna Temperature (K)'
> axis, !x.crange[0], !y.crange[1], xaxis=1, xtickv=((ref_freq - ref_freq/299792.458*xtick)), xtickformat='(F8.3)', xticks=n_elements(xtick)-1, xrange=(ref_freq - ref_freq/299792.458*minmax(!x.crange)), chars=1.5
You could always set the color to be the third dimension (ie. color or size).

How to control xtics in gnuplot

As the title says, I want to control the range and the amount of xtics. I use gnuplot for plotting data files in which the horizontal axes is usually time (t) taking values in the interval [0, t_max]. OK, now let's suppose the following scenario:
The maximum value of time is 4086 and this particular value is not known beforehand. However, it can be found using
stats "data.out" u 1
set xrange [0:STATS_max]
My question is how can I round up the maximum value of t to the closest hundred (4100 in this case)? Also, is there a way to tell gnuplot to print only 5 ticks at the horizontal axes regardless of its range (rounding up the maximum value to the closest hundred, or decade it will always be divided by 5)?
Many thanks in advance!
To round up to the closest hundred, just use the ceil function:
set xrange[0: 100*ceil(STATS_max/100.0)]
Regarding the xtics, you can only set the start, increment, end, and explicit tic position of the tics, but not the number of ticks. But since you set the xrange manually, you can use this information to calculate the tic frequency:
x_lim = 100*ceil(STATS_max/100.0)
set xrange[0: x_lim]
set xtics x_lim/4.0

Resources