Items tagged with plot plot Tagged Items Feed

Is there a way to tell Maple to export a figure to PDF with a proper bounding box, like all of its other graphics export formats?

To export a graphics produced by Maple's plot(), I right-click on the plot, select Export, and then one of the several choices of graphics formats.  All options, other than the PDF, work fine—they produce graphics files whose bounding boxes correspond to the extents of the image.  Exporting to PDF misbehaves—it produces the equivalent of a 8.5''x11'' paper and inserts the graphics somewhere near the upper left corner.  I am absolutely at a loss to see the utility of that.  What in the world is the use of such an export?

Is there a configuration setting that tells Maple to save to PDF with a proper bounding box?  I looked around but couldn't find one.

Given a  vector v (parallel to the principle axis) and a center point c,

and generating vectors u(beta) orthogonal to v for 0 < beta < 2pi,

and real positive parameters a and b 

I want to plot the hyperboloid  c + a*v*sec(alpha) + b*u(beta)*tan(alpha)

for -pi/2 < alpha < pi/2.

I am able to generate something of a plot, but can't control the size and appearance.  

Hello!

To get the phase portrait, I did this

Eq1:=diff(x(t),t)=1-d*x(t)-x(t)*v(t);

Eq2:=diff(y(t),t)=-a*y(t)+x(t)*v(t)-y(t)*w(t);

Eq3:=diff(z(t),t)=-b*z(t)+y(t)*w(t);

Eq4:=diff(v(t),t)=-p*v(t)+y(t);

Eq5:=diff(w(t),t)=-q*w(t)+c*z(t);

d:=0.012:a:=0.93:c:=40:b:=5.6:p:=5.6:q:=5.6:
ics:=x(0)=5,y(0)=1,z(0)=2,v(0)=0.5,w(0)=4;

eq1:=1-d*x-x*v;
eq2:=-a*y+x*v-y*w;
eq3:=-b*z+y*w;
p:=5.6:
eq4:=-p*v+y;
eq5:=-q*w+c*z;

solve({eq1=0,eq2=0,eq3=0,eq4=0,eq5=0},{x,y,z,v,w});

initialset:={seq(seq(seq(seq(seq([x(0)=a1,y(0)=a2,z(0)=a3,v(0)=a4,w(0)=a5],a1=0..5),a2=0..1),a3=0..2),a4=0..0.5),a5=0..4)}:

A:=DEplot([Eq1,Eq2,Eq3,Eq4,Eq5],[x(t),y(t),z(t),v(t),w(t)],t=0..140,x=5..7,y=0..2,initialset,stepsize=0.01,color=blue,linecolor=magenta,arrows=medium,axes=boxed):

Error, (in DEtools/DEplot/WhichPlot) More than two dependent variables - please indicate the desired scene.

I want phase portrait projected on x − y plane.

Any comments?

I'd like to plot the differences between terms in a sequence of vectors. Each difference term should start at the end of the last difference term, so that if I was to plot the actual term, the vector would meet at the end of the difference term. The sequence is limited in length and stored as a list.

Ex:

Suppose I have  [<1,1>,<2,2>,<3,3>]. The difference terms would thus be [<1,1>,<1,1>,<1,1>]. The first difference term would be plotted be plotted from <0,0>, the second starting at <1,1>, the third at <2,2>.

I can compute the difference terms, but I am not sure how to make the plot I desire. Is arrow(...) the answer, somehow?

Has there been any progress with new commands for Maple 13 that allow one to auto-resize the plotting grid?

I am generating fractals with Maple 13 and resizing the plot output grid manually is not an option because it distorts it. Neither is the option to resize it once and recalculate, because the final grid contains many points.

Any pre-processing or massaging code prior to executing the main code is very welcome (if it can be done).

Many thanks,

Yiannis

When I plot someting in Maple17, it appears in a small square window that's horizontally centered.  I want to be able to create plots that appear larger.  There's plently of space on the screen for plots to be much larger.

Yes, I know I can grab the corner of a plot and drag it to make it bigger.  That's not what I want (that takes time, and it's tricky to maintain the aspect ratio).  I want the plot to appear large when I execute the plotting command.

I've searched for answers both on Google and mapleprimes, and come up empty.

 

My assignment is to plot 3 graphs when u0=65.70 and 95 and I thought I did my code properly but now I am getting weird errors

 

a0:=80;
a1:=-5;
b1:=-5*(3)^0.5;
w:=Pi/12;
k:=0.2;
u0:=65;

t=0:0.001:100;
c0=u0-a0-(k^2*a1-k*w*b1)/(k^2+w^2);
c1=(k^2*a1-k*w*b1)/(k^2+w^2);
d1=(k*w*a1+k^2*b1)/(k^2+w^2);
u=a0+c0*exp(-k*t)+c1*cos(w*t)+d1*sin(w*t);
plot(t,u,'r');

I am getting an error here that says Error, (in plot) unexpected options: [65., r] and I don't know how to fix this


legend('u(0)=65');


hold on;
u0=70;
c0=u0-a0-(k^2*a1-k*w*b1)/(k^2+w^2);
c1=(k^2*a1-k*w*b1)/(k^2+w^2);
d1=(k*w*a1+k^2*b1)/(k^2+w^2);
u=a0+c0*exp(-k*t)+c1*cos(w*t)+d1*sin(w*t);
plot(t,u,'-');

I am also getting an error with the '-' portion of my plot "Error, invalid uneval"

legend('u(0)=70');


hold on;
u0=95;
c0=u0-a0-(k^2*a1-k*w*b1)/(k^2+w^2);
c1=(k^2*a1-k*w*b1)/(k^2+w^2);
d1=(k*w*a1+k^2*b1)/(k^2+w^2);
u=a0+c0*exp(-k*t)+c1*cos(w*t)+d1*sin(w*t);
plot(t,u,'g');

I am getting an error yet again with my plot and this time it is "Warning, expecting only range variable u in expression t to be plotted but found name t"


legend('u(0)=90');

When plotting a continous function that looks something like a square wave, for example like this:

f:=x->piecewise(0<x<Pi,0,Pi<x<2*Pi,Pi);
a:=0: b:=2*Pi: p:=b-a:
fp:=f(x-floor( (x-a)/p)*p);
plot(fp,x=-6*Pi..6*Pi,discont=true);

Is there some way to show dashed vertical lines at the points of discontinuity?

If we have a piecewise continous 2*Pi-periodic function

h(t)=e^(2*t) when 0 < t < 2*Pi

How can we plot it? It should look something like this:

 

Periodic plot

 

I.e. I want to be able to just set an interval and then it automatically plots the function with the specified periodicity.

Hi,

 

I'm trying to create interactive plots by using Explore to help demonstrate the effects parameters have on functions. I created one successfully to illustrate shifts and stretches of a polynomial:

 

transform(A,B,X,H,P,K):=Explore(plot(a*(b*x+h)^(p)+k,x=X),parameters=[a=A, b= B,h=H,p=P,k=K],placement=right)

 

However when I try to do the same with a solved ODE it returns an error message:

 

Explore(plot(1/(-p*x+x+1)^(1/(p-1)), x = -5 .. 5), parameters = [p = -20 .. 20], placement = right);

 

Executing this gives the error message: 

Warning, expecting only range variable x in expression 1/((-p*x+x+1)^(1/(p-1))) to be plotted but found name p
INTERFACE_PLOT(AXESLABELS(x, ""),

VIEW(-5. .. 5., DEFAULT, _ATTRIBUTE("source" = "mathdefault"))),

parameters = [p = -20 .. 20], placement = right

 

I'm not sure why it is having difficulty dealing with "p" when it had no difficulty with the first. Any help would be appreciated!

Consider the problem of a hard-hit baseball. The air-friction drag on a baseball is approximately given by the following formula

and subsequent differential equations : 

F:=-((C_d)*rho*Pi*(r)^2*v*v)/2;
m:=0.145;
v0:=65;
g:=9.81;
v_x:=diff(x(t),t);
v_y:=diff(y(t),t);
d2v_x:=-((C_d)*rho*Pi*(r^2)*(v_x)*sqrt((v_x)^2 +(v_y)^2))/(2*m);
d2v_y:=-((C_d)*rho*Pi*(r^2)*(v_y)*sqrt((v_x)^2 +(v_y)^2))/(2*m)-g;

where

C[d] is the drag coefficient (about 0.35 for a baseball)

•
rho[air] is the density of air (about 1.2 kg/
3m
)
•
r is the radius of the ball (about 0.037 m)

v is the vector velocity of the ball

Then if given that : 

Power hitters in baseball say they would much rather play in Coors Field in Denver than in sea-level stadiums because it is so much easier to hit home runs. The air pressure in Denver is about 10% lower than it is at sea level. The field dimensions at Coors Field are:

Left Field - 347 feet (106 m)
Left-Center - 390 feet (119 m)
Center Field - 415 feet (126 m)
Right-Center - 375 feet (114 m)
Right Field - 350 feet (107 m)

 1. Overlay two plots: one at sea level and one in Denver to show why power hitters prefer Coors field.

2. Find the initial magnitude of velocity, v0

needed to hit a home run to Right-Center, where v_x(0)=v0/sqrt(2) and v_y(0)=v0/sqrt(2)

I don't quite understand how to use the field dimensions for both 1 and 2 and am pretty clueless as to how to approach this question using the ordinary differential equations mentioned above.

 

 

Hello

Could you plese help me to plot my function. i want to plot a function in which variables are have able formatting. I have attache my file.

Thank you.


restart

L[b] := 400:

L[c] := 400:

q := 5:

M[ab] := VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, E), I[c]), 1/L[c]), theta[b]):``

M[ba] := VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, E), I[c]), 1/L[c]), VectorCalculus:-`*`(2, theta[b])):

M[bc] := VectorCalculus:-`+`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, E), I[b]), 1/L[b]), VectorCalculus:-`+`(VectorCalculus:-`*`(2, theta[b]), theta[c])), VectorCalculus:-`*`(VectorCalculus:-`*`(q, L[b]^2), 1/12)):

M[cb] := VectorCalculus:-`+`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, E), I[b]), 1/L[b]), VectorCalculus:-`+`(theta[b], VectorCalculus:-`*`(2, theta[c]))), VectorCalculus:-`-`(VectorCalculus:-`*`(VectorCalculus:-`*`(q, L[b]^2), 1/12))):

M[cd] := VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, E), I[c]), 1/L[c]), VectorCalculus:-`*`(2, theta[c])):

M[dc] := VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, E), I[c]), 1/L[c]), theta[c]):

eq1 := VectorCalculus:-`+`(VectorCalculus:-`*`(VectorCalculus:-`+`(M[ab], M[ba]), 1/L[c]), VectorCalculus:-`*`(VectorCalculus:-`+`(M[cd], M[dc]), 1/L[c])) = 0:

eq2 := VectorCalculus:-`+`(M[ba], M[bc]) = 0:

solve([eq1, eq2], {theta[b], theta[c]})

{theta[b] = -(40000000/3)/(E*(I[b]+2*I[c])), theta[c] = (40000000/3)/(E*(I[b]+2*I[c]))}

(1)

theta[b] := rhs({theta[b] = -(40000000/3)/(E*(I[b]+2*I[c])), theta[c] = (40000000/3)/(E*(I[b]+2*I[c]))}[1]):

theta[c] := rhs({theta[b] = -(40000000/3)/(E*(I[b]+2*I[c])), theta[c] = (40000000/3)/(E*(I[b]+2*I[c]))}[2]):

subs(theta[b] = theta[b], M[ba])

-(400000/3)*I[c]/(I[b]+2*I[c])

(2)

subs(theta[b] = theta[b], M[bc]):

``

EXplore(plot(M[ba], I[b] = 1 .. 10), parameters = [I[c] = 1 .. 20])

Error, (in plot) unexpected option: I[b] = 1 .. 10

 

``


Download shiboft2.mw

Matlab seems to be pretty strong at doing color plots with separate color bars, e.g.

Is this also possible in Maple and somehow in combination with `plots[surfdata](...,color=zhue,...)`?

Hello

I want to fill an area between multiple numerical curves. I have shown my curves in the below picture. Could you please help?

Thank you.

I've got the following piecewise function :

(x^2+y^2)^(alpha).arcsin(y/x) if (x,y) are in [-pi/2,pi/2]

0, (x,y)=(0,0)

1. How do I plot this function taking the alpha variable and the piecewise construct into account?

2. How can I check for points of discontinuity, indifferentiability from the plot/function itself?

 

 

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