## typesetting in maple plots...

Dear all,

I am trying to put labels for my axis and I use typeset to do that.

The code is:

plot(10^10*x, x = 0 .. 5,labels = ["x", typeset(10^10*Delta*z)],labeldirections = ["horizontal", "vertical"])

The problem is that  I get a label like below:

I mean it is not typed as 10^{10}, but 10000000000!!!

Can anyone help me in changing this to 10^10?

## typesetting in maple plots...

Dear all,

I am making a plot, which is z/ t vs. z.

but in labeling maple prints z/t, because it simplifies  !

You can find my worksheet below.

Could any of you help me with this please?

## How to label a big math expression on vertical axi...

How to label in inline math mode. I tried labels = ['theta', Typesetting:-Typeset(cos(1/theta)/sqrt(1-theta^2))] which gives a big expression on Y axis spreaded in two lines. But i want to label one line as in latex $\cos(1/\theta)/sqrt(1-\theta^2))$ . Is there a way to do it ?

## Why are not subscripts appeared in the labels?...

restart:
tf:=2:
n:=2:
X[1]:=t->t^2:
A[1]:=diff(X[1](t),t,t):
plot(A[1](t),t=0..tf,labels=["Time t","n times derivative of X[1](t)"]);

I have a code like above. I run it. Then,

in the labels; it was written "n times derivative of X[1](t)"] why not "2 times derivative of X[1](t)"]) ? and why was not the subscript appeared ? I mean that I want to see X1 instead of  X[1]?

Thank you.

## How to rotate vertically label of vertical axis in...

Hello,

How can I rotate vertically label of vertical axis ? Can you help me ?

Thank you.

## How to label columns in ColumnGraph?...

How do you put labels on individual columns in ColumnGraph?

## Contour curves with labels

by: Maple 2015

This post is my attempt to answer the question from here .

The procedure  ContoursWithLabels  has 2 required parameters: Expr  is an expression in  x  and  y  variables,  Range1  and  Range2  are ranges for  x  and  y . In this case, the output is the list of floats for the contours and 8 black contours (with labels) (the axis of coordinates as a box).

The optional parameters: Number is positive integer - the number of contours (by default Number=8),  S is a set of real numbers  C  for contours (for which Expr=C) (by default  S={}),  GraphicOptions  is a list of graphic options for plotting (by default  GraphicOptions=[color = black, axes = box]),  Coloring  is an equality  Coloring=list of color options for  plots[dencityplot]  command (by default Coloring=NULL).

The code of the procedure:

restart;

ContoursWithLabels := proc (Expr, Range1::(range(realcons)), Range2::(range(realcons)), Number::posint := 8, S::(set(realcons)) := {}, GraphicOptions::list := [color = black, axes = box], Coloring::= := NULL)

local r1, r2, L, f, L1, h, S1, P, P1, r, M, C, T, p, p1, m, n, A, B, E;

uses plots, plottools;

f := unapply(Expr, x, y);

if S = {} then r1 := rand(convert(Range1, float)); r2 := rand(convert(Range2, float));

L := [seq([r1(), r2()], i = 1 .. 205)];

L1 := convert(sort(select(a->type(a, realcons), [seq(f(op(t)), t = L)]), (a, b) ->is(abs(a) < abs(b))), set);

h := (L1[-6]-L1[1])/Number;

S1 := [seq(L1[1]+(1/2)*h+h*(n-1), n = 1 .. Number)] else

S1 := convert(S, list)  fi;

print(Contours = evalf[2](S1));

r := k->rand(20 .. k-20); M := []; T := [];

for C in S1 do

P := implicitplot(Expr = C, x = Range1, y = Range2, op(GraphicOptions), gridrefine = 3);

P1 := [getdata(P)];

for p in P1 do

p1 := convert(p[3], listlist); n := nops(p1);

if n < 500 then m := if(40 < n, (r(n))(), round((1/2)*n)); M := if(40 < n, [op(M), p1[1 .. m-11], p1[m+11 .. n]], [op(M), p1]); T := [op(T), [op(p1[m]), evalf[2](C)]] else

if 500 <= n then h := floor((1/2)*n); m := (r(h))(); M := [op(M), p1[1 .. m-11], p1[m+11 .. m+h-11], p1[m+h+11 .. n]]; T := [op(T), [op(p1[m]), evalf[2](C)], [op(p1[m+h]), evalf[2](C)]]

fi; fi; od; od;

A := plot(M, op(GraphicOptions));

B := plots:-textplot(T);

if Coloring = NULL then E := NULL else E := ([plots:-densityplot])(Expr, x = Range1, y = Range2, op(rhs(Coloring)))  fi;

display(E, A, B);

end proc:

Examples of use:

ContoursWithLabels(x^2+y^2, -3 .. 3, -3 .. 3);

ContoursWithLabels(x^2-y^2, -5 .. 5, -5 .. 5, {-20, -15, -10, -5, 0, 5, 10, 15, 20}, [color = black, thickness = 2, axes = box], Coloring = [colorstyle = HUE, colorscheme = ["White", "Red"], style = surface]);

The next example, I took from here:

ContoursWithLabels(sin(1.3*x)*cos(.9*y)+cos(.8*x)*sin(1.9*y)+cos(.2*x*y), -5 .. 0, 2 .. 5, {seq(-2 .. 2, 0.5)}, [color = black, axes = box], Coloring = [colorstyle = HUE, colorscheme = ["Cyan", "Red"], style = surface]);

There are many more examples can be found in the attached file.

Edit. The attached file has been corrected.

## How to combine Greek letters and math in labels?...

Hi,

I am trying to use implicit plot. The plot is OK but I want to put labels such as what Latex produces :

$\frac{\Omega}{\omega_n}$ for x axis and $a_0 \mathrm{(m)}$ for y axis

How can I apply this in my maple code as below:

plot1:=implicitplot(a3, Omega_r=1.5..2.5, a=0.00000001..0.1, labeldirections=[horizontal, horizontal], axes=boxed, labels=["W/w_n",typeset("a_0 (m)")], labelfont=[SYMBOL]):

What I have put as bold does not work for me, it is making everything in Greek :) . I want combination of Greek and math.

Thasnks,

Bahareh

## Plotting with Japanese title...

I want to plot curves with Japanese title and labels. I want to plot through an external java program. Is it possible?

When I tried, I am getting control character unexpected error.

## How to make box shaped nodes to circle shaped in G...

I found some codes for drawing my Graph in Maple:

[>  with(GraphTheory);

W := Graph(undirected, {{0, 1}, {0, 2}, {0, 3}}):

HighlightEdges(W, W, black):

HighlightVertex(W, [1, 2, 3, 0], gray):

DrawGraph( W);

The way that the graph was plotted was not what I wanted to have. In fact, I expected to have something like this one:

http://i.stack.imgur.com/JMfmd.png

I mean the vertexes are shaped by circles not by boxs. Moreover, one may want to see labels below (or above) the circled nodes. My question is

" Is there any certain codes we can use to have this graph like the picture above? Can we manage the labels to be appeared near the nodes in Maple?

## Typesetting labels of derivatives in plots...

I'm trying to add a label to a plot and need the derivative to be represented as a dot. My typesetting rules are set to extended, and it works in a worksheet but not in the plot. See attached image. The code to generate it is:

#the output is shown with a dot over phi
diff(phi(t),t);

#derivative in label not shown as a dot
plot(sin( t), t=0..10, labels=["t", typeset(diff(phi(t),t))], labeldirections=[horizontal, vertical]);

any ideas?

thanks

EDIT:

this seems to work... ( i will leave this question here as it might come in handy to someone else).

plot(sin( t), t=0..10, labels=["t", Typesetting:-Typeset(diff(phi(t),t))], labeldirections=[horizontal, vertical]);

Is it a bug that using the first variant does not work? any ideas from the experts?

## Labels on Plot and Along Axis: Workarounds, Sort...

by: Maple 17

I'm sharing this in the hope it might help someone (my future self being the most likely). Since my suggestions are not perfect and a little messy, feel free to suggest better ways.

I spend a great deal of time tweaking my plots. Oftentimes I want to add labels to the curves right onto the plot. Most of the time it's easy to do. Occasionally I struggle. Sometimes I succeed, sometimes I give up.

Below is an example of the kind of plot I sometimes create. It's not perfect.

## contour plot labeling...

Dear sir i  want the contour values  automatically display on the contour.

Hear is the code and sample contour plot.

contourplot(x^5-y^3,x=-5..5,y=-4..3,axes=boxed,contours=10);

## math symbols on labels...

Hi

I have a plot using plot() function. I would like to label the x-axis using math symbol (example a_subscript 0).

Is there any way I could do this. I tried label=["a[0]", "some text"]. However, the label on x-axis appears as a[0].

I am using Maple 15 Worksheet.