Plot a 3D volume in PGFplots using something akin to maximum intensity projection Announcing...
Does GDPR cover the collection of data by websites that crawl the web and resell user data
How to get a flat-head nail out of a piece of wood?
Can 'non' with gerundive mean both lack of obligation and negative obligation?
Are bags of holding fireproof?
Alternative to "rest in peace" (RIP)
Why "Go Out and Learn"
Can I take recommendation from someone I met at a conference?
How do I overlay a PNG over two videos (one video overlays another) in one command using FFmpeg?
Who's this lady in the war room?
Maximum rotation made by a symmetric positive definite matrix?
Are there any irrational/transcendental numbers for which the distribution of decimal digits is not uniform?
Benefits of air-launching a rocket
What's the connection between Mr. Nancy and fried chicken?
Pointing to problems without suggesting solutions
Trying to enter the Fox's den
Combining list in a Cartesian product format with addition operation?
What is the ongoing value of the Kanban board to the developers as opposed to management
Putting Ant-Man on house arrest
How to renew schengen visas
How to get a single big right brace?
Can stored/leased 737s be used to substitute for grounded MAXs?
Flameskull resistant to magical piercing damage?
Lemmatization Vs Stemming
Why isn't everyone flabbergasted about Bran's "gift"?
Plot a 3D volume in PGFplots using something akin to maximum intensity projection
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Maximum points to plot in pgfplotsCustom legend for intensity plotplotting two time series with boundsHow do i get the x axis on top but keep a line on the bottomPolar Plots - layout and extraction of crucial parametersHow to prevent rounded and duplicated tick labels in pgfplots with fixed precision?How to hide empty (value 0) ybars with pgfplots?Show mark labels near marks and not centered in ybar interaval graphpgfplots: percentage in matrix plotCenter the axes in the coordinate origin
I have a function $rho(x, y, z) = e^{-|x|}$, which I'd like to plot. It yields a 3d volume - I've already plotted it in Julia (using Makie.jl), and it looks like this:
I'd like to be able to plot something like this in PGFplots. I've come up with a quite 'hacky' solution, which works, but I would of course prefer something better.
documentclass[tikz]{standalone}
usepackage{pgfplots}
usepgfplotslibrary{colormaps}
pgfplotsset{compat = 1.16}
begin{document}
begin{tikzpicture}
begin{axis}[
colormap/viridis,
colorbar,
xlabel = {$x$},
ylabel = {$y$},
zlabel = {$z$},
title = {$rho = e^{-|x|}$}
]
addplot3 [
scatter,
only marks,
mark = cube*,
opacity = {0.175*pgfplotspointmetatransformed/2000},
% mesh/ordering = x varies,
point meta = {exp(-abs(x))}
] table {data.dat};
end{axis}
end{tikzpicture}
end{document}
where data.dat
is simply columns of x, y, and z in a cube.
x y z
-3.0 -3.0 -3.0
-3.0 -3.0 -2.9
[...]
3.0 3.0 3.0
My current visualization looks like this.
Is there any way I can make the PGFplots visualization better?
pgfplots
New contributor
Anshul Singhvi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I have a function $rho(x, y, z) = e^{-|x|}$, which I'd like to plot. It yields a 3d volume - I've already plotted it in Julia (using Makie.jl), and it looks like this:
I'd like to be able to plot something like this in PGFplots. I've come up with a quite 'hacky' solution, which works, but I would of course prefer something better.
documentclass[tikz]{standalone}
usepackage{pgfplots}
usepgfplotslibrary{colormaps}
pgfplotsset{compat = 1.16}
begin{document}
begin{tikzpicture}
begin{axis}[
colormap/viridis,
colorbar,
xlabel = {$x$},
ylabel = {$y$},
zlabel = {$z$},
title = {$rho = e^{-|x|}$}
]
addplot3 [
scatter,
only marks,
mark = cube*,
opacity = {0.175*pgfplotspointmetatransformed/2000},
% mesh/ordering = x varies,
point meta = {exp(-abs(x))}
] table {data.dat};
end{axis}
end{tikzpicture}
end{document}
where data.dat
is simply columns of x, y, and z in a cube.
x y z
-3.0 -3.0 -3.0
-3.0 -3.0 -2.9
[...]
3.0 3.0 3.0
My current visualization looks like this.
Is there any way I can make the PGFplots visualization better?
pgfplots
New contributor
Anshul Singhvi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I have a function $rho(x, y, z) = e^{-|x|}$, which I'd like to plot. It yields a 3d volume - I've already plotted it in Julia (using Makie.jl), and it looks like this:
I'd like to be able to plot something like this in PGFplots. I've come up with a quite 'hacky' solution, which works, but I would of course prefer something better.
documentclass[tikz]{standalone}
usepackage{pgfplots}
usepgfplotslibrary{colormaps}
pgfplotsset{compat = 1.16}
begin{document}
begin{tikzpicture}
begin{axis}[
colormap/viridis,
colorbar,
xlabel = {$x$},
ylabel = {$y$},
zlabel = {$z$},
title = {$rho = e^{-|x|}$}
]
addplot3 [
scatter,
only marks,
mark = cube*,
opacity = {0.175*pgfplotspointmetatransformed/2000},
% mesh/ordering = x varies,
point meta = {exp(-abs(x))}
] table {data.dat};
end{axis}
end{tikzpicture}
end{document}
where data.dat
is simply columns of x, y, and z in a cube.
x y z
-3.0 -3.0 -3.0
-3.0 -3.0 -2.9
[...]
3.0 3.0 3.0
My current visualization looks like this.
Is there any way I can make the PGFplots visualization better?
pgfplots
New contributor
Anshul Singhvi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I have a function $rho(x, y, z) = e^{-|x|}$, which I'd like to plot. It yields a 3d volume - I've already plotted it in Julia (using Makie.jl), and it looks like this:
I'd like to be able to plot something like this in PGFplots. I've come up with a quite 'hacky' solution, which works, but I would of course prefer something better.
documentclass[tikz]{standalone}
usepackage{pgfplots}
usepgfplotslibrary{colormaps}
pgfplotsset{compat = 1.16}
begin{document}
begin{tikzpicture}
begin{axis}[
colormap/viridis,
colorbar,
xlabel = {$x$},
ylabel = {$y$},
zlabel = {$z$},
title = {$rho = e^{-|x|}$}
]
addplot3 [
scatter,
only marks,
mark = cube*,
opacity = {0.175*pgfplotspointmetatransformed/2000},
% mesh/ordering = x varies,
point meta = {exp(-abs(x))}
] table {data.dat};
end{axis}
end{tikzpicture}
end{document}
where data.dat
is simply columns of x, y, and z in a cube.
x y z
-3.0 -3.0 -3.0
-3.0 -3.0 -2.9
[...]
3.0 3.0 3.0
My current visualization looks like this.
Is there any way I can make the PGFplots visualization better?
pgfplots
pgfplots
New contributor
Anshul Singhvi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Anshul Singhvi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Anshul Singhvi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 20 mins ago
Anshul SinghviAnshul Singhvi
112
112
New contributor
Anshul Singhvi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Anshul Singhvi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Anshul Singhvi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Anshul Singhvi is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f486091%2fplot-a-3d-volume-in-pgfplots-using-something-akin-to-maximum-intensity-projectio%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Anshul Singhvi is a new contributor. Be nice, and check out our Code of Conduct.
Anshul Singhvi is a new contributor. Be nice, and check out our Code of Conduct.
Anshul Singhvi is a new contributor. Be nice, and check out our Code of Conduct.
Anshul Singhvi is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f486091%2fplot-a-3d-volume-in-pgfplots-using-something-akin-to-maximum-intensity-projectio%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown