Items tagged with graph graph Tagged Items Feed

Hi, Everyone.

I'm trying to figure out how to make a graph (actually a "line") change color based on certain criteria so I can create a Maple Application.

I've figured out the following, which indicates the sign of the graph by the color, but it's way more complicated than it ought to be.

It's also not robust as I need it to be, this happens to depend on the zeros occuring at integer values.  I could deal with that on a case by case basis, but not for something automatically.

I'm at a loss; maybe I'm not Googling the right things... maybe Maple can't do this (although I'd heard color tools were being added in Maple 16).

Does anyone have any suggestions?

Thanks In Advance!

Joseph

In the following worksheet, I can evaluate S(32), but not S(31). As a result, I can't use any value that depends on S(31) (or any i<31), for example, the graph is incomplete. How can I get Maple to evaluate S(31)?

restart

sigma := 167:

t := proc (i) options operator, arrow; exp(-(1/2)*i^2/sigma^2) end proc:

S := proc (l) options operator, arrow; 1+2*(sum(t(i), i = l .. infinity)) end proc:

evalf(S(32))

356.9784188

(1)

evalf(S(31))

1.+2.*(sum(exp(-(1/55778)*i^2), i = 31 .. infinity))

(2)

Expected result of evalf(S(31)):

evalf(S(32)+2*t(31))

358.9442559

(3)

plot(S(y), y = 20 .. 50)

 

``


All told, S(i) fails for i in [0..31], i = 115,116, and 221. S(i) succeeds for all other i < 3500.

Download test.mw

 


> restart;
> with*plots;
> Eq1 := diff(f(eta), eta, eta, eta)+f(eta)*(diff(f(eta), eta, eta))-(diff(f(eta), eta))^2 = 0; 

> N := 1;

> blt := 10;
> Eq2 := (diff(theta(eta), eta, eta))/Pr+f(eta)*(diff(theta(eta), eta)) = 0; 
> bcs1 := f(0) = 0, (D(f))(0) = 1, (D(f))(blt) = 0;
> bcs2 := (D(theta))(0) = -N*(1+theta(0)), theta(blt) = 0;
> L := [2.5, 3, 5, 7, 10];
> for k to 5 do R := dsolve(eval({Eq1, Eq2, bcs1, bcs2}, Pr = L[k]), [f(eta), theta(eta)], numeric, output = listprocedure); X1 || k := rhs(R[3]); X2 || k := rhs(R[4]); Y1 || k := rhs(R[5]); Y2 || k := -rhs(R[6]) end do;

 

 how I will draw the graph for Pr against theta   for Pr=2.5 until 7  taking rest of the parameter fix

 

Dear  i want to plot the graphs for different values of R[2,5,6.5]   here is the codes: Either ido loop or array i have to use or other procedure 

The graph display should be at R=2, one graph, R=5 another and R=6.5 

onemore graph

 

restart:
with(DEtools):
eta:=1+k*x+epsilon*sin(2*Pi*x):
A1(x):=-exp(-alpha*x)*J^2*R/(2*eta^3+6*xi*J^2*eta^2):

psi0:=A1(x)*y^3:
psi:=delta*psi0:
V:=-diff(psi,x):
delta:=0.1:
epsilon:=0.01:
alpha:=1:
xi:=0.001:
k:=0.1:
As:= [0, 2, 4]:
x:=0.2
plot([seq]([eval(V, J= A), y, y= 0..eval(eta, J= A)], A= As),title=" velocity at R=2.0 ",labels= ["v", "y"],color= [green, red, blue], linestyle= [solid, dash, dot],legend= [seq](J = A, A= As), axes=boxed);

 

 

 

 

 

 

i want to plot the graph based on this equation to know the stability of this equation :

y := A*(1/x+x*exp(-2*sqrt(-1)*b))+4*sin(h)^2*(2*exp(-sqrt(-1)*b)-3*sin(h)^2*x^(-sin(h))*exp(sqrt(-1)*b*(-sin(h)-1))+3*x^(-sin(h))*exp(sqrt(-1)*b*(-sin(h)-1)))/(3*(1-r))-exp(-2*sqrt(-1)*b)/x-x;

with A = (1+r)/(1-r), r = (1/3)*sin(h)^2, b = m*Pi*h, m = 1, h=0.05

can somebody help me..??

Hi, I was told there are 3 errors about this code, could anyone please help ?

Thank you very much 


DiSpanningTree := proc(G,v)
local comp,edges,recurse,visited;
recurse := proc(w)
local d,z;
if assigned(visited[]) then return false; end if;
comp(numelems(comp)+1) := w;
visited[w] := true;
d := Departures(G,v);
for z in d do
if recurse(z) then edges(numelems(edges)+1) := [w,z]; end if;
end do;
return true;
end proc;
visited := table();
comp := Array([]);
edges := Array([]);
recurse(v);
return Graph(convert(comp,'list'),edges);
end proc:

When I print a Table with graphs in it, the graphs are compressed vertically to an extreme extent. There has to be some compression from the screen, of course, since I have a wide-screen (although the actual worksheet does not use the whole screen width because of the palette and the fact that I don't use full-screen mode. However, the vertical compression  (that is, in a direction where there is plenty of room on the page) is many times more than the horizontal compression. In order to get the printed graph to look normal, I have to stretch the screen graph vertically an extreme amount, which, of course, looks horribly distorted on the screen.

Also when printing a graph as part of a Table, the graph area is clipped so that the title and legend do not print.

I thought that the Table struction would be a good way to display related graphs. But this behavior is making the use of Tables tedious and much less satisfactory because of the missing titles and legends.

None of these things happen when I print a graph in a regular execution group outside a Table structure.

Has anybody else had this problem, and have you found a way to avoid the compression and get the legends?

Dear all,

Is there a Maple command to get ColumnGraph in 3D as bar3 in Matlab.

In 2D, I use:

Statistics[ColumnGraph](A);  # equivalent to bar(A) in Matlab

Thanks

how can you graph when piecewise function is not continuous?

 

example:

BB := piecewise (-1.57 < c and c < -1.56, h, -0.06< c and  c < -0.05, aa, -0.5< c and c < 0.04, bb);

 

 

how to graph in maple 

for example

 

-2 < x < -3, h

-1 < x < -2, b

 

why do I get the error Error, (in rtable/Sum) invalid arguments

In positive numbers, I get it ok

Hello,

What is the combination key for zooming in/out on a Maple 3D graphic?

It seems I have forgotten... (CTRL+left mouse button does not work)

Thankx

JMC

 

I am a Masters of Chemistry student at Leeds University and my project involes producing undirected graphs that look like 2D shapes to represent models of molecules for other student users e.g. if there are 6 atoms it will draw a hexagon shape with each vertices as an atom. It is meant to know what graph to draw by asking them questions in maplet pop-up style windows. To do this I have to ask questions in the pop-up windows like "How many atoms in your molecule?" with a drop down box numbering 2-25 as the possibilities.

 

The problem I am having is getting Maple to relate the answers to these questions on the maplets to the shape (undirected graph) I want it to draw. It displays the answer in the worksheet as for example; ["12"] but I don't know how to ask maple to recognise this number as meaning anything for making the graph.

 

Is there anyone who knows about using maplets that could have a chat with me about this?

 

Thanks! From Megan

So the pseudocode I'm trying to translate into maple is for the greedy vertex coloring algorithm.

The pseudo code is:

Initialize:
1. for i = 1 to n do
2. f[i] := 0 (: no color assigned yet to vertex i :)
3. end(for)
Main loop:
4. for i = 1 to n do
5. let f[i] be the smallest positive integer
which is not in the set {f(j) : j ∈ adj[i]}
6. end(for)
7 return f

 

The closest I've gotten though is:

greedy := proc (G)

local i, j, n, k, L::list;

description "Take simple graph G and return a coloring of the vertices with at most Delta(G)+1 colors";

n := nops(Vertices(G));
L := [seq(x, i = 1 .. n)];
L := subsop(1 = c(1), L);
j := 1;
for i from 2 to n do
L[Vertices(G)[i]] := c(0)
end do;

for i from 2 to n do
   for k to i do
        if member(Vertices(G)[i], Neighbors(G, Vertices(G)[k])) then j := j+1
       end if; 
   end do;
L[Vertices(G)[i]] := c(j)
end do;
return L;
end proc;

Basically my procedure is returning more than delta+1 colors for most graphs, how can I edit it to fix this? I'm guessing the problem is somewhere in my nested loops. Also, I cannot use commands like greedycolor or isvertexcolorable. Thanks.

 

According to kernelopts(version), I am using Maple 16.02, X86 64 LINUX, Nov 18 2012, Build ID 7888210 , having just updated

Maple 16.

I have a Maple worksheet with some graphs of 10^5 data points. When I export the worksheet to a pdf for inclusion in a LaTeX document (with pdfpages package, this recognizes page breaks), the file is around 100 Mb, much larger than I would like.

It seems that the file is large as a figure in the pdf is not just an image, the pdf seems to contain all of the information necessary to plot each data point individually.

Is there some way to encourage Maple 16 to treat figures as bitmaps (or something similarly much smaller than the original figures) upon exporting a worksheet to a pdf? I'll be happy for any suggestions.

NOTES:

1. This question was originally for Maple 16.00. Updating to 16.02a has not solved the problem.

2. I am suspicious that there is some bug in how Maple 16 exports figures made with "plot" to a pdf file.

When I try various methods of compressing the pdf that I've seen on the web, such as with pdftk 1.44, or ghostscript 8.70 or 9.07,  or pdf2ps followed by ps2pdf ,

error messages are returned. For example using pdftk:

pdftk input.pdf output.pdf

gives

"Done. Input errors, so no output created"

 

I remember to have seen and used a command to make the graph of the output of FeynmanDiagrams but I can not find more sample files. Someone can tell me how to do (plot a Feynman graph using the result of FeynmanDiagrams).

Thanks and sorry for my english.

1 2 3 4 5 6 7 Last Page 1 of 48