Plots.jl: :xcross and :cross marker width

Created on 8 Aug 2016  Â·  13Comments  Â·  Source: JuliaPlots/Plots.jl

I love "x" and "+" as markers in my plots. In Plots.jl they recently changed from what I would describe as
a line representation to pretty bulky objects with a face color and border. (I hope it is somewhat clear what I mean by this).

I was not able to get lean looking + and x when using the parameters markerstrokewidth and markersize, linewidth etc. What I end up doing is plot the same data with :hline and :vline once, to form a +.
(Because I think it looks better that way than the new ones.. ;-) )

Are there other markershapes to produce this or parameters so I can modify the x and + to my liking? :)

(using pyplot and gr backends)

Thanks!
Andre

Most helpful comment

Thanks for including this!

My two cents on :cross and :xcross: they just seem too bulky to me. when I quickly glance at the figure above I have a hard time recognizing the shapes. Could be a diamond, hexagon, star etc. The same size :x and :+ are easy to distinguish.

All 13 comments

I changed this recently because I thought it was an improvement. Maybe we
need both types... What should the names be?

On Monday, August 8, 2016, Andre Bieler [email protected] wrote:

I love "x" and "+" as markers in my plots. In Plots.jl they recently
changed from what I would describe as
a line representation to pretty bulky objects with a face color and
border. (I hope it is somewhat clear what I mean by this).

I was not able to get lean looking + and x when using the parameters
markerstrokewidth and markersize, linewidth etc. What I end up doing is
plot the same data with :hline and :vline once, to form a +.
(Because I think it looks better that way than the new ones.. ;-) )

Are there other markershapes to produce this or parameters so I can modify
the x and + to my liking? :)

(using pyplot and gr backends)

Thanks!
Andre

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tbreloff/Plots.jl/issues/436, or mute the thread
https://github.com/notifications/unsubscribe-auth/AA492quKeOY_hBFmF0i6ecsVy3iY23nqks5qdzt7gaJpZM4JfGAB
.

I find the old ones convenient for over-plotting stuff, E.g. circles in the back and then crosses on top to see differences in the two data sets.

:linecross, :linexcross, :skinnycross, skinnyxcross? :)

Actually, it would be fine for :x and :+ to be the "skinny" versions instead of aliases for :xcross/:cross

delightful!

I do feel like the default markersizes are much too big. I am always very tempted to overwrite them in any recipe I do, but that would seem like such a bad practice

@Evizero then just add your preferred default to your ~/.juliarc.jl file

Sure, but I always think about how it would look from the point of a package user. I am only bringing this up because it is fresh in my mind from the value history recipes. I will go with the defaults of course, just wanted to voice my opinion on this. As a (aspiring) scientist I think in terms of plots that could end up in a paper, and I guess there is a certain bias towards minimalism there that agrees with me

Funny... I always wish scientific papers had markers I could actually see. Am I in the minority? If there's enough public support I'll change the default.

I often find myself reducing the marker size, but it depends on the number of points being plotted. I think I prefer to err on the side of marker sizes being too big. In R, I was always increasing marker size.

using Plots; scatter(rand(10,4),rand(10,4), m=[:+ :x :cross :xcross])

tmp

Thanks for including this!

My two cents on :cross and :xcross: they just seem too bulky to me. when I quickly glance at the figure above I have a hard time recognizing the shapes. Could be a diamond, hexagon, star etc. The same size :x and :+ are easy to distinguish.

I just wanted to note... if you're ever unhappy with what's provided, you have the power to change!

julia> using Plots

julia> function skinnycross(w = 0.1)
           x = [w,w,1]; rx = reverse(x)
           y = [1,w,w]; ry = reverse(y)
           Shape(vcat(x,rx,-x,-rx), vcat(y,-ry,-y,ry))
       end
skinnycross (generic function with 2 methods)

julia> skinnyx(w=0.1) = rotate(skinnycross(w), 0.25Ï€)
skinnyx (generic function with 2 methods)

julia> plot(rand(10,3), m=[skinnycross() skinnycross(0.4) skinnyx(0.2)])
[Plots.jl] Initializing backend: pyplot

tmp

Point well taken! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

crstnbr picture crstnbr  Â·  3Comments

SebastianM-C picture SebastianM-C  Â·  4Comments

Krastanov picture Krastanov  Â·  3Comments

lstagner picture lstagner  Â·  5Comments

mkborregaard picture mkborregaard  Â·  3Comments