How resolve gnuplot artifacts in heat map
I'm trying to generate a heat map from data (https://pastebin.com/AgivvGgX). The data are not in the "matrix" form.
I tried to use pm3d map
and I obtained the following plot:
I also tried to use dgrid3d
and view map
:
set view map
set pal def
set dgrid3d 40,40,3
splot "plot.dat" using 1:2:3 u pm3d
And I obtained the following result:
Both the plots are not correct. The dgird3d
keyword creates artifacts where there are not data points.
I obtained a nice plot using the code:
set view map
set pal def
splot "plot.dat" using 1:2:3 with points pointtype 5 pointsize 1 palette linewidth 8
Here the result
I would like to obtain a map similar to the latter one, but not with discrete points or squares but as a continuous heat map and have a white background where data are not present. Is it possible?
gnuplot heatmap
add a comment |
I'm trying to generate a heat map from data (https://pastebin.com/AgivvGgX). The data are not in the "matrix" form.
I tried to use pm3d map
and I obtained the following plot:
I also tried to use dgrid3d
and view map
:
set view map
set pal def
set dgrid3d 40,40,3
splot "plot.dat" using 1:2:3 u pm3d
And I obtained the following result:
Both the plots are not correct. The dgird3d
keyword creates artifacts where there are not data points.
I obtained a nice plot using the code:
set view map
set pal def
splot "plot.dat" using 1:2:3 with points pointtype 5 pointsize 1 palette linewidth 8
Here the result
I would like to obtain a map similar to the latter one, but not with discrete points or squares but as a continuous heat map and have a white background where data are not present. Is it possible?
gnuplot heatmap
add a comment |
I'm trying to generate a heat map from data (https://pastebin.com/AgivvGgX). The data are not in the "matrix" form.
I tried to use pm3d map
and I obtained the following plot:
I also tried to use dgrid3d
and view map
:
set view map
set pal def
set dgrid3d 40,40,3
splot "plot.dat" using 1:2:3 u pm3d
And I obtained the following result:
Both the plots are not correct. The dgird3d
keyword creates artifacts where there are not data points.
I obtained a nice plot using the code:
set view map
set pal def
splot "plot.dat" using 1:2:3 with points pointtype 5 pointsize 1 palette linewidth 8
Here the result
I would like to obtain a map similar to the latter one, but not with discrete points or squares but as a continuous heat map and have a white background where data are not present. Is it possible?
gnuplot heatmap
I'm trying to generate a heat map from data (https://pastebin.com/AgivvGgX). The data are not in the "matrix" form.
I tried to use pm3d map
and I obtained the following plot:
I also tried to use dgrid3d
and view map
:
set view map
set pal def
set dgrid3d 40,40,3
splot "plot.dat" using 1:2:3 u pm3d
And I obtained the following result:
Both the plots are not correct. The dgird3d
keyword creates artifacts where there are not data points.
I obtained a nice plot using the code:
set view map
set pal def
splot "plot.dat" using 1:2:3 with points pointtype 5 pointsize 1 palette linewidth 8
Here the result
I would like to obtain a map similar to the latter one, but not with discrete points or squares but as a continuous heat map and have a white background where data are not present. Is it possible?
gnuplot heatmap
gnuplot heatmap
edited Jan 2 at 21:23
Michael O.
2,9142524
2,9142524
asked Jan 2 at 14:02
SimonSimon
112
112
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Since your data is irregular, you should use dgrid3d
. It has various options (see help dgrid3d
), here is a picture I've got while trying different kernels and options:
set view map
set palette defined (0 'white', 1 'blue', 2 'green', 3 'yellow', 4 'red')
set dgrid3d 100,100 exp kdensity 10,10
splot 'plot.dat' w pm3d palette
set dgrid3d 100,100 gauss kdensity 30,30
replot
Interesting. The original data ranges from0 to 65
but thecbrange
of the plots are now0 to 120
and<50 to 400
. How to "rescale" properly depending on thekdensity
values? And how to distinguish between existing values=0
and missing values? The latter now look like as they would be0
.
– theozh
Jan 3 at 7:48
Thank you. I obtained different color code between values equal to zero and missing value using the option:set dgrid3d 100,100 hann
orset dgrid3d 100,100 box
– Simon
Jan 3 at 21:30
@Simon Glad to know. Have you found the solution of scaling problem, as theozh mentioned?
– Michael O.
Jan 3 at 23:39
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
});
}
});
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%2fstackoverflow.com%2fquestions%2f54007706%2fhow-resolve-gnuplot-artifacts-in-heat-map%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Since your data is irregular, you should use dgrid3d
. It has various options (see help dgrid3d
), here is a picture I've got while trying different kernels and options:
set view map
set palette defined (0 'white', 1 'blue', 2 'green', 3 'yellow', 4 'red')
set dgrid3d 100,100 exp kdensity 10,10
splot 'plot.dat' w pm3d palette
set dgrid3d 100,100 gauss kdensity 30,30
replot
Interesting. The original data ranges from0 to 65
but thecbrange
of the plots are now0 to 120
and<50 to 400
. How to "rescale" properly depending on thekdensity
values? And how to distinguish between existing values=0
and missing values? The latter now look like as they would be0
.
– theozh
Jan 3 at 7:48
Thank you. I obtained different color code between values equal to zero and missing value using the option:set dgrid3d 100,100 hann
orset dgrid3d 100,100 box
– Simon
Jan 3 at 21:30
@Simon Glad to know. Have you found the solution of scaling problem, as theozh mentioned?
– Michael O.
Jan 3 at 23:39
add a comment |
Since your data is irregular, you should use dgrid3d
. It has various options (see help dgrid3d
), here is a picture I've got while trying different kernels and options:
set view map
set palette defined (0 'white', 1 'blue', 2 'green', 3 'yellow', 4 'red')
set dgrid3d 100,100 exp kdensity 10,10
splot 'plot.dat' w pm3d palette
set dgrid3d 100,100 gauss kdensity 30,30
replot
Interesting. The original data ranges from0 to 65
but thecbrange
of the plots are now0 to 120
and<50 to 400
. How to "rescale" properly depending on thekdensity
values? And how to distinguish between existing values=0
and missing values? The latter now look like as they would be0
.
– theozh
Jan 3 at 7:48
Thank you. I obtained different color code between values equal to zero and missing value using the option:set dgrid3d 100,100 hann
orset dgrid3d 100,100 box
– Simon
Jan 3 at 21:30
@Simon Glad to know. Have you found the solution of scaling problem, as theozh mentioned?
– Michael O.
Jan 3 at 23:39
add a comment |
Since your data is irregular, you should use dgrid3d
. It has various options (see help dgrid3d
), here is a picture I've got while trying different kernels and options:
set view map
set palette defined (0 'white', 1 'blue', 2 'green', 3 'yellow', 4 'red')
set dgrid3d 100,100 exp kdensity 10,10
splot 'plot.dat' w pm3d palette
set dgrid3d 100,100 gauss kdensity 30,30
replot
Since your data is irregular, you should use dgrid3d
. It has various options (see help dgrid3d
), here is a picture I've got while trying different kernels and options:
set view map
set palette defined (0 'white', 1 'blue', 2 'green', 3 'yellow', 4 'red')
set dgrid3d 100,100 exp kdensity 10,10
splot 'plot.dat' w pm3d palette
set dgrid3d 100,100 gauss kdensity 30,30
replot
edited Jan 2 at 21:49
answered Jan 2 at 21:13
Michael O.Michael O.
2,9142524
2,9142524
Interesting. The original data ranges from0 to 65
but thecbrange
of the plots are now0 to 120
and<50 to 400
. How to "rescale" properly depending on thekdensity
values? And how to distinguish between existing values=0
and missing values? The latter now look like as they would be0
.
– theozh
Jan 3 at 7:48
Thank you. I obtained different color code between values equal to zero and missing value using the option:set dgrid3d 100,100 hann
orset dgrid3d 100,100 box
– Simon
Jan 3 at 21:30
@Simon Glad to know. Have you found the solution of scaling problem, as theozh mentioned?
– Michael O.
Jan 3 at 23:39
add a comment |
Interesting. The original data ranges from0 to 65
but thecbrange
of the plots are now0 to 120
and<50 to 400
. How to "rescale" properly depending on thekdensity
values? And how to distinguish between existing values=0
and missing values? The latter now look like as they would be0
.
– theozh
Jan 3 at 7:48
Thank you. I obtained different color code between values equal to zero and missing value using the option:set dgrid3d 100,100 hann
orset dgrid3d 100,100 box
– Simon
Jan 3 at 21:30
@Simon Glad to know. Have you found the solution of scaling problem, as theozh mentioned?
– Michael O.
Jan 3 at 23:39
Interesting. The original data ranges from
0 to 65
but the cbrange
of the plots are now 0 to 120
and <50 to 400
. How to "rescale" properly depending on the kdensity
values? And how to distinguish between existing values =0
and missing values? The latter now look like as they would be 0
.– theozh
Jan 3 at 7:48
Interesting. The original data ranges from
0 to 65
but the cbrange
of the plots are now 0 to 120
and <50 to 400
. How to "rescale" properly depending on the kdensity
values? And how to distinguish between existing values =0
and missing values? The latter now look like as they would be 0
.– theozh
Jan 3 at 7:48
Thank you. I obtained different color code between values equal to zero and missing value using the option:
set dgrid3d 100,100 hann
or set dgrid3d 100,100 box
– Simon
Jan 3 at 21:30
Thank you. I obtained different color code between values equal to zero and missing value using the option:
set dgrid3d 100,100 hann
or set dgrid3d 100,100 box
– Simon
Jan 3 at 21:30
@Simon Glad to know. Have you found the solution of scaling problem, as theozh mentioned?
– Michael O.
Jan 3 at 23:39
@Simon Glad to know. Have you found the solution of scaling problem, as theozh mentioned?
– Michael O.
Jan 3 at 23:39
add a comment |
Thanks for contributing an answer to Stack Overflow!
- 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%2fstackoverflow.com%2fquestions%2f54007706%2fhow-resolve-gnuplot-artifacts-in-heat-map%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