Items tagged with axis axis Tagged Items Feed

When I plot an expresion I would the graphics be framed. What I am getting, instead, is the curve and the axis, whith no frame at all. How can I force Maple to make the graphic surrounded by a frame? 

Someone asked on math.stackexchange.com about plotting x*y*z=1 and, while it's easy enough to handle it with implicitplot3d it raised the question of how to get nice constained axes in the case that the x- or y-range is much less than the z-range.

Here's what WolframAlpha gives. (Mathematica handles it straight an an plot of the explict z=1/(x*y), which is interesting although I'm more interested here in axes scaling than in discontinuous 3D plots)

Here is the result of a call to implicitplot3d with default scaling=unconstrained. The axes appear like in a cube, each of equal "length".

 

Here is the same plot, with scaling=constrained. This is not pretty, because the x- and y-range are much smalled than the z-range.

 

How can we control the axes scaling? Resizing the inlined plot window with the mouse just affects the window. The plot itself remains  rendered in a cube. Using right-click menus to rescale just makes all axes grow or shrink together.

One unattractive approach it to force a small z-view on a plot of a much larger z-range, for a piecewise or procedure that is undefined outisde a specific range.

plots:-implicitplot3d(proc(x,y,z)
                        if abs(z)>200 then undefined;
                        else x*y*z-1; end if;
                      end proc,
                      -1..1, -1..1, -200..200, view=[-1..1,-1..1,-400..400],
                      style=surfacecontour, grid=[30,30,30]);

Another approach is to scale the x and y variables, scale their ranges, and then force scaled tickmark values. Here is a rough procedure to automate such a thing. The basic idea is for it to accept the same kinds of arguments are implicitplot3d does, with two extra options for scaling the axis x-relative-to-z, and axis y-relative-to-z.

implplot3d:=proc( expr,
                  rng1::name=range(numeric),
                  rng2::name=range(numeric),
                  rng3::name=range(numeric),
                  {scalex::numeric:=1, scaley::numeric:=1} )
   local d1, d2, dz, n1, n2, r1, r2, rngs, scx, scy;
   uses plotfn=plots:-implicitplot3d;
   (n1,n2) := lhs(rng1), lhs(rng2);
   dz := rhs(rhs(rng3))-lhs(rhs(rng3));
   (scx,scy) := scalex*dz/(rhs(rhs(rng1))-lhs(rhs(rng1))),
                scaley*dz/(rhs(rhs(rng2))-lhs(rhs(rng2)));
   (r1,r2) := map(`*`,rhs(rng1),scx), map(`*`,rhs(rng2),scy);
   (d1,d2) := rhs(r1)-lhs(r1), rhs(r1)-lhs(r1);
   plotfn( subs([n1=n1/scx, n2=n2/scy], expr),
           n1=r1, n2=r2, rng3, _rest[],
           ':-axis[1]'=[':-tickmarks'=[seq(i=evalf[3](i/scx),i=r1,d1/4)]],
           ':-axis[2]'=[':-tickmarks'=[seq(i=evalf[3](i/scy),i=r2,d2/4)]],
           ':-scaling'=':-constrained');
end proc:

The above could be better. It could also detect user-supplied custom x- or y-tickmarks and then scale those instead of forming new ones.

Here is an example of using it,

implplot3d( x*y*z=1, x=-1..1, y=-1..1, z=-200..200, grid=[30,30,30],
            style=surfacecontour, shading=xy, orientation=[-60,60,0],
            scalex=1.618, scaley=1.618 );

Here is another example

implplot3d( x*y*z=1, x=-5..13, y=-11..5, z=-200..200, grid=[30,30,30],
            style=surfacecontour, orientation=[-50,55,0],
            scaley=0.5 );

Ideally I would like to see the GUI handle all this, with say (two or three) additional (scalar) axis scaling properties in a PLOT3D structure. Barring that, one might ask whether a post-processing routine could use plots:-transform (or friend) and also force the tickmarks. For that I believe that picking off the effective x-, y-, and z-ranges is needed. That's not too hard for the result of a single call to the plot3d command. Where it could get difficult is in handling the result of plots:-display when fed a mix of several spacecurves, 3D implicit plots, and surfaces.

Have I overlooked something much easier?

acer

Hello,

I would like to know how to generate super/subscript characters in axis label. I have tried the double underscore (atomic variable style) and the super/subscript under "Format" in document mode but no luck at all. Any comment/suggestion is truly appreciated.

Yu-Hung Lien

 

 

 

 

How to make a vertical axis of the plot break?

Hello;

I would like to extract data from a 2D plot to compare my numerical result in Matlab. 

I used this command.

However, I need to spesify the nodes on x axis to get the error in Matlab. My matlab codes give the result as fix step size i.e [0 0.1 0.2 ... 1.0] or [0 0.01 0.02 ... 1.00] etc.

Is there any command in Maple to spesify the nodes on x axis?

Thanks you!

Hello,

can I remove tick marks from axis in plots ?

Is there any simple way in maple 16 to fix the axis width and height on inline plot? The PlotSetup seems dosen't function properly in my windows7 home 64 bit! Thank you.

Hi, how would you add arrowheads to the x and y-axis to show that they continue.

Thanks 

Hi,

I tried to create a graph with two different x-axes and y-axes, for example:

It's no doubt that we can use the "dualaxisplot" to generated a plot with two different y-axes as follows:

 

 

It's seem that Maple can realize plots with two different x-axes , because some of cases present functions through upper x-axis, such as:

 

How should I create a graph to display functions using the bottom and left sides as the x- and y-axis for one, and the top and right sides as the x- and y-axis for the other?

I'd appreciate any help on this topic. Thank a lot.

 

Hello,

Is it possible to have the labels of the x-axis and of the tickmarks above the axis?

Thank you!

I am looking to do a custom non-linear axis in Maple, and no, not a logarithmic axis, but a custom one that i can define with a function. I know i can alter my data and the alter the display of the axis tickmarks, and in this way create the illusion of a custom axis. But there must be a better approach which does not require altering the data? I can see in the plot documentation that i can specify axis[mode = linear] or [mode = log] but why not a custom one?

Hello,I just can't find out whether it's possible to plot the x-axis 'below' the graph? Normally speaking the x-axis is plotted at y=0, but I want my x-axis to be plotted for example at y=-5 or y=-10. Can that be done?Greetings,Frank

Dear sir,

i want to change the horizontal and vertical axis in maple plot. on horizontal axis  i  want velocity  u(y) values and on vertical axis y values i am attaching the file also My codes are 

U:=(y^2-2*h*y)*(-(5/2)*c1/(2*h^2*a^2+5));

 

 c1:=1:

 h:=1:

  a0:=subs(a=1,U):

 a1:=subs(a=1.5,U):

As'salam u Alaikum / Hello!!

 

I want to add a revolute joint but i want the axis of revolution not to be aligned with base axis system (as maplesim only allows revoution about any of the bas axis-9 possibilities). The revolution should be about an axis which is at an angle from x-axis. How do I do it??

 

Moreover I will be very happy if you can share video tutorials of complicated cad models.

 

Thanks!!!

I have a function T = x*z(x), that I want to plot.

T should be drawn at the y-axis. But at the x-axis, there should not x be used, but z(x).

It shall look like:

 

T

¦

¦

¦

¦

¦-------------------------------------- z

Any idea how to do this?

BTW: I read, that Maple 16 has enhanced plotting functions. Is it worth the upgrade or are there just minor goodies?

1 2 Page 1 of 2