Sign in to follow this  
StefanoFocus

Logarithmic scale and labels on multiseries bar2d graph

Recommended Posts

Hi! I hope I'm posting in the right section.

I'm using a bar graph (msbar2d) and I'm trying to replicate this graph:

https://monosnap.com/file/opkwhd3EWuSghuS7Ki7l2yPtUkVasT

 

My datasets have values between 0 and 100, which represent couples of antonyms (e.g. Good/Bad, Positive/Negative) so 0 is the left value, 100 is the right one, 50 is a balance of the two.  

However, I need to display them on a scale from 100 to 50 and then again back to 100 (see link above).

 

I couldn't find any way to change the labels on the Y axis (which is the X axis in this type of graph, as it's rotated), so what I did is:

  • I subtracted 50 from every value in the dataset, thus centering every dataset in the graph. 
  • I hid the values of the Y axis, and added a bunch of trend lines, that 'replace' the actual labels on the Y axis.

This is what I get:

https://monosnap.com/file/Nv3jDlq5IF5DhGxkmZrpHErr4aicRM

I attached the js I'm using for this. It's kinda hacky but think I've got quite close! However, something is still missing, like:

  • the two y-axes, aligned one on the top right and one on the bottom left;
  • regular grid/division lines using a not linear scale - I had hoped to use something like a logarithmic scale but it looks it's not supported in this kind of graph?

Does anyone know if what I want is achievable?

Is there any better way to customise the labels on the Y axis?

Any hints would be very helpful, if you can!

 

group_average_sample.txt

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this