# PyPlot in Julia: Thousands Separator

**URL:** <https://discourse.julialang.org/t/pyplot-in-julia-thousands-separator/5029>\
**Category:** General Usage\
**Tags:** pyplot, numbers\
**Created:** [July 23, 2017, 3:45pm UTC](https://discourse.julialang.org/t/pyplot-in-julia-thousands-separator/5029 "2017-07-23T15:45:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidzentlermunro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidzentlermunro/32/5967_2.png) [@davidzentlermunro](https://discourse.julialang.org/u/davidzentlermunro)\
**Post date:** [July 23, 2017, 3:45pm UTC](https://discourse.julialang.org/t/pyplot-in-julia-thousands-separator/5029/1 "2017-07-23T15:45:55Z")

</div>

Anyone know how to translate this suggestion to julia:

[https://preinventedwheel.com/matplotlib-thousands-separator-1-step-guide/](https://preinventedwheel.com/matplotlib-thousands-separator-1-step-guide/)

It’s something like:

```julia
ax[:xaxis][:set_major_formatter](matplotlib[:ticker][:FuncFormatter](lambda x, loc: "{:,}"format(int(x))))

```

But don’t think the anonymous function bit works with julia syntax.

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [July 23, 2017, 4:05pm UTC](https://discourse.julialang.org/t/pyplot-in-julia-thousands-separator/5029/2 "2017-07-23T16:05:56Z")

</div>

Just use an julia anonymous function. We don’t have a builtin function for seperator but [https://github.com/JuliaIO/Formatting.jl](https://github.com/JuliaIO/Formatting.jl) should.

---

<div class="post-metadata">

**Author:** ![davidzentlermunro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidzentlermunro/32/5967_2.png) [@davidzentlermunro](https://discourse.julialang.org/u/davidzentlermunro)\
**Post date:** [July 25, 2017, 10:16pm UTC](https://discourse.julialang.org/t/pyplot-in-julia-thousands-separator/5029/3 "2017-07-25T22:16:29Z")

</div>

thanks, though not clear to me how a julia anon function would work with the lambda key used in pyplot here. Any suggestions welcome…
