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

Error bars in :dao theme #70

Closed
emmyb-bu opened this issue Feb 24, 2023 · 1 comment
Closed

Error bars in :dao theme #70

emmyb-bu opened this issue Feb 24, 2023 · 1 comment

Comments

@emmyb-bu
Copy link

Hi,

I'm making some plots and I need to add error bars to my data.

When I use the following code:

using Plots, PlotThemes; theme(:default)

plot(1:10,rand(10),
yerr = 0.1rand(10),
marker=:circle
)

I get a really nice result:
image
I am able to reproduce the above with several other themes including :juno, :dark, etc.
However, when I use the :dao theme, which I prefer because it makes my plots look paper-ready, I don't see any error bars:

using Plots, PlotThemes; theme(:dao)

plot(1:10,rand(10),
yerr = 0.1rand(10),
marker=:circle
)

image

How can I resolve this issue? If the issue is with the source code, are there any quick fixes I can use?

Thanks!

@emmyb-bu
Copy link
Author

Update:

I found that the issue is with :markerstrokewidth => 0in the source code for the dao theme. I found that I am able to get my error bars if I added markerstrokewidth to my plot options:

using Plots, PlotThemes; theme(:dao)

plot(1:10,rand(10),
yerr = 0.1rand(10),
marker=:circle,
markerstrokewidth = 1
)

image

The only downside is that the plot markers now have an extra black circle around them, but I can live with that. I hope this helps someone else dealing with a similar issue!

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

1 participant