Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I've always wanted to make my financial Plots look like a Bloomberg terminal. How would I go about making my chart look like one?

I am talking specifically about the chart gradient background, the gradient plot fill, the dashed horizontal and vertical markers, and the markers on the right y axis.

Here is the image I am using as a template:

Bloomberg terminal

Any pointers would be appreciated!

share|improve this question
1  
mathematica.stackexchange.com/questions/2988/… covers the gradients –  Mike Honeychurch May 20 at 9:43
3  
I think you need to motivate this question a lot better to be in with a chance of receiving a serious answer. You could think of it this way: maybe I've always wanted to visit Australia, but if my only effort towards that is to post on the Internet asking for someone to buy me tickets, is it going to happen? –  Oleksandr R. May 20 at 9:47
    
Also relevant: mathematica.stackexchange.com/q/825/8 –  Verbeia May 20 at 11:49
1  
Would something like that be good enough? –  Öskå May 20 at 11:57
    
@Öskå that's pretty damn close. Did you make that yourself? –  Aron May 20 at 16:37

1 Answer 1

up vote 11 down vote accepted

Thanks to this answer for the gradient filling you can do the following:

sign[text_, xc_, size_] := 
  Graphics[{FaceForm[White], EdgeForm[Thin], 
    Polygon[{{0, 0}, {.25, -.40}, {2.5, -.40}, {2.5, .40}, {.25, .40}}], 
    Style[Text[Round[text, .01], {1.25, 0}], size, Black]}, ImageSize -> Scaled[xc]]
gradientBackground = 
  With[{bottomColor = Black, topColor = Hue@.6}, 
    Inset[Show[Rasterize[Graphics[Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, 
      VertexColors -> {bottomColor, bottomColor, topColor, topColor}],
      PlotRangePadding -> 0, ImagePadding -> 0], "Image"], 
      AspectRatio -> Full], {Left, Bottom}, {0, 0}, 
      ImageScaled[{1, 1}]]];

SeedRandom@0;
bankerData = Transpose[{Range[100], Accumulate[RandomReal[{-1, 1}, 100]] + 10}];
last = Last@bankerData;
ypoints = Last /@ bankerData;

grid = Grid[{{"Day session:", SpanFromLeft}, {"Last Price", Last@last}, 
  {"Highest", Max@(Last /@ bankerData)}, {"Average", Mean@(Last /@ bankerData)}, 
  {"Lowest", Min@(Last /@ bankerData)}}];

lp = ListLinePlot[bankerData, Prolog -> gradientBackground, 
  PlotRangePadding -> None, Frame -> True, Axes -> False, 
  FrameTicks -> {
    {All, Thread[{Range[Round[Min@ypoints], Round[Max@ypoints]], 
        Grid[{{"", #}}, Spacings -> .80] & /@ (# <> ".00" & /@ 
           ToString /@ Range[Round[Min@ypoints], Round[Max@ypoints]])}]~
      Join~{{Last@last, sign[Last@last, 45, 11]}}},{All, All}},
  FrameTicksStyle -> {{Opacity@0, White}, {White, Opacity@0}},      
  GridLines -> Automatic, GridLinesStyle -> Dashed, 
  PlotStyle -> White, Method -> {"GridLinesInFront" -> True}, 
  Background -> Black, PlotRegion -> {{.04, .96}, {.04, .96}}, 
  Filling -> Top, FillingStyle -> Directive@{Opacity@.8, GrayLevel@.1}, 
  BaseStyle -> {White, FontFamily -> "Arial"}, PlotRange -> All, 
  Epilog -> Inset[Framed[grid, Background -> Directive[{Black, Opacity@.5}]], 
    Scaled[{.5, .2}]], ImageSize -> 500]

Mathematica graphics

share|improve this answer
    
Fantastic. I didn't expect such level of detail when I asked the question. Thank you! –  Aron May 21 at 12:28
    
@Aron My pleasure :) I guess the little spiky ticks can be done as well, I will spend some time on them later on :) –  Öskå May 21 at 12:34
1  
@Aron I guess I will stick to that, I can't make the spikes look correct, they don't stick to the y-axis.. :) –  Öskå May 21 at 20:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.