actly what to do.
Best regards,
Ed
From: Jörg Sommrey
Sent: Friday, April 19, 2024 1:20:17 PM
To: Jovan Trujillo
Cc: perldl
Subject: Re: [Pdl-general] Plotting flat xyz data as an image.
Hi Jovan,
in addition to Luis' solution, here is another approach for your
Hi Jovan,
in addition to Luis' solution, here is another approach for your
mapping problem.
You need to figure out the image's dimensions yourself, then you may
align the x- and y-coordinates to a grid and put the z-data into the
corresponding cells.
my $img = zeroes dim1, dim2;
my $xy
If your data is defined on a regular x-y grid you could reshape it to
a 2D array, as in
gplot(with=>'image',$x->reshape($n,$m), $y->reshape($n,$m), $z->reshape($n,$m))
with $n and $m the number of pixels along x and along y. If the x-y
data is irregular but almost on a grid, you could use
If you look at my example code it shows that the Excel data basically has
the coordinates flattened to a list:
my $x = flat(xvals(10,10)); # This is basically how x-coordinates are
output from my machine.
my $y = flat(yvals(10,10)); # Same format as x-coordinates
my $z = sequence(100)*rand(1); #
Hello Jovan,
Did you try this?
my $z = sequence(10,10)*rand(1);
Seems to me you just need a z-value pdl that has the same dimensions as the
x and y coordinates.
David
On Thu, Apr 18, 2024, 1:11 PM Jovan Trujillo
wrote:
> Hi Greg,
> Yes, I've been looking into a heat map or flattened 3d
Hi Greg,
Yes, I've been looking into a heat map or flattened 3d scatterplot. In
Mathematica, I can easily import the Excel spreadsheet and plot using
ListDensityPlot to give me a nice high-resolution image of the data.
But my question is simply a mapping problem. If I have two piddles with $x
and
Hello,
I haven’t carefully looked at your problem with GNUPlot but I wonder if
what you are trying to achieve could not be done with surface routines,
that’s with 3d ones ? Or maybe something like heatmap like this question: