Skip to content
New issue

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

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

Already on GitHub? # to your account

X axis is drawn in ListPlot is often not at 0 but some other place i #1436

Open
rocky opened this issue Jun 20, 2021 · 9 comments · Fixed by #1437
Open

X axis is drawn in ListPlot is often not at 0 but some other place i #1436

rocky opened this issue Jun 20, 2021 · 9 comments · Fixed by #1437

Comments

@rocky
Copy link
Member

rocky commented Jun 20, 2021

In

ListPlot[Table[n ^ 2, {n, 10}]]

(and others) the dots for the data is misaligned from the 0 or the tick marks of the Y axis.

@TiagoCavalcanteTrindade is this something you'd be interested in?

@TiagoCavalcante
Copy link
Contributor

@rocky #1428 should fix this, it was merged, but I saw here that its change is not applied 🤔.

@rocky
Copy link
Member Author

rocky commented Jun 20, 2021

@TiagoCavalcanteTrindade Thanks for the investigation and information. #1437 adds an additional commit we don't want right now. Commit 2de5524 adds the #1428 back in. But this doesn't fix the problem.

@TiagoCavalcante
Copy link
Contributor

TiagoCavalcante commented Jun 20, 2021

#1437 adds an additional commit we don't want right now.

Sorry, I think it was my mistake in rebasing.

But this doesn't fix the problem.

Strange, I'll look at it.

@rocky
Copy link
Member Author

rocky commented Jun 20, 2021

#1437 adds an additional commit we don't want right now.

Sorry, I think it was my mistake in rebasing.

np.

But this doesn't fix the problem.

Strange, I'll look at it.

Many thanks.

@TiagoCavalcante
Copy link
Contributor

@rocky the same function is being called by x and y tick numbers. The align of y must be to the right, while the align of the x must be to the center.

@TiagoCavalcante
Copy link
Contributor

@rocky that function is added to the class by a add_conversion_fn, and I don't see how it's called latter.

@rocky
Copy link
Member Author

rocky commented Jun 20, 2021

@TiagoCavalcanteTrindade Add print statements in the function.

Personally I do this:

pip install trepan3k

and where you want to stop and inspect:

from trepan.api import debug; debug()

The more conventional approach is:

import pdb; pdb.set_trace()

@rocky rocky reopened this Jun 20, 2021
@TiagoCavalcante
Copy link
Contributor

@rocky I think I'm going to do other thing right now, that function is being called here, and there we don't have a axis variable or something like that.

@rocky
Copy link
Member Author

rocky commented Jun 20, 2021

Ok - work on whatever suits you. The options dictionary is where you would add axis variables, and I am sure WL has defined a set of names to use and default values for these.

@rocky rocky changed the title X axis 0 in ListPlot is wrong X axis is drawn in ListPlot is often not at 0 but some other place i Aug 8, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants