# Representing a higher-dimensional chart

I'm hitting an unusual roadblock in my quest to represent a set of data for the layman, and thought I'd ask for advice on how best to accomplish this task.

My data points are represented by a 4-float tuple (a, b, c, d), the sum of which is constant. These represent test conditions, to which an outcome z is assigned. This outcome is also a float, but that's largely irrelevant.

The fact that there are four effective x-axes really is throwing me off regarding the choice of visualization, and that's where I'd really like some help. If you were in my shoes, what would you render this as?

Just for completeness sake, here is a (small) extract of one of the sets:

0,3000,2500,750,101788
250,3000,2500,500,100458
500,3000,2500,250,99439
750,3000,2500,0,98573
0,3000,2750,500,101993
250,3000,2750,250,100834
500,3000,2750,0,99813
0,3000,3000,250,102370
250,3000,3000,0,101150


I think there is 2 ways to do it.

### Dimensionality reduction

Using technique such as PCA, you can represent your data in lower number of dimensions.

This is a good approach if you want to represent all your data in one graph.

### Dimension removal

Another way to visualize is simply to visualize only a few dimensions at a time. For example you can visualize a/b, c/d, a/c in 3 different 2D graphs.

While much simpler, this approach does not allow you to have a single graph visualization.

• Thank you! I've learned something, I was not aware of PCA and, honestly, it's most likely what I will go for. Thank you for the input! – Sébastien Renauld Dec 12 '19 at 8:05

Welcome to StackExchange!

You can visualize the data in 3D using matplotlib or plotly using three regular dimensions. As for the fourth dimension, you can use a colour-scale (like, from blue to red). As suggested in here, you can see something like

or

Mesh plots are also a great way to show continuous data along more than 3 spatial dimensions, as given here

Plotly can also let you visualise data in 4D by using transparency/opacity if you won't prefer a colour-based visualization of your data points, as shown here

You can also animate a 3D shape if one of our columns is continuous, treating the unbroken and continuous dimension as the time segment of your animation.

Hope this helps!

• Hey. Your answer was generic and covered neither of the points. I have five dimensions, not four, and I know perfectly well how to plot all that you've shown there. The question was not about the method but about the representation, which your answer falls short on. – Sébastien Renauld Dec 12 '19 at 8:04
• In case of your fifth dimension, you can introduce both colour and transparency as 4th and 5th dimensions. So that in addition to regular three dimensions, a darker opaque red colour might represent one column along a certain axis, whereas a light blue transparent region may represent the opposite of that. – Syed Ali Hamza Dec 12 '19 at 8:11