12

I am trying to make a surface plot without the axis and grid lines. I found that I can turn off the grid with grid = false but I can't find a way to remove the axis lines.

surface(x2d, y2d, z2d, fill_z = color_mat, fc = :haline, grid=false)

enter image description here

Thanks!

3 Answers 3

14

axis=([], false) should do the trick

Sign up to request clarification or add additional context in comments.

Comments

9

You can almost but not quite get rid of them with ticks = false.

3 Comments

So you can't actually get rid of them?
So, a cheap trick... I ended up setting the foreground color to :white... Any plans to make them go away entirely with ticks = false?
It's actually a bug on plotlyjs that ticks = false makes the axes go away (but not the ticks!). I think your 'cheap trick' is actually the better option, possibly the best at the moment. Agreed it'd be nice to have this functionality. You'd be welcome to open an issue at the repo :-)
1

Try showaxis = false, as described in the axis attributes documentation.

Here's an example that works for me (in the Plotly backend).

surface(-10:10, -10:10, (x, y) -> x^2 - y^2, showaxis = false)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.