From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-14-2019 01:23 AM
I have a 2D data of an image of size 1000x1024 and I have a 1D graph of size 1x1024. How can I plot both of them in a single plot/chart? Both the data are in the form of an array.
Solved! Go to Solution.
05-14-2019 03:32 AM - edited 05-14-2019 03:32 AM
Use the PlotImages.Back property of an XY-graph to plot the image: https://zone.ni.com/reference/en-XX/help/371361R-01/lvprop/mxsiggrph_plot_imagesback/
05-14-2019 05:31 AM - edited 05-14-2019 05:35 AM
But the data which I have is in 2D array form and the images are generated from a machine and not imported from a file. So every time the code runs, there will be a new image. That's why I need to plot it as an array on another array.
05-14-2019 05:51 AM
@yp96 wrote:
But the data which I have is in 2D array form and the images are generated from a machine and not imported from a file. So every time the code runs, there will be a new image. That's why I need to plot it as an array on another array.
"2D array form". Is it an RGB image represented as a 2d-array? Then just use "draw flattened pixmap". No need to import a file.
What do you mean by "plot an array on another array"? Can you show us some data and what you want to do, or some code, or pictures?
05-14-2019 06:04 AM - edited 05-14-2019 06:18 AM
In the attached image, the generated image can be seen above and the plot below. The image is obtained from the machine in the form of pixel values and then I have done coding to obtain the topmost edge in the image. Now I need to visualize that graph plot over the original image to see how well is the edge detected. I hope this makes it clear what I want to do.
I also attached a VI - trial_plot. It consists of both the image and the plot data.
05-14-2019 06:17 AM
Why not add the new graph to the 2D one?
/Y
05-14-2019 06:24 AM
I tried adding using the build array, no results. I only see the image and when I see into properties of the plot, I don't see the tab of Plots to change the color of the line graph. How would you suggest to add it?
05-14-2019 06:29 AM
You can r-click and Show Legend, if memory serves, there you can set plot properties as color.
/Y
05-14-2019 06:46 AM
I tried and I didn't see any such option. Could you please show it in the attached VI?
05-14-2019 06:56 AM