Skip to content

Adding a dynamically resize of mathtext symbol table#26183

Closed
NikosNikolaidis02 wants to merge 9 commits intomatplotlib:mainfrom
NikosNikolaidis02:documentation
Closed

Adding a dynamically resize of mathtext symbol table#26183
NikosNikolaidis02 wants to merge 9 commits intomatplotlib:mainfrom
NikosNikolaidis02:documentation

Conversation

@NikosNikolaidis02
Copy link
Copy Markdown

PR summary

I tried to find a more dynamic way to calculate the number of columns in order to have rows as more completed as possible. I've added the function columns_calculation which illustrates the function I described.

PR checklist

@NikosNikolaidis02 NikosNikolaidis02 changed the base branch from main to v3.7.1-doc June 25, 2023 06:40
@NikosNikolaidis02 NikosNikolaidis02 changed the base branch from v3.7.1-doc to main June 25, 2023 08:30
@oscargus
Copy link
Copy Markdown
Member

Thank you! However, I do not think that having complete columns is really the main optimization objective that we want.

Basically, the main problem is the length of some of the LaTeX commands. So if anything, I'd try to come up with some good heuristic to determine a suitable number of columns based on that.

(However, it should be noted that it is almost impossible to come up with a perfect one as the columns will not have the same width anyway, so if all other columns only contains "short" commands there can be more columns compared to if all contains "long" commands.)

Also, it seems like you have some unrelated changes in image.py committed?

@NikosNikolaidis02
Copy link
Copy Markdown
Author

Thank you! However, I do not think that having complete columns is really the main optimization objective that we want.

Basically, the main problem is the length of some of the LaTeX commands. So if anything, I'd try to come up with some good heuristic to determine a suitable number of columns based on that.

(However, it should be noted that it is almost impossible to come up with a perfect one as the columns will not have the same width anyway, so if all other columns only contains "short" commands there can be more columns compared to if all contains "long" commands.)

Also, it seems like you have some unrelated changes in image.py committed?

Yes, i don't want this change to happen it's from another change

@NikosNikolaidis02
Copy link
Copy Markdown
Author

We can also optimize this by find the perfect combination for the lenght of the string

@NikosNikolaidis02
Copy link
Copy Markdown
Author

@oscargus Can you check it?

@oscargus
Copy link
Copy Markdown
Member

As I said, I do not believe in this approach, but I'd let e.g. @story645 chip in if it is an OK solution for the issue.

Also, it seems like there has been something happening to your branch which must be fixed. Not really clear what and how though...

Probably a case of either starting a new branch and copy-and-paste the relevant parts or use git rebase in a cautious way.

@NikosNikolaidis02
Copy link
Copy Markdown
Author

#26191 I've created a new branch to resolve the previous problems on this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

[Doc]: dynamically resize the mathtext symbol tables

3 participants