change order of traces and images

I have graphs containing traces and images. Traces appear above images, I would like to have it the other way around. How can I do it?

(my images are transparent in most of the places, I would like to see the traces in these regions)

 

JimProuty

There's no simple way to do that.

Perhaps you could draw a polygon on the UserBack layer, instead?

Another not-simple way is to make a subwindow to hold the image.

Make the subwindow the same size as the graph with the traces, and hide the subwindow's axes once you get them aligned with the host (use fixed margins for both the graph and subwindow, and use the same axis ranges).

Here's an example:

Macro DemoTracesBelowGraph()

	Make/O/N=(20,20,4)/U/B threed=enoise(255) // rgba image, partially transparent
	Make/O/N=20 line= p // 0..19 trace to display below image
	Graph0()
End

Window Graph0() : Graph
	PauseUpdate; Silent 1		// building window...
	Display /W=(428.25,59,1128.75,601.25)/T line
	ModifyGraph margin(left)=43,margin(bottom)=43,margin(top)=43,margin(right)=43
	ModifyGraph lSize=3
	SetAxis left -0.5,19.5
	SetAxis top -0.5,19.5
	ShowTools/A
	Display/W=(0.2,0.2,1,1)/FG=(FL,FT,$"",$"")/HOST=# 
	AppendImage/T threed
	ModifyGraph margin(left)=43,margin(bottom)=43,margin(top)=43,margin(right)=43
	ModifyGraph mirror(left)=0,mirror(top)=2
	ModifyGraph noLabel=2
	ModifyGraph axThick=0
	RenameWindow #,G0
	SetActiveSubwindow ##
EndMacro

 

JimProuty

What I was suggesting was to not use any traces at all, replacing them with unfilled-polygons on the UserBack layer.

That would place the polygons behind the image.

There is no "Move to Front" for an image.

Alternatively, you could create a picture of the image and draw that on the UserFront or ProgFront layer.

I wonder if you are familiar with setting the drawing layer?

DisplayHelpTopic "Drawing Layers"

In reply to by johnweeks

marcel gateau

Here is an example of the numerous Graphs in which I combine traces (circles) with images. The images are 2D histograms, which are transparent for Z<1200. In the regions where they are not transparent, I would like them to hide the traces. SInce I have to do this on numerous graphs, it would be nice if there could be a not-too-manual solution.

Thanks for your help!

JimProuty

I think you want to place only *some* traces behind your images, not all.

So I put together a rudimentary contextual menu and Macros interface to "move" a trace to the ProgBack layer as a DrawPoly, preserving the trace's color, line size, and line style, and then the trace is hidden (not removed).

You can remove the polygon and show the trace, too.

Look for menu items in the Graph menu, but the easier-to-use menus are in the TracePopup and GraphPopup contextual menus.

Right-click a trace and choose "Move <trace> to ProgBack" to put it behind any images.

You can restore ProgBack traces from the "Restore ProgBack Trace" submenu.

I find it useful to turn on Trace Info Tags (see the Graph menu), because then when the mouse hovers over a real trace you'll see a little window describing the trace, which you won't see when the real trace is hidden and replaced with the DrawPoly on ProgBack.