using Plots
x = collect(0:0.1:1);
y = collect(0:0.1:1);
z = collect(0:0.1:1);
function make_plane(x,y,z)
a = []
b = []
c = []
for i in x, j in y, k in z
if (i + j + k) == 1
push!(a,i)
push!(b,j)
push!(c,k)
end
end
return a,b,c
end
plane = make_plane(x,y,z)
plot(plane, camera = (60,60)) #I know this is wrong, but adding this 2nd for reference!-
using Plots
gr()
function make_plane(x, y, z)
a = eltype(x)[]
b = eltype(y)[]
c = eltype(z)[]
for i in x, j in y, k in z
if i + j + k ≈ 1
push!(a, i)
push!(b, j)
push!(c, k)
end
end
return a,b,c
end
x = y = z = 0:0.1:1
surface(make_plane(x, y, z), camera = (60, 60), c = :blues)
gr()
f(x, y) = x ≥ 0 && y ≥ 0 && x + y ≤ 1 ? 1 - x - y : NaN
x = y = 0:0.1:1
surface(x, y, f; camera = (60, 60), c = :blues)
pyplot(fmt = :svg)
x = y = z = 0:0.1:1
surface(make_plane(x, y, z), camera = (70, 20), c = :blues)
┌ Warning: `vendor()` is deprecated, use `BLAS.get_config()` and inspect the output instead │ caller = npyinitialize() at numpy.jl:67 └ @ PyCall D:\.julia\packages\PyCall\BD546\src\numpy.jl:67 ┌ Warning: `getindex(o::PyObject, s::AbstractString)` is deprecated in favor of dot overloading (`getproperty`) so elements should now be accessed as e.g. `o."s"` instead of `o["s"]`. │ caller = py_set_spine_color(spines::PyCall.PyObject, color::NTuple{4, FixedPointNumbers.N0f8}) at pyplot.jl:846 └ @ Plots D:\.julia\packages\Plots\snhSk\src\backends\pyplot.jl:846