{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Working With Cross Plot Data","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":false}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"working-with-cross-plot-data","__idx":0},"children":["Working With Cross Plot Data"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"working-with-cross-plot-data-1","__idx":1},"children":["Working with Cross-Plot data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note"]},": you will need to include CrossPlot in your ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Module Dependencies"]}," list."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A cross-plot data object is a simple data structure that holds a reference for 2 or 3 other data objects. The first two references are for the X and Y components of the cross-plot. The third reference is for the the optional z value that can be used to color the points. The data you specify must implement interface import com.interactive.intviewerapi.data.IXpMember. Currently this interface is implemented for IHorizonData, ISeismicData and IPointSetData."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"    import com.interactive.intviewerapi.data.IXpData;\n        ....\n    IXpData xpData = IXpData.factory.createNewInstance(xdata, ydata, null);\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Some data sources may have multiple attributes (horizons, pointset, etc.) and so it may be necessary to specify which attribute you want to use for the cross-plot. For example, if you have an horizon dataset with two attributes, \"R0\" and \"R1\" you could build the data source to cross-plot R0 vs R1 as follows:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"    IHorizonData hdata = ...\n    IXpData xpData = IXpData.factory.createNewInstance(hdata, hdata, null); \n    xpData.setXAttribute(\"R0\");\n    xpData.setYAttribute(\"R1\");\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you don't specify an attribute, the default one will be used."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To create the crossplot window, follow this template:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"    NamedProps props = new NamedProps();\n    String hdata = data.getDataName();\n    props.putProperty(IXpLayer.DISPLAY_NAME, lname);\n    props.putProperty(IXpLayer.COLOR_MODE, IXpLayer.COLOR_MONO);\n    IXpWindow lw = IXpWindow.factory.createWindow();\n    IXpLayer layer = IXpLayer.factory.createLayer(lw, data, props, false);\n    layer.select(...); // required for display, parameter can be null or a query\n"},"children":[]}]},"headings":[{"value":"Working With Cross Plot Data","id":"working-with-cross-plot-data","depth":1},{"value":"Working with Cross-Plot data","id":"working-with-cross-plot-data-1","depth":2}],"frontmatter":{"title":"Working With Cross Plot Data","pageId":"intviewer-apis-for-data/working-with-cross-plot-data","seo":{"title":"Working With Cross Plot Data"}},"lastModified":"2026-10-22T14:32:05.574Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/intviewer/intviewer-apis-for-data/working-with-cross-plot-data","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}