Vertical line charts
By:
Last updated:
2:22pm Apr 24, 2018

In some scenarios, it might be interesting to visualize data in a line chart but with the lines vertically oriented, rather than the commonly seen horizontal lines. For example, this can be the case when visualizing geologic data where the axes of the line chart might represent the value of a variable at a certain depth under ground. The vertical axis of the line chart would then represent the depth under ground, starting at 0 at the top of the line chart and with the maximum depth at the bottom. Here is one such line chart taken from wikipedia

In Spotfire, one can create this line chart using a scatter plot with line connections, and the end result might look like this:

Let's see in a few steps how to produce the above plot. If you want to, you can follow along using the data attached.

Start by creating a scatter plot as the one below; make sure you have [Depth] on the Y-axis and [Temperature] on the X-axis.

Now, from the right-click menu directly on the Y-axis, or the Y-axis section of the scatter plot Properties dialog, select "Reverse Scale", so that the Depth starts from 0 at the top and increases towards the bottom.

Now we will need to go to the Line connection section of the scatter plot properties:

In the "Draw a separate line per value in:" field, we enter the expression <1>, which will tell Spotfire to create just one line.

Now, we are almost done:

We can now tweak the look of the scatter plot by:

  1. Adjusting the line thickness to our liking in the Line connection section of the scatter plot properties.
  2. Decreasing the size of the markers in the Size Section of the scatter plot properties.
  3. Adding Horizontal Lines to indicate the Litosphere, Upper Mantle, etc., in the Lines and Curves section of the scatter plot properties, if we want to call these out.
  4. The end result may look something like this:

I have attached the Spotfire DXP file with the finished example here.

Hope this is useful and don't hesitate to comment or ask questions about this article in the feedback section.

 

Attachments