# Full border with ticks

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:

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:

I would like to get a graphic with a border like this:
[https://en.wikibooks.org/wiki/Introducing_Julia/Plotting#/media/File:Julia-plots-9-final-plot.png]
thanks

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

1 Like

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

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?

Sorry I don’t understand what the difference is?

1 Like

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.

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

1 Like

Yes!, just that

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

pgfplots seems to do this by default, so

could be a solution. Eg

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)))


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

1 Like

Looks great. Thanks!

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.

1 Like

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

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

its not a aestetic code but works

3 Likes