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

Why are there some problems with the displayed images when using the ieee style? #60

Closed
kongxinz opened this issue May 22, 2022 · 11 comments
Labels
bug Something isn't working upstream issue This issue is from a dependency user question/help Issues regarding questions or help requests

Comments

@kongxinz
Copy link

No description provided.

@echedey-ls
Copy link
Collaborator

Please, check how you have shared the image.
Follow this StackOverflow answer so we can see the image:.

@kongxinz
Copy link
Author

I'm sorry, but the problem was caused by the fact that I didn't set the correct resolution when exporting the image. The issue is now resolved, thanks a lot.

@echedey-ls
Copy link
Collaborator

Still can't see it. Can you check without login in GitHub?

@kongxinz
Copy link
Author

fig 1

@echedey-ls
Copy link
Collaborator

Can you also provide the code?

@echedey-ls
Copy link
Collaborator

echedey-ls commented May 23, 2022

I've done some minimal testing and found a workaround for that.
Go to your ieee.myplstyle (should look like this file, mine was, in Windows, in user/.matplotlib/stylelib) and comment line 10 with a #. I believe it will mess up with the standard but at least you now know what to change to have better results.

Edit: in fact it's easier to just import the style and after that do:

plt.rcParams.update({
        'figure.dpi': '100' # Default DPI value
})

@echedey-ls
Copy link
Collaborator

I recommend against closing this issue.
Although I've provided a workaround, it's still an issue and many people will come here looking for advice or to report the same.

I don't really know much about DPI and how it works on each level, but from this stackoverflow post I think the problem is with the huge DPI on this style.

@kongxinz kongxinz reopened this Jun 14, 2022
@garrettj403
Copy link
Owner

Ya, the IEEE style doesn't work very well with plt.show(). However, IEEE recommends 600 DPI for line art (link).

@garrettj403
Copy link
Owner

I added a note to the IEEE style in the project wiki (link).

@echedey-ls
Copy link
Collaborator

echedey-ls commented Jun 15, 2022

I should let you know that when I put the 125 dpi I didn't bother to find the default value for it. It is in fact 100, so for the wiki it would be better to specify it. Sorry for not changing it before.
Also, thanks for the nice work put into this.

Edit: changed my workaround answer to add it.

@kongxinz
Copy link
Author

kongxinz commented Oct 11, 2022 via email

@echedey-ls echedey-ls added bug Something isn't working user question/help Issues regarding questions or help requests upstream issue This issue is from a dependency labels Jan 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream issue This issue is from a dependency user question/help Issues regarding questions or help requests
Projects
None yet
Development

No branches or pull requests

3 participants