I am able to displaying multiple Y-axis using core plot, but my problem is I need to display different values on two Y-axis with different interval difference.
How to draw graphs using core plot same as above images.
Is it possible to draw graphs or not. If not possible please tell me reason.
If possible give me some suggestion or provide sample code using core plot.
Please help me.
Thanks in advance.
You need to use a separate "plot space" for each different axis scale. For these graphs, you would need two—one for the left y-axis and the x-axis and another for the right y-axis. See the Plot Gallery (the Plot Space demo) and CPTTestApp (Mac version) example apps for sample code.
For LineChartDataSet you have property axisDependency. This property could be
AxisDependencyLeft
AxisDependencyRight
For swift
.Left
.Right
Related
I have two plots queried from InfluxDB that share the same timestamps.
But as you can see in the pictures that because the y-axis label of the bottom graph takes up more space the two plots misaligned in the timestamp.
I would really like to be able to plot these two sets of data perfectly aligned so I can see how one affects the other.
Can you advice how I can achieve that ? Or being able to make a subplot that is draw two time series plots in one panel, sharing the x-axis would also be great.
I am currently trying to use spectral-methods to analyse topographic landscapes.
When i FFT the landscape and plot the power-spectrum. From the power-spectrum an orientation of the structures in the landscape can be found.
2D power-spectrum:-
In this power-spectrum, i would like to make a cross-section.
This is easy when the peak amplitude orientation is along the x or y-axis.
But for this area (and others), this is not the case.
Cross-section from another area - orientated along the y-axis:-
My problem is i want to make a cross-section along the peaks in 1, and i just cant seem to figure it out how.
If anyone could point me towards some solution for this. Been stuck here for a couple of days now.
Edit 1
I would like the cross-section, to be a line along the peak orientation.
Edit 2
Improved the first image to show where i want my cross-section
My solution was, as GameOfThrows suggested:
Pick 2 (or more) points on the orientation i want
used Least squares on the points to create the line
Setup a meshgrid for the interpolation.
Use the interp2 function on the new line.
define a proper axis for the section
In my final cross section i ended up having multiple lines in it, that way i was sure to hit the max amplitudes.
i was a little with the answer to my question, but i have been busy :)
You can use ginput built-in matlab function to store 2 (x,y) coordinates of your power spectrum and then use this values to delimit a profile to be interpolated.
I have 2 scatter plots obtained from an experiment. The images look very similar on a naked eye. I would like to obtain the difference between these 2 images. The 2 images have :
Same Background
Line markers are yellow and blue.
I am not an expert with image processing tools in Matlab. What would be the right approach to highlight the differences in the 2 scatter plots ?
Do we need to plot the scatter plots using the same linemarkers in order to obtain the difference ?
Thanks
You could use the command imshowpair(img1,img2) to compare between images, more help can be found at Mathworks Compare differences between images section.
Simple, in openCV, I would use absDiff which will highlight the difference very well. MatLab too have this function, while I have never used the MatLab's version before, it shouldn't differ too much from the OpenCV version.
Here's the MatLab equivalent: imabsdiff
An example showing how to utilise absdiff for your case: imabsdiff example with code
Do comment if you need anymore help, or if that doesn't solve your problem.
Has anyone tried creating Normal Distribution chart using FLOT?
If so, can you please put me in a right direction with some suggestions and links to tutorial?
Thanks.
FLOT is simply a plotting engine. If you want to create a Bell Curve, you need to feed a probability density function a series of x values and plot the resulting points.
For instance I used the functions from here to create this:
Here's the jsFiddle that shows my work.
I'm using Core-Plot on my iPhone app.
I need all the records data to be viewed without moving the plot space (the user interaction with the graph is set to NO).
The problem is that the values on my X axis are spread beyond the visible view, and can only be seen when moving the graph.
How can I make the values closer on my X axis?
10x
You need to adjust the xRange of your plot space. Similar to NSRange, plot ranges are given as a starting location and length, which can be negative. Look at the Core Plot sample programs for numerous examples.