# Message Boards

Posted 2 months ago
500 Views
|
3 Replies
|
2 Total Likes
|
 I am trying to overlay a line plot on a TradingChart. I have tried a number of things but can't achieve what I want. What I have done is better explained in the attached notebook. Thanks
3 Replies
Sort By:
Posted 2 months ago
 I will reply to my own question. As I was looking at some other posts regarding overlaying graphics I saw the Prolog option and tried the following which worked (see attached notebook).I still don't understand why just changing Epilog to Prolog made it work. With Epilog I could not see my line segments. With Prolog the line segments appeared.
 TradingChart is a composite of two Graphics. Looks like Epilog is added to the second one (volume chart) and Prolog is added to the first one. scaledPath = MapAt[2*10^5 # &, currentPath, {All, 2}]; TradingChart[data[[1 ;; 32]], Epilog -> {Thickness[0.0075], Black, Line[scaledPath], PointSize[Medium], Red, Point[scaledPath]}, Prolog -> {Thickness[0.0075], Black, Line[currentPath], PointSize[Medium], Red, Point[currentPath]}]