-
Notifications
You must be signed in to change notification settings - Fork 87
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
Results differ depending on save_steps #27
Comments
Thank you for reporting and glad you like the package! Could you please provide an example with this behaviour? I can't reproduce it with a couple examples I tried, the results with and without saving steps are the same. |
Here is a stripped down version of my plotting code which should show the problem described above.
|
Any chance you can make an example without using basemap?.. I don't have it installed, and it doesn't seem to be as easy as I hoped it would be to install it. |
(Also, to remove labels further away from points you can specify higher |
Sorry I should have thought of that basemap could cause an issue, and it is not even really required for this example. Attached is the code with basemap removed (images attached before look the same so I won't upload them again) At one stage I played with the expand_points value but didn't get the results I was looking for. However, I probably didn't give it a good enough go so I will look into that further.
|
I had to fix some things a bit because it wasn't working, but still, I can't reproduce the problem... I have to say, I never tested this with basemap, and it is possible that something from it might be at play here... |
My apologies, I think that I had half-modified the script to remove basemap, but then was running the old script.. stupid mistake. It seems I also cannot reproduce the issue if basemap is not used. So I guess the issue is related to the use of basemap.. |
OK, no problem. I guess adding draw calls shouldn't harm even without basemap, so maybe it's a good idea if it fixes the basemap situation... Since you have already modified the code, could you please check that the speed isn't affected much compared to the repo version? And if the difference is minimal, maybe submit a PR to introduce this? |
I ran some speed tests, adding ax.draw(r) changed the average time to run the adjust_text function from ~ 0.5 seconds to ~1 sec. |
OK, great, thanks! Looks good to me, I'll merge it. |
I noticed that with save_steps=True, the results were perfect and exactly what I wanted.
However, when I set save_steps=False the results were strangely different and not what I wanted.
To solve this issue, I modified the code and where ever there was a save_steps if statement, i included an else ax.draw(r) statement.
e.g.
if save_steps:
some code is done here and figure is saved.
else:
ax.draw(r)
This fixed the issue for me and the results are now excellent and the same with save_steps on or off.
Love this package! thanks for all your hard work
The text was updated successfully, but these errors were encountered: