Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Plotting 2 data lines on one histogram graph

How can I plot the histogram of 2 image on one single histogram graph?

I understand that with imaqhistogram, I can plotY. How can I use the function to plotXY? I would like to know the X values, which I suspects should be generated in the histogram report too.
0 Kudos
Message 1 of 6
(4,514 Views)
Hello,

Thanks for contacting National Instruments.

I came across your post regarding histogram plots, and I think that the following example file will help resolve your question. It shows how to take a histogram from an image and display it on a graph.

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3DB4556A4E034080020E74861&p_node=DZ52495&p_source=External

I hope this helps. Please let me know if you need further assistance. Have a great day!

Kind Regards,

Joe Des Rosier
National Instruments
0 Kudos
Message 2 of 6
(4,514 Views)
Joe,

I have looked at the eg you sent me. But it is still plotY. I am asking if it is possible to plotXY with histogram.

Also I would like to find out if I can plot 2 histograms on the same graph space.

I would appreciate any suggestions.
0 Kudos
Message 3 of 6
(4,514 Views)
Hello again,

Do you want to create a histogram of discrete points, or do you want to create a histogram that looks similar to a bar graph with the X-axis range automatically updating to match the X data values?

Within LabVIEW, there are various histogram example VIs. I'd be willing to bet that one of these examples will suit your needs. To access the examples, open LabVIEW and click [Help]>>[Find Examples] on the front panel. Search for "histogram" and open the various files to observe various histogram implementations.

Furthermore, I have included a link to more information about the Create Histogram Express VI feature that's imbedded in LabVIEW. Click Here.

You can display both histograms on the same plot by building a 2-D array with the output histogram data, sending the array into a single waveform graph, and plotting the two data sets as different color/style points. I've attached an example program in which I overlay two histogram plots and create visual contrast by modifying the plot properties. To modify the plot properties, [right-click] on the graph on the front panel of your VI, select [Properties], and go to the [Data] tab. Here, you can change the plot styles for each data set. Also, if you [right-click] on the graph from the front panel and click [Visible Items]>>[Plot Legend], you can modify the colors of each plot by clicking on each respective plot icon and changing the display color.

What are you using this histogram to represent? If you can send me a detailed description of your desired functionality, I can further assist you in finding a solution.

I hope this helps!

Best Regards,


Joe Des Rosier
National Instruments
0 Kudos
Message 4 of 6
(4,514 Views)
Joe,

I am not using LabView. I am using LabWindows for my programming. I am displaying a few images and I would like to plot their histogram curves on one graph instead of having 3 graphs. Also I would like to find out the pixel values (ie Y levels) of each pt (X).
0 Kudos
Message 5 of 6
(4,514 Views)
My apology. I was under the impression that you were using LabVIEW. I should have verified this earlier. I don't know how your support request made it to the LabVIEW queue, seeing as how you need LabWindows assistance.

Please go ahead and re-post your question to the LabWindows support team here. I lack the expertise that the LabWindows group has, so they can better address your question in a shorter period of time than I can.

I apologize for the inconvenience.

Best Regards,


Joe Des Rosier
National Instruments
0 Kudos
Message 6 of 6
(4,514 Views)