Items tagged with densityplot densityplot Tagged Items Feed

Hi,

I don't manage to animate a DensityPlot. Here is my program :

> restart;
> with(Statistics): with(plots):
> P := lambda->RandomVariable(Poisson(lambda)):
> animate(DensityPlot,[P(n),range=0..10],n=1..5,frames=5);

And here is the error message :

Plotting error, non-numeric vertex definition

Thanks for any help

I have a Matrix of data points I am plotting using plots:-listdensityplot. That works fine.

However, the axes are labeled by row and column number of the Matrix (e.g. 1..20 or whatever). In reality, these are of course some parameters the range of which has been mapped onto the rows and columns of the Matrix.

How can I display the axes using the values of the original parameters? I know the transformation from Matrix row or column to the actual parameters (and in this case it is linear).

TIA,

Mac Dude

 

Dear all,

A stupid question.

I tried to create a density plot of the data but I only saw the method to plot graphs through equations. (Actually, I'm not very familiar with related statistical commands in Maple)

This is the histograph of my data:

And I want to get the density plot like this:

It seems that we can get the graph through "InteractiveDataAnalysis" but cannot print the graph into the worksheet or assign the graph to the variable.

How to create a density plot through data? Thanks.

It is a relatively recent innovation that complex-number computations can be done in the evalhf environment. When combined with plots:-densityplot, this makes escape-time fractals in the complex domain very easy to plot. This fractal is based on the Collatz problem. This Wikipedia article has a high-resolution picture of this fractal. I've switched the real and imaginary axes and reversed the direction of the real axis purely for asthetic reasons.

 

Collatz:= proc(b,a)  #Axes switched
local z:= -a+b*I, k;  #real part negated
     for k to 31 while abs(Im(z)) < 1 do
          z:= (1+4*z-(1+2*z)*cos(Pi*z))/4
     end do;
     k #escape time
end proc:

#Test evalhf'ability:

evalhf(Collatz(0,1));

32.

plotsetup(
     jpeg, plotoutput= "C:/Users/Carl/desktop/Collatz.jpg",
     plotoptions="height= 1024, width= 1024, quality= 95"
);

 

CodeTools:-Usage(
     plots:-densityplot(
          Collatz,
          -1..1, # imaginary range
          -0.5..4.5, #negative of real range
          colorstyle= HUE, grid= [1024, 1024], style= patchnogrid,
          labels= [Im,-Re], labelfont= [TIMES, BOLD, 14],
          axes= boxed,
          caption= cat("      Happy New Year ",                  

                StringTools:-FormatTime("%Y")),
          captionfont= [HELVETICA, BOLDOBLIQUE, 18]
     )
);

memory used=24.08MiB, alloc change=24.00MiB, cpu time=7.78s, real time=7.79s

 

Download Collatz_fractal.mw

Hello, 
I have tried to make a densityplot with a logarithmic scale on one axis using : 

So the plot is displayed with a log scale but the grid used to generate the plot is still linear, with a regular spacing.
I don't know how to make it logarithmic too. 
Maybe it's not very clear. For example I would like  a spacing of 0.1 from 0.1 to 1 then a spacing of 1 from 1 to 10.
How can I do that ? 
I have not find any clue in the help ...

EDIT : The option "axis[1]=[mode=log]" only change how the plot is displayed.
I would like to change the grid, that is to say how the plot is calculated.

Why does this not work?

restart:
with(Statistics):

P := Sample(RandomVariable(Normal(10, 10)), 500):
X := RandomVariable(EmpiricalDistribution(P)):

DensityPlot(X);

Hi all,

I have been trying to plot in Maple a Beta Prime Distribution using the Statistics package. I have define it through its density function and its range with the command

U := Distribution(PDF = (proc (x) options operator, arrow; x^(alpha-1)*(1+x)^(-alpha-beta)/Beta(alpha, beta) end proc), Support = 0 .. infinity)

and then assigned it to a random variable Z with the command

Z := RandomVariable(U)

Now I wanted to plot the density...

To plot the density function of the continuous uniform distribution on [-1,1], my initial attempt was: 

plot(Statistics:-PDF(Statistics:-RandomVariable(Uniform(-1,1)),x), x = -1.1 .. 1.1);

See plot below.


But I wanted something more like the wikipedia image (without the labels, naturally):

See plot below.

In words, I expected a horizontal line on the left of x=-1 and on the right of x=1 (at y=0), and I expected no vertical line at the x=-1 and x=1 points ...

Densityplot -R3...

November 05 2012 Júlio 0
I need to make one "DensityPlot-point" (similar Statistics [DensityPlot] or histogram in 
Matrixplot) of a set of points (x, y). 

The set of points (x, y) was generated by the procedure.

Is there a way to generate it?

Thank you.

Many of us know that issuing plotting commands produces various kinds of plot data structure, the details of which are documented on the plot,structure help-page. That page covers most of the details, and a thorough read can reveal that the numeric data of a plot is often stored within such structures as either Array or Matrix.

But what about the result of a call to

Page 1 of 1