If you are open to a hardware only solution (possibly cheaper than having a dedicated PC for the task and certainly far more reliable), then what you are looking for is a device called a logo generator/keyer. Basically, the device constantly outputs a video of the logo you want to overlay and keys it on to the video stream being passed through. The devices range in cost from around $800 to several grand, but the low end models should be cheaper than having a dedicated computer with sufficient power to do the processing all the time if this is for more than occasional use.
1. Draw a line between two tikz plots with Overlay
If you really need to use the scale key, use it in the axis, not the ambient tikzpicture.In general, there should not be much need for using scale in pgfplots, you can use the width and height keys
2. How do I recreate this overlay/design in photoshop?
Create a pattern using this module:Over the main image, make a layer and fill it with the patternInvert the pattern layerChange the blend mode to Screen and reduce the opacityMake a Layer Mask using a gradient from black to white from left to rightResult
3. Want to overlay multiple plots on top of each other
Animations can be put on PDF Layers using the ocgx and fixocgx packages. Package animate version 2015/03/11 is required.Every ocg environment, except the last one, must be placed into a zero-width makebox. Also, line endings in between must be protected with '%' to prevent spurious space from being inserted. Then, all animated plots are placed on top of each other
4. Problem with overlay when a tikzpicture is inside another tikzpicture
That would be me, then.This is another example of where unexpected results can occur. The overarching reason is simple: TikZ does not expect its environments to be nested and therefore does not check various assumptions when it starts and stops. In particular, tracing through the code then one sees that TikZ goes to a lot of effort to work with scopes and groupings within a tikzpicture environment. Since some information has to be extracted from within a scope - for example, bounding box information - TikZ has to "smuggle" this information out and it does that is by using globals. It is quite ingenious how it does this in such a way that the information is passed only to where TikZ wants it to be passed and not, for example, out of any further grouping.But with the main tikzpicture environment itself, it does not expect nesting and so does not use these complicated methods. With the bounding box, for example, To avoid complications, all we need to do is ensure that at the start of a tikzpicture environment then all of these globals are set to their defaults. it is set to: -16000. 0ptTechnically, it is set to -16000. 0pt here as wellBy the end of this command, it is set to 0.0pt, which is the maximum x-extent of that tikzpicture since it has the overlay key.Now, it is set to 57.00548pt which is the extent of the above command. It is still at 57. 00548pt here since it is globally assigned.Now it is reset to -16000.0ptHere, it is set to 57.00548ptAt this point, we get reset to -16000.0pt as we've started a new tikzpicture.Due to the overlay key, we get an assignment of 0. 0pt here, which is in effect until the end of the picture.And here it is still 0.0pt.The reason that it works for scopes is that since scopes are meant to be nested, TikZ/PGF goes to great lengths to ensure that things like bounding boxes work correctly as scopes are set up and torn down. This, I think, is the answer to the most fundamental of your questions:To properly nest tikzpictures, one would have to look at the code for scopes and see what keys, lengths, and macros it goes to great lengths to preserve. Then do the same. This is, I guess, what you are effectively doing with your savecurrentboundingbox and
estorecurrentboundingbox. I think that the question at the end of your answer would make a very good question in its own right. Even if, as I think, nesting TikZ pictures is not a good idea, there are, as you point out, inevitably occasions when it is desirable. Knowing how to ensure that when one has to do it, one does it safely would be invaluable information (and, I think, it would show that one should not do this lightly so it would act as a deterrent)