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

[GR] Better legend marker size scaling #4025

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AdamWysokinski
Copy link

Default marker size in the legend is too big for the legend font size.
Reducing scaling by half makes it to scale nicely with :legend_font_pointsize

@isentropic
Copy link
Member

Could you post some examples? Before vs after?

@AdamWysokinski
Copy link
Author

Before:
scatter(rand(100), rand(100), markershape=:o, markersize=2)
before_o
scatter(rand(100), rand(100), markershape=:x, markersize=2)
before_x

After:
scatter(rand(100), rand(100), markershape=:o, markersize=2)
after_o
scatter(rand(100), rand(100), markershape=:x, markersize=2)
after_x

@t-bltg t-bltg added the GR label Jan 11, 2022
@isentropic
Copy link
Member

Look like this for me:
image

@AdamWysokinski
Copy link
Author

Is this before or after?

@isentropic
Copy link
Member

Before, I can't reproduce your results

@AdamWysokinski
Copy link
Author

I think that in your example the marker (while smaller than mine) is still unevenly large for the legend label font size and the plot marker size.

Could you please check this repository: https://notabug.org/AdamWysokinski/DuoMAG
Run the script:

$ ./duomag.jl test.ascii

and compare the output test-butterfly_averaged.pdf with mine (where markers are definitely too large for the legend labels):
screenshot

@jamblejoe
Copy link
Contributor

How about having some more control over the markersize scaling? Maybe with a keyword 'legend_marker_pointsize'?

@AdamWysokinski
Copy link
Author

How about having some more control over the markersize scaling? Maybe with a keyword 'legend_marker_pointsize'?

Great idea.

@jamblejoe
Copy link
Contributor

Besides possibly adding a keyword to control the markersize in the legend I am very much in favorite of the smaller default markersize (0.8 -> 0.4).

@t-bltg t-bltg added the first PR first pull request label Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants