Basically, I have been trying to create a jet colored scatter plot in MATLAB.
Ref: Clayson et al. 2013
I have no z-value. Colormap is also not working. How exactly to do it? Thanks
What you are looking for is called a density scatter plot. You don't need a third dimension in order to create it, so don't worry for your missing z. The coloring algorithm is based on the density of the points.
Such plotting function is not included in the default Matlab packages and toolboxes, but after a quick search I probably found exactly what you are looking for. Take a look at this File Exchange release. It contains a full working function for creating density scatters together with a few illustrated usage examples:
I have the plot below:
and I would like to fit linear trendlines to the data, so I can use the slope in further calculations. However, when I try to fit a linear trendline, I get this:
If I fit a power trendline, then I get an R^2 over .999, but that trendline is useless to me... Does anyone know the proper way to accomplish this?
EDIT: Here is the data in CSV format
Iron in Copper,,,Cobalt in Copper,,,Nickel in Copper,,
T (oC),D (cm2/sec),1/T (1/K),T (oC),D (cm2/sec),1/T (1/K),T (oC),D (cm2/sec),1/T (1/K)
1074,5.65E-09,0.0007423078,1077,3.43E-09,0.0007406584,1076,1.98E-09,0.0007412074
974,1.11E-09,0.0008018282,983,7.64E-10,0.0007960833,980,3.57E-10,0.0007979891
895,2.86E-09,0.0008560544,904,1.77E-10,0.0008495094,900,7.87E-11,0.0008524059
830,7.80E-11,0.000906495,844,5.09E-11,0.0008951349,847,2.61E-11,0.0008927376
780,2.67E-11,0.0009495324,793,1.65E-11,0.0009379543,791,6.82E-12,0.0009397171
719,6.55E-12,0.0010079121,744,5.31E-12,0.0009831392,743,1.90E-12,0.0009841067
,,,701,1.76E-12,0.001026536,,,
Hmm - with those values, i get:
The trend lines seem fine for me? (Sorry, no answer, but i can't put the chart into a comment...)
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.
I'm a little bit stuck on how to plot a histogram in MatLab, and typing help hist in MatLab does not make me any wiser. So I would appreciate any help!
Basically my problem is very simple. I have a vector, V, with five values, where each value represent the volume of a certain layer of the Earth. I simply want to create a histogram of these data, where the x-axis in my histogram should say "Inner Core", "Outer Core", etc., while the y-axis will display the volume. I've tried using the hist-command in various ways, but I can't get this to work. For instance, if I just type hist(V), the volume-values actually show up on the x-axis, and not the y-axis.
If anyone can help me how to make this simple histogram I will be very grateful! According to the instructions on my homework, I have to use the hist-command.
What you actually what is a bar plot.
bar([4,20,10,3,8])
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.