I have some data with some relations which I would want to visualize.


The data I have has the following fields:

  • Current value: CV
  • Value in 50 seconds: V50
  • Predicted Future (50s) Feature: P50

(Notice that the first two are the same feature just at a different time, the third one is a different feature: something that we predicted will happen in the future) (all these values can be positive or negative)

I used a scatter plot to visualize the relationship between P50 and CV. Later I realized that since P50 was predicting a future feature value, it would be best to visualize P50 vs V50. (V50 is CV but 50 seconds later)

So now I got two plots:

  • P50 vs CV
  • P50 vs V50

However I have come to notice that perhaps there is a better relationship between P50 and the change of the value from now to 50s later (CV and V50).

How can I plot these in order to visualize this?

One attempt

I have tried plotting P50 vs the difference (V50-CV) which seems ok but the problem is that this generates a value that puts together two different situations:

  • The CV is 0 and the V50 is 50 therefore (V50-CV) is 50
  • The CV is -50 and the V50 is 0 therefore (V50-CV) is again 50

My problem is that since these values can also be negatives, two different situations get the same value. These situations are different because 50 or -50 actually represent something similar but on different directions, so the two situations above are not similar. in the first case it is "accelerating" and in the second case "slowing down"

Any idea on how I can represent this better? Absolute values? (but then I would lose the direction information) , three axis? any other?

  • $\begingroup$ @J-J-J It seems like a nice idea! I will try it. $\endgroup$ Nov 22, 2023 at 0:33
  • $\begingroup$ OK, I'll turn that into an answer then. $\endgroup$
    – J-J-J
    Nov 22, 2023 at 6:26

1 Answer 1


Two possible solutions (there may be others, depending on what you need exactly):

  1. You can use a diverging color scale to represent a third dimension that can take positive and negative values. So for instance, a possible solution would be CV on the horizontal axis, V50 on the vertical axis, and a diverging color scale representing the difference between predicted values and V50. Or course, you can change what variables are represented on the various axes, depending on what you want to see or show.

Here an example, with the color red showing an overestimation of the predictions, blue an underestimation, and white a perfect match between P50 and V50 values: A scatterplot showing CV on the horizontal axis, V50 on the vertical axis, and a divergent color scale representing the difference between predicted values and V50

  1. The example above comes a linear regression model trying to predict more or less accurately the value of V50, but that is not very good at predicting some values, in particular those at the extreme of the variable CV. If you do have access to the formula that generates the predicted values (be it a linear regression model or something else), a better visualization might be to simply draw the regression line, on top of the actual values. It may give you a clearer picture of the prediction model, and still shows you where the model tends to overestimate/understimate the actual V50 values:

Scatterplot of black dots showing the relationshp between CV and V50, with a red regression line going through


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.