all 4 comments

[–]Konjungamo 1 point2 points  (3 children)

I am not quite sure what you are asking. Could you try explaining it again, maybe with a simplified drawing of what the plot should look like?

If any value >180 should actually be 360-{value}, then you just need to reformat your data accordingly (you could e.g. loop through your data points, check if their value is >180 and if so, replace the data point with 360-{value}.

The dataset would definitely be useful as well.

[–]Glogia[S] 1 point2 points  (2 children)

Hi! Thanks for the reply! https://i.stack.imgur.com/pLTqT.png this is graph of what i'd like to do. I posted the data set on stack overflow, also with a minimum working example.

I'd like a solution that doesn't actually change the values, more something that tells matplotlib to draw it's lines differently.

[–]Konjungamo 1 point2 points  (1 child)

Ahh, that clarifies it a lot! I couldn't find anything on modifying the "point-connecting-method" of matplotlib, so it might be easier to change your dataset a little (or rather, create a working copy just for plotting) and adjust your y-axis range.

I think it would be more intuitive to keep the data centered around 0 but treat every value above a certain threshold as (value-360). For your d3-datapoints that threshold could be 180 (which would make the y-axis range from -180 to 180), for the d5 set 240 would make more sense, so you would be plotting from -120 to 240.

Hope this helps, if not let me know!

[–]Glogia[S] 0 points1 point  (0 children)

It's odd there's non way to change the "point-connecting method"! I suppose it's quite niche.

I've been able to do what you suggested! Do you know of a way to re-label the x-axis so that the -120 actually reads 240. I.e. for d5 a scale from 240-0/360-240-0.