10-29-2009 01:54 PM
I'm attaching a very simple VI I wrote that graphs and saves an image of a spreadsheet I use. I'm also attaching an example spreadsheet so anyone can see how it works.
The X-Axis actually needs to be a string, not a number. I am currently listing the strings at the top and showing which number they relate to. I would like to replace the numbers at the bottom of the chart with the strings that belong in those spots. I found 1 post that talked about being able to do this, but didn't understand it very well. Can anyone tell me how to replace the X-Axis values with these strings?
Thanks.
10-29-2009 01:59 PM
In this thread I posted code that does this.
Ben
10-29-2009 02:21 PM
That's pretty good, and worked well. However, the exported image doesn't show the picture your VI makes (X values). It shows the original scale. I print this exported image so I can show shop floor associates the info.
Is there a way to actually change the chart scale to strings?
10-29-2009 02:30 PM
JMBacker wrote:That's pretty good, and worked well. However, the exported image doesn't show the picture your VI makes (X values). It shows the original scale. I print this exported image so I can show shop floor associates the info.
Is there a way to actually change the chart scale to strings?
No not yet.
You could grab an image of the FP and crop it down?
Just trying to help,
Ben
10-29-2009 02:33 PM
Yeah, I'll keep working on it.
Thanks for the help.
10-29-2009 03:12 PM
I have taken the liberty of modifying Ben's example to export the graph to a JPEG file.
10-29-2009 07:12 PM
10-30-2009 05:50 AM
Good!
Darin,
Could you please duplicate some of teh tags i added? This way we can find your work agian latter when the next person asks.
Ben
10-30-2009 07:41 AM
10-30-2009 09:06 AM
Here's what I came up with for my particular application. I used the caption since it gets exported with the graph image, moved it to the bottom of the graph, sized it the same width as the graph, changed the vertical arrangement, then counted how many lines it took to fill the whole width of the graph. I initialize an array this size, then devide how many entries I have by the total number of lines to fill, take out the extra spaces at the beginning, and insert each entry at the correct index in the string array. I think it might make more sense when you look at the block diagram.
It doesn't line the descriptions up perfectly, but it's always pretty close. Close enough to figure out what is what. Hope this helps some of you.