Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle a negative log plot? #25

Closed
MikeDacre opened this issue Apr 1, 2017 · 2 comments
Closed

Handle a negative log plot? #25

MikeDacre opened this issue Apr 1, 2017 · 2 comments

Comments

@MikeDacre
Copy link

MikeDacre commented Apr 1, 2017

When trying to plot a negative log plot, and adding labels to the most divergent points, I end up with the following:

image

If I now call adjust_text after setting the inverted loglog axes, I get this:

image

If I set the labels before computing any points, I get this:

image

Code is here: https://github.com/MikeDacre/mike_tools/blob/test_plot/python/plots.py

Line 110 in scatter is where I am calling adust_text in the second figure above. I move lines 105–111 up to line 52 to get the last figure.

This is all on python 3.5.2 installed by anaconda

@Phlya
Copy link
Owner

Phlya commented Apr 1, 2017

Hi Mike, would you mind creating a minimal reproducible example?

In general, I suspect that the second plot is actually what happens, and you have to change the parameters to make it look nicer. Very long labels are prone to give strange results... In the latest commit I added separate forces for x and y movement, you probably want to increase the y forces and decrease the x forces.

@Phlya
Copy link
Owner

Phlya commented Apr 23, 2017

Closing the issue since it's been a while...

@Phlya Phlya closed this as completed Apr 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants