6
$\begingroup$

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!

$\endgroup$
5
  • 1
    $\begingroup$ mathematica.stackexchange.com/questions/2988/… covers the gradients $\endgroup$ Commented May 20, 2014 at 9:43
  • 4
    $\begingroup$ 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? $\endgroup$ Commented May 20, 2014 at 9:47
  • $\begingroup$ Also relevant: mathematica.stackexchange.com/q/825/8 $\endgroup$
    – Verbeia
    Commented May 20, 2014 at 11:49
  • 1
    $\begingroup$ Would something like that be good enough? $\endgroup$
    – Öskå
    Commented May 20, 2014 at 11:57
  • $\begingroup$ @Öskå that's pretty damn close. Did you make that yourself? $\endgroup$
    – Aron
    Commented May 20, 2014 at 16:37

1 Answer 1

15
$\begingroup$

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 = [email protected]}, 
    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@{[email protected], [email protected]}, 
  BaseStyle -> {White, FontFamily -> "Arial"}, PlotRange -> All, 
  Epilog -> Inset[Framed[grid, Background -> Directive[{Black, [email protected]}]], 
    Scaled[{.5, .2}]], ImageSize -> 500]

Mathematica graphics

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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