# Full border with ticks

**URL:** <https://discourse.julialang.org/t/full-border-with-ticks/25060>\
**Category:** Visualization\
**Created:** [June 7, 2019, 11:12pm UTC](https://discourse.julialang.org/t/full-border-with-ticks/25060 "2019-06-07T23:12:27Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Milo\_Guerrero](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/milo_guerrero/32/8502_2.png) [@Milo\_Guerrero](https://discourse.julialang.org/u/Milo_Guerrero)\
**Post date:** [June 7, 2019, 11:12pm UTC](https://discourse.julialang.org/t/full-border-with-ticks/25060/1 "2019-06-07T23:12:27Z")

</div>

Hello, Im a using the plots library with gr(), I’ve tried to obtain a graphic with full border and ticks but I don’t know how, my last try is:

```julia
plot(equation, markershape = :hexagon,xticks = ( [0:5:100;], ["\\theta", "2\\theta",]) ,framestyle=:box,ms=3, grid=(:none),w=3,thickness_scaling=1)

```

and the result is:  
 ![16](https://global.discourse-cdn.com/julialang/original/3X/c/6/c648e4bc4668297c733df287222d9c370e92ac25.png)

I would like to get a graphic with a border like this:  
[[Introducing Julia/Plotting - Wikibooks, open books for an open world](https://en.wikibooks.org/wiki/Introducing_Julia/Plotting#/media/File:Julia-plots-9-final-plot.png)]  
thanks

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [June 8, 2019, 7:40am UTC](https://discourse.julialang.org/t/full-border-with-ticks/25060/2 "2019-06-08T07:40:44Z")

</div>

See `plotattr("framestyle")` for the options - I think you’re looking for `framestyle = :box`

---

<div class="post-metadata">

**Author:** ![Milo\_Guerrero](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/milo_guerrero/32/8502_2.png) [@Milo\_Guerrero](https://discourse.julialang.org/u/Milo_Guerrero)\
**Post date:** [June 8, 2019, 2:15pm UTC](https://discourse.julialang.org/t/full-border-with-ticks/25060/3 "2019-06-08T14:15:41Z")

</div>

Thanks, but that does not work, with framestyle =: box I get the graphic that I published, I need a graphic like this:

![50](https://global.discourse-cdn.com/julialang/original/3X/c/f/cf780e6bcb262c8eb1e8f58844ec6138bb2b0c48.png)

I already saw and tested all the options with plotattr(“frame style”) and none do what I need, is it not possible to get a border like the one I’m looking for?

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [June 8, 2019, 2:26pm UTC](https://discourse.julialang.org/t/full-border-with-ticks/25060/4 "2019-06-08T14:26:04Z")

</div>

Sorry I don’t understand what the difference is?

---

<div class="post-metadata">

**Author:** ![Milo\_Guerrero](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/milo_guerrero/32/8502_2.png) [@Milo\_Guerrero](https://discourse.julialang.org/u/Milo_Guerrero)\
**Post date:** [June 8, 2019, 2:36pm UTC](https://discourse.julialang.org/t/full-border-with-ticks/25060/5 "2019-06-08T14:36:21Z")

</div>

Thanks for comment, in the first image the division only appears in the x-axis and y-axis, i need that division in all border like the second image.

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [June 8, 2019, 3:29pm UTC](https://discourse.julialang.org/t/full-border-with-ticks/25060/6 "2019-06-08T15:29:00Z")

</div>

I believe that the goal is to have tick marks on each of the 4 sides of the box.

---

<div class="post-metadata">

**Author:** ![Milo\_Guerrero](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/milo_guerrero/32/8502_2.png) [@Milo\_Guerrero](https://discourse.julialang.org/u/Milo_Guerrero)\
**Post date:** [June 8, 2019, 3:41pm UTC](https://discourse.julialang.org/t/full-border-with-ticks/25060/7 "2019-06-08T15:41:02Z")

</div>

Yes!, just that

---

<div class="post-metadata">

**Author:** ![liuyxpp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liuyxpp/32/9870_2.png) [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Post date:** [March 21, 2020, 1:52pm UTC](https://discourse.julialang.org/t/full-border-with-ticks/25060/8 "2020-03-21T13:52:04Z")

</div>

Any solution? I want to do the same thing because many journal publishers require this style.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [March 21, 2020, 2:08pm UTC](https://discourse.julialang.org/t/full-border-with-ticks/25060/9 "2020-03-21T14:08:23Z")

</div>

pgfplots seems to do this by default, so

> **[GitHub - KristofferC/PGFPlotsX.jl: Plots in Julia using the PGFPlots LaTeX...](https://github.com/KristofferC/PGFPlotsX.jl)**
>
> Plots in Julia using the PGFPlots LaTeX package. Contribute to KristofferC/PGFPlotsX.jl development by creating an account on GitHub.

could be a solution. Eg

```julia
using PGFPlotsX
x = range(0, 4π; length = 200)
y1 = @. sin(x)
y2 = @. sin(x * 1.02)
@pgf Axis(Plot({ no_marks, "blue" }, Table(x, y1)),
          Plot({ no_marks, "red" }, Table(x, y2)))

```

 ![plot](https://global.discourse-cdn.com/julialang/original/3X/8/5/85734af95a837b68d5b701b33bdc15dd7c0515b8.png)

For tick _labels_ on both sides, grid lines, etc, just see the manual.

---

<div class="post-metadata">

**Author:** ![liuyxpp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liuyxpp/32/9870_2.png) [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Post date:** [March 21, 2020, 2:20pm UTC](https://discourse.julialang.org/t/full-border-with-ticks/25060/10 "2020-03-21T14:20:08Z")

</div>

Looks great. Thanks!

---

<div class="post-metadata">

**Author:** ![AstroBarker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/astrobarker/32/15170_2.png) [@AstroBarker](https://discourse.julialang.org/u/AstroBarker)\
**Post date:** [May 25, 2020, 9:43pm UTC](https://discourse.julialang.org/t/full-border-with-ticks/25060/11 "2020-05-25T21:43:40Z")

</div>

It would be really desirable to have this functionality as an attribute in Plots I think? as far as I can tell, the only way to achieve this without using PGFPlotsX (which is stylistically not really what my coauthors and I need) is to use PyPlots.jl and create the figure in python.

---

<div class="post-metadata">

**Author:** ![Milo\_Guerrero](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/milo_guerrero/32/8502_2.png) [@Milo\_Guerrero](https://discourse.julialang.org/u/Milo_Guerrero)\
**Post date:** [May 25, 2020, 10:03pm UTC](https://discourse.julialang.org/t/full-border-with-ticks/25060/12 "2020-05-25T22:03:46Z")

</div>

Hello, I solved the problem with the two last line of code:

```julia
plot(xaxisn(0.01,1.69,0.01),conden3D101, xlabel=L"T/T_0", ylabel=L"N_0/N",minorticks=:false, framestyle=:box, thickness_scaling=1.7,grid=:none, linewidth = 2, guidefontsize=12,ylim=(0,1.1), legend=:topright,legendfontsize=6, label="1001 planos menos 1",linestyle=:dot)
plot!([xaxisn(0.01,1.69,0.01)],conden3D201, label="201 planos menos 1",linestyle=:dashdot)
plot!([xaxisn(0.01,1.69,0.01)],conden3D501, label="501 planos menos 1",linestyle=:dashdotdot)
plot!([xaxisn(0.01,1.69,0.01)],conden3D1001, label="1001 planos menos 1")
plot!(twinx(), xmirror=:true,grid=:false,ylim=(0,1.1),xticks = ([0.5;1;1.5;2.0;], ["","", "", ""]),yticks=([0,0.25,0.50,0.75,1.0],["","","","",""]))
plot!(size=(700,600))

```

And I get plots like this

 ![captura para el foro](https://global.discourse-cdn.com/julialang/original/3X/a/c/acd2582d24e54e3b9ea980778c86d8ab21384264.png)  
its not a aestetic code but works
