787 Reputation

9 years, 175 days

How to change tickmarks in HeatMap?...

Maple 2018

Hi,

I use the first example in the HeatMap help page.

restart:
with(Statistics):
RM := LinearAlgebra:-RandomMatrix(10):
HeatMap(RM);

I want to replace each tickmarks k (k=1..10) by cat(`A`, k).
So I do

NewTickMarks := [seq(k+1/2=cat(`A`, k), k=1..10)]:
HeatMap( RM, tickmarks=[NewTickMarks , NewTickMarks ] );

The horizontal tickmarks are displayed as expected: why the vertical tickmarks do not appear?

PS : HeatMap( RM, tickmarks=[NewTickMarks , default] ) changes the horizontal tickmarks without removing the vertical ones.

Thnks for the help

My procedure works well, but fails while...

Maple

Hi everiboty

This is a notional example derived from my real application.
I have different quantities named Object1, Object2, ... ObjectN (N being a nonnegative integer) and a boolean sequence A of length N.
By construction A contains only one "true" values (and thus N=-1 "false").
I wrote a procedure Choice that takes as input such a sequence and returns the single object among Object1, ... ObjectN for which [A][n]=true.

I know that it would have been clever to name the quantities Object1, ... ObjectN differently (for instance by indexing them), but I'm constrained by what already exists.
Here is my procedure

restart:
Choice := proc(a)
local l, n, object:
l := [seq(args(k), k=1..nargs)]:
n := ListTools:-Search(true, l):
object := Object||n:
print(object):
end proc:

# a few examples of Object(s)
Object1 := {x1, y1, z1}:
Object2 := {x2, y2}:
Object3 := {x3}:

# application:
A := false, true, false:
Choice(A);

{x2, y2}

Now I want to insert this procedure within a another one named “f”:
restart:

f := proc():
local Object1, Object2, Object3:
local Choice, A:
Choice := proc(a)

local l, n, object:
l := [seq(args(k), k=1..nargs)]:
n := ListTools:-Search(true, l):
object := Object||n:
print(object):
end proc:

Object1 := {x1, y1, z1}:
Object2 := {x2, y2}:
Object3 := {x3}:

# here I give A some values, in the true application A is the sequence
# returned by a Maplet through a Shutdown command
# More precisely A correspond to “N” buttons of the same group … then
# only one is “true”.

A := false, true, false:
Choice(A);
end proc;

f();

Object2

Replacing print(object): by print(eval(object)): within procedure  Choice produces  the same ‘uneval’ answer.

I cannot figure out why procedure f doesn’t return the expected {x2, y2} answer
The only workaround I have found is to replace
object := Object||n:
print(object):

by this awfull sequence
if n=1 then print(Object1)
elif n=2 then print(Object1)
…
end if

Could you please help me to understand where is my error and how could I fix it?

How could I obtain prettier Graph plots ...

Hi all,

I use GraphTheory:-DrawGraph (Maple 2018)
Is there a simple way to suppress or modify the ellipses plotted around a vertex ?

(by "simple" I mean: without using plootools:-getdata and doing some ad hoc modifications)

BTW: I'm asking you this because DrawGraph returns poor results in some situations:

with(GraphTheory):
g := Graph({{"azertyuiopqsdfghjklmwxcvbn", 1}, {"azertyuiopqsdfghjklmwxcvbn", 2}}):
DrawGraph(g, style=tree, root="azertyuiopqsdfghjklmwxcvbn")

Problem with the Maple2018 user interfac...

Maple 2018

Hi everybody,

I'm facing that strange and blocking situation:

I was in a Maple 2018 worksheet "W"   (Windows 7, worksheet mode, not document mode) when, probably from some spurious keys combination, the small vertical bar that materializes the position of the mouse disappeared, rendering any further writting impossible.
In the same Maple session I had a few other worksheets  where the this same bar was still present: so it was not a Windows problem (this bar appeared in Word documents too).

I quitted Maple and ran it again. The result is still the same: among all the worksheet I load, only the worksheet  "W"  does not exhibit the location of the mouse.
This problem still persists after rebooting my working station.

Does anyone have any idea to fix this ?

Maple 2015 vs Maple 2018: elements of ta...

Hi everybody,

Written in Maple 2015
restart:
t := table([1=table([a=123]) ]):
save t, MyFile:
restart:
t[1][a] := 321;

The answer is  t[1][a] =321 (here a double underscore)

Now I read MyFile from Maple 2018
restart:
t[1][a] := 321;

The result is   (t[1])[a] = 321   (still a double undercsore but the first level is enclosed between parentheses).

For a more hierarchical table, all the entries but the deeper one are between parentheses.

Does this difference in representations mean something about the inner representation of a table ?

Thank you all

 First 8 9 10 11 12 13 14 Last Page 10 of 22
﻿