# 3D pictures in Plots.jl

**URL:** <https://discourse.julialang.org/t/3d-pictures-in-plots-jl/16760>\
**Category:** New to Julia\
**Created:** [October 24, 2018, 9:21pm UTC](https://discourse.julialang.org/t/3d-pictures-in-plots-jl/16760 "2018-10-24T21:21:16Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![kirtsar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kirtsar/32/7222_2.png) [@kirtsar](https://discourse.julialang.org/u/kirtsar)\
**Post date:** [October 24, 2018, 9:21pm UTC](https://discourse.julialang.org/t/3d-pictures-in-plots-jl/16760/1 "2018-10-24T21:21:16Z")

</div>

Hi everybody! I’m interested in drawing some algebraic varieties from the book i’m reading right now (Cox, Little, O’Shea).  
Is it possible to draw

1. Plots in implicit form (like elliptic curves Y^2 = X^3 + aX + b) in 2d and 3d (for instance, X^2-Y^2\*Z^2+Z^3==0)
2. Plots in parametric form, like twisted cubic (x = t, y = t^2, z = t^3) and parametric surfaces (x = x(u,v), y = y(u,v), z = z(u,v))

Currently I found only surface plots in the form:  
surface(xGrid, yGrid, (x, y) → x^2 + y^2)

but for some reasons it works really laggy, especially when i try to move picture.  
I thought it would be easier for my laptop to draw only wire of the surface, but  
wireframe(xGrid, yGrid, (x, y) → x^2 + y^2)  
doesn’t work

---

<div class="post-metadata">

**Author:** ![Mattriks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mattriks/32/351_2.png) [@Mattriks](https://discourse.julialang.org/u/Mattriks)\
**Post date:** [October 24, 2018, 9:31pm UTC](https://discourse.julialang.org/t/3d-pictures-in-plots-jl/16760/2 "2018-10-24T21:31:28Z")

</div>

Gadfly can do contours and vectorfields of functions, [examples here](http://gadflyjl.org/stable/gallery/geometries.html#%5BGeom.vectorfield%5D(@ref)-1).

---

<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:** [October 24, 2018, 10:29pm UTC](https://discourse.julialang.org/t/3d-pictures-in-plots-jl/16760/3 "2018-10-24T22:29:55Z")

</div>

Makie.jl is very good for things like this.

---

<div class="post-metadata">

**Author:** ![kirtsar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kirtsar/32/7222_2.png) [@kirtsar](https://discourse.julialang.org/u/kirtsar)\
**Post date:** [October 25, 2018, 1:57pm UTC](https://discourse.julialang.org/t/3d-pictures-in-plots-jl/16760/4 "2018-10-25T13:57:55Z")

</div>

Thanks for pointing out, but unfortunately i have unexpected problems with installation of Makie, namely with building GLFW (the message is really huge and confusing and i’m stuck with it:  
Error: Error building `GLFW`:  
make: \*\*\* No rule to make target ‘install’. Stop.  
)

---

<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:** [October 25, 2018, 2:09pm UTC](https://discourse.julialang.org/t/3d-pictures-in-plots-jl/16760/5 "2018-10-25T14:09:29Z")

</div>

Are you using Julia 1.0?

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [October 25, 2018, 2:29pm UTC](https://discourse.julialang.org/t/3d-pictures-in-plots-jl/16760/6 "2018-10-25T14:29:12Z")

</div>

Are you on linux and forgot to install:

```nohighlight
sudo apt-get install ffmpeg cmake xorg-dev
julia>] build GLFW

```

---

<div class="post-metadata">

**Author:** ![kirtsar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kirtsar/32/7222_2.png) [@kirtsar](https://discourse.julialang.org/u/kirtsar)\
**Post date:** [October 25, 2018, 2:42pm UTC](https://discourse.julialang.org/t/3d-pictures-in-plots-jl/16760/7 "2018-10-25T14:42:29Z")

</div>

sudo apt-get install xorg-dev cmake ffmpeg  
\<…\>  
cmake is already the newest version (3.5.1-1ubuntu3).  
xorg-dev is already the newest version (1:7.7+13ubuntu3.1).  
ffmpeg is already the newest version (7:2.8.15-0ubuntu0.16.04.1).  
0 upgraded, 0 newly installed, 0 to remove and 279 not upgraded.

] build GLFW  
\<…\>  
ERROR: LoadError: failed process: Process(setenv(`/home/kir/.julia/packages/CMake/xNoo8/deps/usr/bin/cmake --build . --target install`\<…\>), ProcessExited(2))

---

<div class="post-metadata">

**Author:** ![kirtsar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kirtsar/32/7222_2.png) [@kirtsar](https://discourse.julialang.org/u/kirtsar)\
**Post date:** [October 25, 2018, 2:42pm UTC](https://discourse.julialang.org/t/3d-pictures-in-plots-jl/16760/8 "2018-10-25T14:42:53Z")

</div>

Yes.

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [October 25, 2018, 2:43pm UTC](https://discourse.julialang.org/t/3d-pictures-in-plots-jl/16760/9 "2018-10-25T14:43:54Z")

</div>

can you post the full error?

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [October 25, 2018, 2:44pm UTC](https://discourse.julialang.org/t/3d-pictures-in-plots-jl/16760/10 "2018-10-25T14:44:26Z")

</div>

and your os + environment, graphics card 😉

---

<div class="post-metadata">

**Author:** ![kirtsar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kirtsar/32/7222_2.png) [@kirtsar](https://discourse.julialang.org/u/kirtsar)\
**Post date:** [October 25, 2018, 2:55pm UTC](https://discourse.julialang.org/t/3d-pictures-in-plots-jl/16760/11 "2018-10-25T14:55:10Z")

</div>

kir@kir-ThinkPad-E480  
inxi  
CPU Dual core Intel Core i3-8130U (-HT-MCP-) speed/max 1216/3400 MHz Kernel 4.10.0-38-generic x86\_64 Up 12 days Mem 2103.0/3846.9MB HDD 1000.2GB(3.4% used) Procs 221 Client Shell inxi 2.2.35  
kir@kir-ThinkPad-E480 ~ $ inxi -G  
Graphics: Card: Intel Device 5917  
Display Server: [X.Org](http://X.Org) 1.18.4 drivers: intel (unloaded: fbdev,vesa)  
Resolution: 1366x768@60.00hz  
GLX Renderer: Mesa DRI Intel Kabylake GT1.5  
GLX Version: 3.0 Mesa 17.0.7

FULL TEXT:

(v1.0) pkg\> build GLFW  
Building Homebrew → `~/.julia/packages/Homebrew/l8kUw/deps/build.log`  
Building CMake ───→ `~/.julia/packages/CMake/xNoo8/deps/build.log`  
Building GLFW ────→ `~/.julia/packages/GLFW/pkSlg/deps/build.log`  
┌ Error: Error building `GLFW`:  
│ make: \*\*\* No rule to make target ‘install’. Stop.  
│ [ Info: Attempting to create directory /home/kir/.julia/packages/GLFW/pkSlg/deps/downloads  
│ [ Info: Directory /home/kir/.julia/packages/GLFW/pkSlg/deps/downloads already exists  
│ [Info: Downloading file [https://github.com/glfw/glfw/archive/3.2.1.tar.gz](https://github.com/glfw/glfw/archive/3.2.1.tar.gz)  
│ [Info: Done downloading file [https://github.com/glfw/glfw/archive/3.2.1.tar.gz](https://github.com/glfw/glfw/archive/3.2.1.tar.gz)  
│ [ Info: Attempting to create directory /home/kir/.julia/packages/GLFW/pkSlg/deps/src  
│ [ Info: Directory /home/kir/.julia/packages/GLFW/pkSlg/deps/src already exists  
│ [ Info: Attempting to create directory /home/kir/.julia/packages/GLFW/pkSlg/deps  
│ [ Info: Directory /home/kir/.julia/packages/GLFW/pkSlg/deps already exists  
│ [ Info: Path /home/kir/.julia/packages/GLFW/pkSlg/deps/src/glfw-3.2.1 already exists  
│ [ Info: Attempting to create directory /home/kir/.julia/packages/GLFW/pkSlg/deps/builds/glfw  
│ [ Info: Directory /home/kir/.julia/packages/GLFW/pkSlg/deps/builds/glfw already exists  
│ [ Info: Changing directory to /home/kir/.julia/packages/GLFW/pkSlg/deps/builds/glfw  
│ [ Info: Changing directory to /home/kir/.julia/packages/GLFW/pkSlg/deps/builds/glfw  
│ ERROR: LoadError: failed process: Process(setenv(`/home/kir/.julia/packages/CMake/xNoo8/deps/usr/bin/cmake --build . --target install`,[“PATH=/home/kir/.julia/packages/GLFW/pkSlg/deps/usr/bin:/home/kir/anaconda3/bin:/home/kir/bin:/home/kir/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games”, “SESSION=xfce”, “DEFAULTS\_PATH=/usr/share/gconf/xfce.default.path”, “QT\_ACCESSIBILITY=1”, “UPSTART\_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/2276”, “GLADE\_PIXMAP\_PATH=:”, “UPSTART\_JOB=startxfce4”, “DBUS\_SESSION\_BUS\_ADDRESS=unix:abstract=/tmp/dbus-VgXsv9yQWI”, “XDG\_SEAT\_PATH=/org/freedesktop/DisplayManager/Seat0”, “XDG\_SESSION\_DESKTOP=xfce”, “GTK\_OVERLAY\_SCROLLING=0”, “SSH\_AGENT\_PID=2604”, “XDG\_SESSION\_TYPE=x11”, “USER=kir”, “XDG\_CONFIG\_DIRS=/etc/xdg/xdg-xfce:/usr/share/upstart/xdg:/etc/xdg:/etc/xdg”, “LC\_NUMERIC=ru\_RU.UTF-8”, “QT\_IM\_MODULE=”, “LESSCLOSE=/usr/bin/lesspipe %s %s”, “QT\_STYLE\_OVERRIDE=gtk”, “LC\_MEASUREMENT=ru\_RU.UTF-8”, “SESSIONTYPE=”, “INSTANCE=”, “CLUTTER\_BACKEND=x11”, “GDMSESSION=xfce”, “LC\_TELEPHONE=ru\_RU.UTF-8”, “CLUTTER\_IM\_MODULE=”, “XDG\_DATA\_DIRS=/usr/share/xfce:/usr/share/xfce4:/home/kir/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/usr/share”, “LESSOPEN=| /usr/bin/lesspipe %s”, “SHELL=/bin/bash”, “XDG\_SEAT=seat0”, “XAUTHORITY=/home/kir/.Xauthority”, “XDG\_MENU\_PREFIX=xfce-”, “GTK\_MODULES=gail:atk-bridge”, “GNOME\_KEYRING\_PID=”, “GTK\_IM\_MODULE=”, “SESSION\_MANAGER=local/kir-ThinkPad-E480:@/tmp/.ICE-unix/2538,unix/kir-ThinkPad-E480:/tmp/.ICE-unix/2538”, “XMODIFIERS=”, “GLADE\_CATALOG\_PATH=:”, “TERM=xterm-256color”, “HOME=/home/kir”, “COLORTERM=xfce4-terminal”, “VTE\_VERSION=4205”, “IM\_CONFIG\_PHASE=1”, “UPSTART\_INSTANCE=”, “XDG\_CURRENT\_DESKTOP=XFCE”, “LANG=en\_US.UTF-8”, “SHLVL=1”, “LOGNAME=kir”, “LC\_MONETARY=ru\_RU.UTF-8”, “XDG\_RUNTIME\_DIR=/run/user/1000”, “SSH\_AUTH\_SOCK=/tmp/ssh-ZNlHAcCJSULL/agent.2603”, “DESKTOP\_SESSION=xfce”, “GDM\_LANG=en\_US”, “LC\_PAPER=ru\_RU.UTF-8”, “LC\_ADDRESS=ru\_RU.UTF-8”, “\_=/usr/local/bin/julia”, “GLADE\_MODULE\_PATH=:”, “PWD=/home/kir”, “DISPLAY=:0.0”, “UPSTART\_EVENTS=started xsession”, “LANGUAGE=en\_US”, “XDG\_GREETER\_DATA\_DIR=/var/lib/lightdm-data/kir”, “XDG\_SESSION\_PATH=/org/freedesktop/DisplayManager/Session0”, “XDG\_VTNR=7”, “WINDOWID=71303171”, “MANDATORY\_PATH=/usr/share/gconf/xfce.mandatory.path”, “XDG\_SESSION\_ID=c2”, “LC\_NAME=ru\_RU.UTF-8”, “LC\_IDENTIFICATION=ru\_RU.UTF-8”, “JULIA\_LOAD\_PATH=@:/tmp/tmpeyCbNZ”, “QT\_LINUX\_ACCESSIBILITY\_ALWAYS\_ON=1”, “QT4\_IM\_MODULE=”, “LS\_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:_.tar=01;31:_.tgz=01;31:_.arc=01;31:_.arj=01;31:_.taz=01;31:_.lha=01;31:_.lz4=01;31:_.lzh=01;31:_.lzma=01;31:_.tlz=01;31:_.txz=01;31:_.tzo=01;31:_.t7z=01;31:_.zip=01;31:_.z=01;31:_.Z=01;31:_.dz=01;31:_.gz=01;31:_.lrz=01;31:_.lz=01;31:_.lzo=01;31:_.xz=01;31:_.bz2=01;31:_.bz=01;31:_.tbz=01;31:_.tbz2=01;31:_.tz=01;31:_.deb=01;31:_.rpm=01;31:_.jar=01;31:_.war=01;31:_.ear=01;31:_.sar=01;31:_.rar=01;31:_.alz=01;31:_.ace=01;31:_.zoo=01;31:_.cpio=01;31:_.7z=01;31:_.rz=01;31:_.cab=01;31:_.jpg=01;35:_.jpeg=01;35:_.gif=01;35:_.bmp=01;35:_.pbm=01;35:_.pgm=01;35:_.ppm=01;35:_.tga=01;35:_.xbm=01;35:_.xpm=01;35:_.tif=01;35:_.tiff=01;35:_.png=01;35:_.svg=01;35:_.svgz=01;35:_.mng=01;35:_.pcx=01;35:_.mov=01;35:_.mpg=01;35:_.mpeg=01;35:_.m2v=01;35:_.mkv=01;35:_.webm=01;35:_.ogm=01;35:_.mp4=01;35:_.m4v=01;35:_.mp4v=01;35:_.vob=01;35:_.qt=01;35:_.nuv=01;35:_.wmv=01;35:_.asf=01;35:_.rm=01;35:_.rmvb=01;35:_.flc=01;35:_.avi=01;35:_.fli=01;35:_.flv=01;35:_.gl=01;35:_.dl=01;35:_.xcf=01;35:_.xwd=01;35:_.yuv=01;35:_.cgm=01;35:_.emf=01;35:_.ogv=01;35:_.ogx=01;35:_.aac=00;36:_.au=00;36:_.flac=00;36:_.m4a=00;36:_.mid=00;36:_.midi=00;36:_.mka=00;36:_.mp3=00;36:_.mpc=00;36:_.ogg=00;36:_.ra=00;36:_.wav=00;36:_.oga=00;36:_.opus=00;36:_.spx=00;36:_.xspf=00;36:”, “JOB=dbus”, “GNOME\_KEYRING\_CONTROL=”, “OPENBLAS\_MAIN\_FREE=1”]), ProcessExited(2)) [2]  
│ Stacktrace:  
│ [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42  
│ [2] pipeline\_error at ./process.jl:695 [inlined]  
│ [3] #run#505(::Bool, ::Function, ::Cmd) at ./process.jl:653  
│ [4] run(::Cmd) at ./process.jl:651  
│ [5] macro expansion at ./logging.jl:308 [inlined]  
│ [6] run(::BinDeps.SynchronousStepCollection) at /home/kir/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:518  
│ [7] run(::FileRule) at /home/kir/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:483  
│ [8] macro expansion at ./logging.jl:308 [inlined]  
│ [9] run(::BinDeps.SynchronousStepCollection) at /home/kir/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:518  
│ [10] macro expansion at ./logging.jl:308 [inlined]  
│ [11] run(::BinDeps.SynchronousStepCollection) at /home/kir/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:518  
│ [12] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at /home/kir/.julia/packages/BinDeps/ZEval/src/dependencies.jl:944  
│ [13] satisfy!(::BinDeps.LibraryDependency) at /home/kir/.julia/packages/BinDeps/ZEval/src/dependencies.jl:922  
│ [14] top-level scope at /home/kir/.julia/packages/BinDeps/ZEval/src/dependencies.jl:977  
│ [15] include at ./boot.jl:317 [inlined]  
│ [16] include\_relative(::Module, ::String) at ./loading.jl:1038  
│ [17] include(::Module, ::String) at ./sysimg.jl:29  
│ [18] include(::String) at ./client.jl:388  
│ [19] top-level scope at none:0  
│ in expression starting at /home/kir/.julia/packages/GLFW/pkSlg/deps/build.jl:46  
└ @ Pkg.Operations /buildworker/worker/package\_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1068

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [October 25, 2018, 3:04pm UTC](https://discourse.julialang.org/t/3d-pictures-in-plots-jl/16760/12 "2018-10-25T15:04:13Z")

</div>

OK not sure what this is… could be multiple GLFW versions?  
You could try:

```nohighlight
sudo apt-get install libglfw3
]build GLFW

```

Also, make sure that you’ve installed the official intel gpu drivers and that you’re not using linux mesa default drivers … I’m not a 100% sure from your data if that’s already the case 😉

---

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [October 25, 2018, 4:52pm UTC](https://discourse.julialang.org/t/3d-pictures-in-plots-jl/16760/13 "2018-10-25T16:52:20Z")

</div>

I’ve been browsing the galleries of Makie, and it seems nice.

- Any plans to give it a Plots-compatible interface? Or should one just make a switch?
- Any support for LaTeX syntax math, etc.?

---

<div class="post-metadata">

**Author:** ![iwelch](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Post date:** [October 31, 2018, 12:32am UTC](https://discourse.julialang.org/t/3d-pictures-in-plots-jl/16760/14 "2018-10-31T00:32:11Z")

</div>

I put a set of working Plots.jl examples into [http://julia.cookbook.tips/](http://julia.cookbook.tips/) .
