3D surface plot

Hi,
I have a set of 3 vectors X, Y and Z, and I plotted them in a surface plot. There is a minimum in the surface plot, and i know this minimum, i just take the minimum of the Z-values. I would like to mark this point on the surface plot and also mark the coordinates with lines of this point. Also the lower regions of the plot are in black, because of the color spectrum, i'd like to change that aswell, so smurking up the plot a bit . I attached the vi and the data set. Also, could there be a better way to make a surface plot? If you put the z-range from 0 to 1000, you can see the minimum, but it's not very nice, not continuous.
Thanks,
KF_
Attachments:
plot.vi ‏329 KB
test.txt ‏397 KB

I posted a semi-worse-case 3d example in this thread. This is a preview of the code I used...
Starting at post #7 in that thread, you will find a tutorial that discusses how to work with the 3d graph.
Ben
Message Edited by Ben on 11-16-2009 08:29 AM
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction

Similar Messages

  • Maximum matrix size for surface plot?

    Morning,
    I've streamed data from an experiment to TDMS, and would like to display it in DIAdem. I have M channels of N data points and would like to display them in a surface plot.
    Usually, I'd expect to do the following:
    - Build a X axis (Generate Numeric Channel - N points at dX interval)
    - Build a Y axis (Generate Numeric Channel - M points at dY interval)
    - Build a Z matrix (Convert Matrix from X axis, Y axis and the M channels of N data points)
    I can then plot the X Y Z triplets to a surface plot.
    Alternatively, I can build the X and Y arrays and plot X Y Z in matrix mode. This has the added benefit of not forcing interpolation, which *always* crashes
    Now the kicker. For my dataset, M = 192, N = 290 000 and I'm unable to plot more than the first 20% of the data in X. I suspect that Diadem's limited to displaying 2^16 in surface plots, but no error is returned. Does anyone know if this is the case?
    I can decimate my data to fit the limit, but it's never nice to have to throw away data!
    (For clarification, the data is a raster scan of a sensor over a surface. I could drop the sampling rate and/or increase the speed over the surface, but that's a secondary concern)
    CLD

    Actually, it's the creation of an intensity plot that I'm more interested in, for two reasons. I can split my data into smaller segments and then compare measured data against my CAD model, but it's also handy having the global intensity plot available for human overview. Amusingly, almost any way I try to split the data besides decimating means that the split between datasets will be in some region of interest, which makes it awkward for non programmatic review  Meanwhile, the problem with decimation is that I have four channels of data for each of those slices: channels 1 and 2 are analogue signals and averaged to give one plot, channel three is another analogue voltage that is plotted in another, but channel four is a digital waveform with some pretty short pulse widths. Decimate too much and you'll barely see any meaningful data when plotted on an intensity plot for this.
    My instinct before starting was that DIAdem would handle the large dataset better than LabVIEW, which it did if I only wanted to plot YT data. However, after changing tack and heading back to LabVIEW I found that it was able to churn through things a bit better.
    I'm happy to send an email to describe what I'm doing in a bit more detail, as well as provide some of the resulting plots, as it's a sensitive project. Understandably, even if I could upload the data for someone else to work on, I'm not sure how much use 1.7 Gb of TDMS is to anyone else!
    CLD

  • 3D Surface Plot Cursor Error

    I can't seem to get the cursor(s) to function on the 3D Surface Plot. I right-click on the front panel plot, go to properties, and select cursor - but then I get an error and LabVIEW crashes. Has anybody had any sucess with this? I've tried it in both LabVIEW 6.1 and 7.1

    Hi,
    I have used the cursors in the 3D graph a couple of times with no problem. There are a couple of advices that I can give. Place the 3D graph strait form the pallet, do not create an ActiveX container and add the 3D graph. Open one of the 3D examples and see if you can add the cursors to a graph that was previously created. You can also try to unregister and reregister the ActiveX control for the 3D graph to make sure that the OS registers the control correctly. You can find the ActiveX control in the system32 folder (cw3dGraph.ocx) and here is a document on how to register the control.
    I'm also including here an example that uses cur
    sors, see if you can open it and run it. The second attachment is a style file for that 3D graph that includes a cursor. You can load this file by right-clicking on the graph and select "Import Style..". Hopefully you'll be able to load the style and start to work from there.
    I hope this helps.
    Let me know if you have any further questions.
    Regards,
    Juan Carlos
    N.I.
    Attachments:
    Torus_with_3D_Cursor.vi ‏312 KB
    3DGraphStyle.cwx ‏3 KB

  • 3D surface plot export _ missing scale on the projection​s

     Hi all,
    I am using 3D surface plot subvi in LabView 2010 SP1. After plotting the data, I can export the images (.bmp, mata file etc.). While exporting the projections of the images, I am not able to get the axis scales on them, though when I export the isometric view, I do have all the scales in the exported image.
    Any clues.
    Cheers,
    Deepak Arora
    LAB View 2010 SP1

    Hi Daniel,
    I am using surface plot helper to plot a 3D data set. On the front panel indicator of this, there is an option to export the image files in various formats, once you right click on the graph. I have attached two of the exported files. One is an isometric view and another one is the X-Y projection obtained by using the projection palette attached to the 3D surface plot. As you notice, the scale bars are missing from the projection.
    Thanks,
    Deepak
    LAB View 2010 SP1
    Attachments:
    20110830-PS-r1-FFTAmp.jpg ‏66 KB
    20110830-PS-r1-FFTAmp2.jpg ‏50 KB

  • Legend for a 3D Surface Plot

    How can I create a legend for a 3D surface plot? I'm doing a xy-projection and the view direction is directly towards this plane. The plot style is a surface contour plot. I want to display next to the plot the legend in a separate bar where the different colours with each value are displayed. The value for each contour line shall be displayed in the legend.
    Patrick

    OK,
    I remember that thread now. That was the one were you did not want to use interpolate colors and I did. Well I still  like to interpolate colors but that presents another challenge when trying to produce a proper color ramp. Without resorting to using the picture control
    http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=14&jump=true
    I decided to play with some of the built in objects.
    All of the round objects like knobs and guages include a color ramp. This gave me a ramp but is not quite up to what you get with an intensity graph.
    Since I could not get a ramp on any of the straight indicators like sliders etc, I hid most of an intensity graph and just use the Z-scale. It turns out that the same data structure can be used in the intesity graph as the guage.
    Can anyone think of other ays of producing a proper color scale when intepolation is turned on?
    Ben
    Message Edited by Ben on 12-24-2005 08:03 AM
    Message Edited by Ben on 12-24-2005 08:03 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Scale.vi ‏81 KB
    Scale.JPG ‏111 KB

  • Missing data in 3D surface plot.

    Got an easy one for someone to solve.  I've created a 3D plot, but the plot doesn't show all of the data.
    I'm reading data from a set of .txt files and trying to visualize the results via the 3D plot.  Each txt file contains a set of 401 data pairs (y location, measurement).  A scalar (x location) is assigned to each file set, then added to an array containing data from previously read files.  The resulting array is parsed, rearranged, etc. before going to the 3D Surface Plot control.  Looks goofy because this .vi was originally used to combine data from multiple .txt files into a single file.
    As you can see from the screen shot, the 3D plot only shows data from 400 to 445 (input data goes to 800).  I checked the plot input arrays/matrices to ensure all of the data was read from the .txt files (it's all in there).  What am I missing?
    The .vi is attached along with a sample .txt file.
    Attachments:
    incomplete 3d plot.vi ‏23 KB
    OE1_CHANNEL1_20100106_141010_58.txt ‏10 KB

    You might want to transpose the z array so the dimension better match the x and y array sizes. Also eliminate the zero at the end of the y array.
    Delete the first column from the z-matrix, it seems to duplicate the y array.
    Your data and array gymnastics are incomprehensible and way too complicated. Can you tell how you want to read the input file in some simple words?
    LabVIEW Champion . Do more with less code and in less time .

  • Converting parametric to a surface plot?

    I had previously generated a 3D plot, with the 4D being intensity.
    This was done using a parametric plot.
    How can i convert the parametric plot to a surface plot.
    Attachments:
    4D plot.vi ‏61 KB

    Fred,
        I took a look at the VI you had attached an noticed that your Z matrix only had 1 dimension of data therefore your data will only be points, which it is. Is there any particular reason you are only sending 1D of data to the z matrix?? Second thing I noticed was just the inherent difference between parametric plots and 3D surface plots. The big difference here is that you input relations to surfaces for x,y,and z for the parametric while the 3D surface really only uses z for relative surfaces and the y and x array as skews for the plot. Basically I think you need to figure out the difference in what the plot shows and not try to directly transfer one to the other. The math behind it can be confusing and while looking at a parametric plot it might seem simple to make a surface plot out of it, it is arithmetically hard to do. Look into the issue a little more and let us know what you find, I would be interested to know, given that I am a math nut, but not in 4D space.
    Tyler Heikes
    Applications Engineer
    National Instruments

  • Problem printing 3D graph surface plots

    I have a LabVIEW vi that I have written that uses 3D graph surface plots.  The front panel and 3D plots look great on the monitor.  However, when I use the file > print option to print a snap shot of the front panel the 3D surface plot graphs are missing.  All of the other controls and indicators print correctly, but the surface plots are missing completely.  Any ideas on what may be the cause?

    Hi JM,
    Do you have Report Generation Toolkit? If so, this looks like it may be related: http://digital.ni.com/public.nsf/allkb/981C98819DBB89FE862569610046CFB8?OpenDocument.
    Let me know if this helps.
    Thanks,
    Dan Richards
    Certified LabVIEW Developer

  • Plotting two 3D surface plots error

    I am ploting 2 3d surface plots separately. One plots ok, the 2nd is giving me an error - plot number is out of range. Both plots have the same plot number - (1). Both are plotting similar data. Why is is one failing?

    Greetings, John!
    I would first check the obvious things, like are you running out of memory? 3D charts can use a huge amount of it. Perhaps you can plot a couple of smaller data sets on your charts and see if you get the same error. You might also try a wiregrid format, instead of color, since color uses up a lot more memory.
    Just a couple of hints.
    Eric
    Eric P. Nichols
    P.O. Box 56235
    North Pole, AK 99705

  • 3D surface plot - z matrix formation

    Hi all.  I have 3D data (series of x,y,z points) which I'd like to plot as a surface.  The form of my data is 1D arrays of X,Y and Z.
    The problem I'm having is I'm unsure how to form the z-matrix, which needs to be a 2D array.
    I've looked at the shipped examples (all based on the same VI) and it's still unclear.  There is no detailed Context help for 3D graphs, only the statement in the second sentence shown in the picture.
    Can anyone help to explain to me how to form the 2D z-matrix?  Thanks.

    Probably the best way to visualize what the inputs mean is to just run a few simple test inputs to the Plot Helper VI and watch how it plots.  
    David_L | Certified LabVIEW Architect
    LabVIEW Tools Network | LabVIEW Tools Network Developer Center

  • 3d Surface Plot advice

    I'm completely newbie to 3D in Java. I've installed the 3D JDK, and could do with some pointers of where to start - i've seen a lot of different classes used to do similar things, and am unsure where to start.
    I have a double[][] array, and would like to plot this data as a surface map, with the values in the array being the magnitude (X Axis).
    What classes should I use, and is there anything I should be aware of.
    What about deployment - is this a big issue?
    Thanks in advance.

    Ok, this is a method that creates a surface along the x and z axis, amp is in the y axis, using QuadArray. Then simply use the Shape3D.setGeometry(QuadArray) to set it as the geometry of the Shape3D object.
    private QuadArray createThicknessStrip(int zones, int dist, float width, float length){
    Point3f[][] thicknessPoints = new Point3f[zones][dist];
    QuadArray thicknessGeom = new QuadArray(4*zones*dist, GeometryArray.COORDINATES | GeometryArray.NORMALS | GeometryArray.COLOR_3);
    float[][] thicknessValues = new float[zones][dist]; // Initiate with the height at each vertexpoint.
    //Build 3D points from the values.
    for(int i=0;i<zones;i++){
    for(int j=0;j<dist;j++){
    thicknessPoints[i][j] = new Point3f(length/(dist-1)*j, thicknessValues[i][j], width/(zones-1)*i);
    int counter = 0;
    for(int i=0;i<zones-1;i++) {
    for(int j=0;j<dist-1;j++) {
    thicknessGeom.setCoordinate(counter++,thicknessPoints[i][j]);
    thicknessGeom.setCoordinate(counter++,thicknessPoints[i+1][j]);
    thicknessGeom.setCoordinate(counter++,thicknessPoints[i+1][j+1]);
    thicknessGeom.setCoordinate(counter++,thicknessPoints[i][j+1]);     
    return thicknessGeom;     
    Then set the attributes that you would like:
    Shape3D thicknessStrip;
    Appearance thicknessApp = new Appearance();
    TransparencyAttributes thicknessTA = new TransparencyAttributes();
    ColoringAttributes thicknessColor = new ColoringAttributes();
    PolygonAttributes thicknessPoly = new PolygonAttributes();
    thicknessPoly.setPolygonMode(thicknessPoly.POLYGON_FILL); //POLYGON_LINE if you would like a grid;
    thicknessPoly.setCullFace(thicknessPoly.CULL_NONE);
    thicknessApp.setCapability(thicknessApp.ALLOW_TRANSPARENCY_ATTRIBUTES_WRITE);
    thicknessApp.setCapability(thicknessApp.ALLOW_POLYGON_ATTRIBUTES_WRITE);
    thicknessColor.setColor(0.5f, 1.0f, 0.5f);
    thicknessApp.setColoringAttributes(thicknessColor);
    thicknessApp.setPolygonAttributes(thicknessPoly);
    thicknessApp.setTransparencyAttributes(thicknessTA);
    thicknessStrip = createThicknessStrip(bla bla bla bla);
    thicknessStrip.setAppearance(thicknessApp);

  • How acess 2D mesh data from 3D surface plot ?

    I have 3 vectors X, Y and Z, that I can plot using 3Dsurface graph and change the property node to Plot3DMesh. I want to get all the 2D Mesh data that LabVIEW generated to plot the surface. Is it possible ?

    You might try the Property node of the 3D graph. You might have to decimate the array that you get from the Data property.
    Eric
    Eric P. Nichols
    P.O. Box 56235
    North Pole, AK 99705

  • 3D surface plots with intensity value to overlay at each point?

    i have a data set with XYZ points and an 8 bit intensity value (0-255) which i would like to overlay on the 3D plot. Is this possible with the 3D surface graph in LabVIEW?

    You have an interesting question. There is no built in functionality for plotting a "4d" plot on LabVIEW's 3d plot. You can make the existing tools work though. What you need to do is create 256 plots on a 3d parametric plot. Each plot will show just one color and each has been modified to show just the data points. Provided you have enough data, you can make a surface appear solid. Please see the attached VI.

  • Creating a surface plot in Illustrator

    Good morning, new to this forum.
    I have a number of tools for plotting XYZ surface data (Z is the elevation and drives colour), however I'd like to be able to overlay a surface graph on other things, like a visual photo of the area. Illustrator has a number of graph options, but I can't seem to see an XYZ surface option.
    Any advice on how to do this with Illustrator or available plug-ins?
    Thanks
    -John

    > I'd like to do it in Illustrator as a graph instead of imported image...
    If you are not talking about importing an image (the photo of the object), then what do you mean by "superimpose"?
    Also don't know what you mean by "as a graph." Illustrator has a rudimentary graph feature. It's data table can contain three columns, and you can enter color values in one of the columns. But there is no built-in mechanism for using those values to determine the color of a data point.
    The best I can decipher what you want to do is this:
    You have a 3-column table: X distance, Y distance, ZColorNumber.
    You have said that your plotting software
    does already have the ability to colorize the XY datapoints according to the values in the Z column.
    You now want to simply superimpose the XYZ plot on top of a photo of the object. That should be a simple matter of exporting the plot in any graphic format that Illustrator (or Photoshop) can import, importing it, importing the photo, and aligning the two.
    Is that what you're talking about?
    Or is there some reason you need to have the three columns of data as live data within Illustrator?
    If so, that would not be difficult to do with Javascript. You could:
    1. Import the photo.
    2. Import (copy, paste) the three columns of data into an ordinary text object as tab-delimited text. The Z column could be expressed in terms of hexidecimal colors, or RGB colors, so long as the expression conforms to the syntax of Illustrator's Javascript color values.
    3. Write a script which would:
    Use the lower left corner of the photo as the origin.
    For each row (paragraph) in the text object:
    Use the values of the first column as X distance offsets (either absolute or relative to the photo width)from the origin.
    Use the values of the second column as Y distance offsets from the origin.
    Create a path (circle, for example) at the XY coordinate pair.
    Assign the Z value as the color value of the path.
    Is that what you are trying to describe?
    JET

  • 3D surface plot FillColor property node misinterpreting colorbox

    Hello there,
    I'm using the 3D parametric surface VI to plot a single data set.  When I wire a colorbox to the FillColor property the 3D plot interprets green somewhat correctly but a selection of blue in the color box makes the plot orange and a selection of red makes the plot blue.  The colors don't match up across most of the spectrum.  Somehow the colorbox is being misinterpreted but I can't find any reason for it.  I tried converting the U32 to different integer types and that didn't help.  Any input would be appreciated.  Thanks!  (Please see attached JPG)
    Ethan
    Attachments:
    code2.JPG ‏45 KB

    LV uses RGB colors.
    CW uses BGR colors.
    Break the U32 into its bytes and swap the R and B values.
    See this thread for an example.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for