Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » IntensityGraph with XY trace data(Reducing visual complexity in scatter plot while representing all data)
IntensityGraph with XY trace data [message #1259736] Fri, 28 February 2014 18:49 Go to next message
Steven Darnell is currently offline Steven DarnellFriend
Messages: 19
Registered: November 2010
Junior Member
I am interested in displaying an IntensityGraph with XY traces and data points. The goal is to reduce the visual complexity of a scatter plot by only displaying outlying data points while representing the remaining data points (hundreds to tens of thousands) with a density/intensity gradient.

Here is an example of what I am trying to achieve and my current progress with an XYGraph:
index.php/fa/17607/0/

Does IntensityGraph or XYGraph support this type of visualization? How feasible is it to display an intensity gradient as a background of an XYGraph? What sort of development effort is required to achieve this effect?
Re: IntensityGraph with XY trace data [message #1265489 is a reply to message #1259736] Thu, 06 March 2014 06:46 Go to previous messageGo to next message
Xihui Chen is currently offline Xihui ChenFriend
Messages: 8
Registered: December 2013
Junior Member
There are several ways to do that:

1. You can simply do this by overlapping an XYGraph on top of intensity graph, the problem is that you cannot zoom both graph.
2. Generate an image from intensity graph and make it as the background image of XYGraph, but you still cannot zoom both graph
3. Create a new type of graph that combines intensity graph and xygraph. It can reuse current intensity graph and xygraph components, but it still needs lots of coding. For myself, it is probably one week of development.

Re: IntensityGraph with XY trace data [message #1269361 is a reply to message #1265489] Tue, 11 March 2014 19:22 Go to previous messageGo to next message
Steven Darnell is currently offline Steven DarnellFriend
Messages: 19
Registered: November 2010
Junior Member
@Xihui, I think Option 2 is the best short term solution. My hope is to directly use the figure returned by IntensityGraphFigure.getGraphArea() as the "image from intensity graph". Do you have any suggestions on how to draw the intensity graph area in the XYGraph plot area before the trace, grid, or annotations are drawn?
Re: IntensityGraph with XY trace data [message #1270194 is a reply to message #1269361] Wed, 12 March 2014 16:47 Go to previous message
Steven Darnell is currently offline Steven DarnellFriend
Messages: 19
Registered: November 2010
Junior Member
Here is a snippet on how one can implement Option 1, overlay an XYGraph and IntensityGraphFigure on top of one another.

In addition to not being able to zoom, you cannot have a graph title, legend, or intensity ramp so that the plot areas align. Resizing also must be done manually (not implemented).

I want a title, so I will have to move onto Option 2. You can also use the legend with this option.

	public RamachandranPlot(Canvas parent) {

		m_parent = parent;

		// configure the plot
		Range axisRange = new Range(MIN_RANGE, MAX_RANGE);
		m_plot = new XYGraph();
		//		m_plot.setTitle(DEFAULT_TITLE);
		m_plot.setShowLegend(false);
		m_plot.setTransparent(true);
		m_plot.primaryXAxis.setTitle(PHI);
		m_plot.primaryYAxis.setTitle(PSI);
		m_plot.primaryXAxis.setMinorTicksVisible(false);
		m_plot.primaryYAxis.setMinorTicksVisible(false);
		m_plot.primaryXAxis.setRange(axisRange);
		m_plot.primaryYAxis.setRange(axisRange);

		// configure the heat map
		int dataLength = MAX_RANGE - MIN_RANGE;
		m_heatmap = new IntensityGraphFigure(false);
		m_heatmap.setMax(INTENSITY_MAX);
		m_heatmap.getXAxis().setTitle("");
		m_heatmap.getYAxis().setTitle("");
		m_heatmap.getXAxis().setMinorTicksVisible(false);
		m_heatmap.getYAxis().setMinorTicksVisible(false);
		m_heatmap.getXAxis().setRange(axisRange);
		m_heatmap.getYAxis().setRange(axisRange);
		m_heatmap.setColorMap(new ColorMap( PredefinedColorMap.Cool, true,
				true ));
		m_heatmap.setShowRamp(false);
		m_heatmap.setDataHeight(dataLength);
		m_heatmap.setDataWidth(dataLength);

		// load data... (not shown)

		// overlay the graphs
		org.eclipse.swt.graphics.Rectangle client = m_parent.getClientArea();
		Rectangle constraint = new Rectangle(0, 0, client.width, 
				client.height);
		m_container = new Figure();
		m_container.setLayoutManager(new XYLayout());
		m_container.add(m_heatmap, constraint);
		m_container.add(m_plot, constraint);

		// put graph in canvas
		m_lws = new LightweightSystem(m_parent);
		m_lws.setContents(m_container);
	}
Previous Topic:Data array format for Intensity Graph
Next Topic:GridTableViewer, go to line with "\n" ?
Goto Forum:
  


Current Time: Mon Dec 09 16:08:56 GMT 2024

Powered by FUDForum. Page generated in 0.03793 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top