The positioning of Text is correct up until I add the last element, which seems to somehow affect a faraway text object.
I have tried playing with the various settings, explode_radius, force_pull, force_text,force_static, with no major success.
Force_text is only one that seems to affects how greatly it is affected but cannot be used to fix/position the text label correctly.
This is how it looks before adding the last element. Take note that Text 'Brother' is correctly positioned
However, as soon as I add the last element, Text 'Brother' is affected greatly, even though it is not close to the added text element.
Is there a way to resolve this. I figured a combination of force_text and explode_radius could help, but it doesn't seem like it does. Also the two elements seem far away from each other which makes me wonder why they are affecting eachother and no the other elements that are even closer.
Currently this is how I call adjust_text. Take note that explode_radius does not have any affect. I did not originally have it specified but no values be it default, 50, 10 or 0 affects the positioning of the Text Objects. The same for time_lim, I tried, 0.5, 1, and 1.5.
for X, Y I used linear interpolation as found in the wikis, in order to aid adjust_text in not overlapping with the lines.
f = interpolate.interp1d(self.xaxis, self.yaxis)x = np.linspace(min(self.xaxis), max(self.xaxis), 500)y = f(x)
UPDATE
For anyone that experienced similar, issue was not a collision between the latest Text object added.
The root cause seems to be the linear interpolation. After checking the points it was generating, adjust text seems to go a bit crazy, but understandable as the new Text object shifted the interpolation. Increasing the number of points smooths out the linear inteprolation and fixes the positioning. Closing the ticket as it was more of my lack of understanding.
The positioning of Text is correct up until I add the last element, which seems to somehow affect a faraway text object. I have tried playing with the various settings, explode_radius, force_pull, force_text,force_static, with no major success. Force_text is only one that seems to affects how greatly it is affected but cannot be used to fix/position the text label correctly.
This is how it looks before adding the last element. Take note that Text 'Brother' is correctly positioned
However, as soon as I add the last element, Text 'Brother' is affected greatly, even though it is not close to the added text element.
Is there a way to resolve this. I figured a combination of force_text and explode_radius could help, but it doesn't seem like it does. Also the two elements seem far away from each other which makes me wonder why they are affecting eachother and no the other elements that are even closer.
Currently this is how I call adjust_text. Take note that explode_radius does not have any affect. I did not originally have it specified but no values be it default, 50, 10 or 0 affects the positioning of the Text Objects. The same for time_lim, I tried, 0.5, 1, and 1.5.
for X, Y I used linear interpolation as found in the wikis, in order to aid adjust_text in not overlapping with the lines.
f = interpolate.interp1d(self.xaxis, self.yaxis)
x = np.linspace(min(self.xaxis), max(self.xaxis), 500)
y = f(x)
adjust_text(labels, x, y,time_lim=0.5, explode_radius=0,force_pull=(1,1),force_text=(1,1),force_static=(1,1))
UPDATE For anyone that experienced similar, issue was not a collision between the latest Text object added. The root cause seems to be the linear interpolation. After checking the points it was generating, adjust text seems to go a bit crazy, but understandable as the new Text object shifted the interpolation. Increasing the number of points smooths out the linear inteprolation and fixes the positioning. Closing the ticket as it was more of my lack of understanding.