01-15-2013 03:24 AM - edited 01-15-2013 03:26 AM
Yes, you could use an image. for the graph. You could first plot the image and then the dots over it.
You need to place a 2D picture and use picture tools to compose the graph. Have a look at some of the examples (e.g. "xy multiplot" or "waveform and xy plots").
To place an image in the back of the xy graph, you can use the plot images tools. Have a look at the "plot images" example).
01-15-2013 03:39 AM
i have found this and i followed the steps but still does not work :S
http://digital.ni.com/public.nsf/allkb/FF55BDA8C9F0C0ED862573450053A425
01-15-2013 09:32 AM
Then show us your code again....
01-15-2013 10:17 AM
I have managed to do that!
two more remaining problems that i cant find solutions
first after ploting the points and displaying the values in the control box i want to reset everything how to do that?
and second i want to plot the spectrum using matlab code into labview how to do that?
if you help me in these two im done 😄
01-15-2013 10:50 AM - edited 01-15-2013 10:56 AM
arabic wrote:first after ploting the points and displaying the values in the control box i want to reset everything how to do that?
Create an event for the reset button and set the array containing the points back to zero lenght. What elese should the reset button do?
arabic wrote:and second i want to plot the spectrum using matlab code into labview how to do that?
What is so special about matlab code? What does it do?
You can translate the matlab code into plain LabVIEW, probably with little effort. (preferred)
If you have mathscript, you can use matlab-like syntax without the need of having matlab.
If you have matlab installed, you can also use the matlab script node.
01-15-2013 11:00 AM
the code is very simple im just going to plot the spectrum,
im going to try your suggestions and see which one works. if you have better idea for the following code please let me know 🙂
% Input Parameters
%peak wavelength
lamb1=468;
lamb2=570;
lamb3=689;
lamb4=700;
lamb5=0;
%intensity
i1=0.62;
i2=0.55;
i3=0.52;
i4=0.5;
i5=0;
light=gausslight(lamb1,i1,lamb2,i2,lamb3,i3,lamb4,i4,lamb5,i5);
plot(380:5:780,light,'b','linewidth',2)
grid on;
title('Light Spectra')
xlabel('Wavelength (nm)');
ylabel('Intensity')
01-15-2013 11:01 AM
the reset button should clear the graphs too.. 😄