plotting – Make a nice panel figure, with a 3D plot

There are some solutions on how to make nice panel figures, for example, or the SciDraw package. By nice, I mean reasonably presentable – without miles of space in between figures, and plots within the panel have consistent sizes and fonts, and the labels are inline from plot to plot. I’m not asking for much.

However, I wantinclude a panel figure which has a 3D plot in it. I’m finding it very difficult with the padding in GraphicsGrid. For example,

plot1 = Plot3D[Sin[x/100 + y^2], {x, -300, 300}, {y, -2, 2}, 
   ColorFunction -> "RedBlueTones", Boxed -> False , 
   LabelStyle -> {FontSize -> 13, FontFamily -> "Helvetica", Black}, 
   AxesLabel -> {"x axis label", "y axis label", "z value", " "}, 
   PlotLabel -> "3D Map", 
   ViewPoint -> {1.9660038626106877, 2.036484683486844, 
     ViewVertical -> {-0.38056099743618316, -0.39420402835939466, 

plot2 = DensityPlot[Sin[x/100 + y^2], {x, -300, 300}, {y, -2, 2}, 
   PlotRange -> All, PlotPoints -> 200, 
   ColorFunction -> "RedBlueTones", PlotLabel -> "Density Plot", 
   FrameLabel -> {{"x axis label", " "}, {"y axis label", " "}}, 
   LabelStyle -> {FontSize -> 13, FontFamily -> "Helvetica", Black}];

plot3 = Plot[{Sin[x/100 + 0]}, {x, -300, 300}, PlotRange -> All, 
   Frame -> True, FrameLabel -> {"y axis label", " z label"}, 
   AspectRatio -> 1, 
   LabelStyle -> {FontSize -> 13, FontFamily -> "Helvetica", Black}, 
   PlotLabel -> "x axis cut"];
plot4 = Plot[{Sin[0 + y]}, {y, -2, 2}, PlotRange -> All, 
   Frame -> True, FrameLabel -> {"x axis label", " z label"}, 
   AspectRatio -> 1, 
   LabelStyle -> {FontSize -> 13, FontFamily -> "Helvetica", Black}, 
   PlotLabel -> "y axis cut"];

GraphicsGrid[{{plot1, plot2}, {plot3, plot4}}, 
 ImageSize -> {1000, 1000}]

You can see the output, each plot is a different size, with massive gaps between the figures. I’ve played about with padding on GraphicsGrid, but that hasn’t been very helpful. The titles are at different heights. It doesn’t look great. Any suggestions on improvements?

enter image description here

procedural programming – how can i get the following figure using the for loop

Welcome to MMA SE! What the code above does is simply repeatedly overwrite the value of A. In each iteration of the loop, it evaluates A = i + j, so the A at the end of the loop is simply i + j for the last i, j in the loop.

You could do a For loop where you initialize A to a table, and then set different parts of A, e.g. A((i,j)) = "*". That’s not advisable in Mathematica, but it would look like this:

A = ConstantArray("", {n,n});
For(i=1,i<=n,i++,For(j=1,j<=i,j++,A((i,j)) = "*"));
A // Grid

(Note an important change from the given code: we use j <= i, not j <= n.)

But it’s far easier to simply use Table (or Array, for an alternative approach) to generate matrices, with a conditional statement in each entry that test if i < j:

Table(If(i < j, "", "*"), {i, 6}, {j, 6}) // Grid

Another way: you could also use LowerTriangularize on a 6 by 6 ConstantArray of "*", and replace all the resulting 0s in the upper triangle with "":

(LowerTriangularize(ConstantArray("*", {6, 6})) /. (0 -> "")) // Grid

How to figure out the price of cloud coin?

So cc/btc is now listed on folgory and price is .00000014 is there an easy way to convert this to a usd price?

covid 19 – How can I figure out which countries are least restricted for tourist activities?

One easy way to figure out the true state of lockdowns is to look at mobility ratings. People stop traveling around when restrictions are high and go back to normal lives when restrictions are low. Using data from Google Mobility we can calculate the mobility rating for every country in the world which has enough Google Maps users. We’ll use the “Retail & recreation” category which is probably the most relevant for tourism. It is summarized by Google as:

Mobility trends for places like restaurants, cafes, shopping centers, theme parks, museums, libraries, and movie theaters.

As of March 25th 2021, here is the 7-day rolling average for the countries tracked by Google. Roughly speaking, anything with a score below -30 is fairly locked down. The last column is based on data from this website, which seems fairly accurate.

Country Travel mobility US Citizens allowed?
Fiji 20 No
Bangladesh 14 Yes
Pakistan 13 Yes
Zimbabwe 13 Yes
Iraq 9 No
Zambia 8 Yes
Botswana 7 Yes
Mali 7 No
Mongolia 7 No
New Zealand 6 No
Kenya 6 Yes
Ghana 4 Yes
Cote d’Ivoire 4 No
Papua New Guinea 3 No
Thailand 3 Yes
Togo 3 No
Nicaragua 1 Yes
Nepal 1 Yes
Angola -2 No
South Korea -2 Yes
Nigeria -3 No
Saudi Arabia -3 No
Tajikistan -6 Yes
Tanzania -7 Yes
Qatar -7 No
Belize -8 Yes
United States -8 Yes
Australia -9 No
Cameroon -9 No
Benin -9 No
Egypt -10 Yes
El Salvador -10 Yes
Laos -10 No
Rwanda -10 Yes
Vietnam -10 No
Singapore -11 No
United Arab Emirates -11 Yes
Japan -11 No
Trinidad and Tobago -12 No
Taiwan -12 No
Aruba -13 Yes
Israel -13 No
Namibia -13 Yes
South Africa -14 Yes
Bahrain -15 Yes
Ecuador -15 Yes
Russia -15 No
Puerto Rico -15 Yes
Senegal -16 Yes
Sri Lanka -16 Yes
Morocco -16 Yes
Mozambique -16 Yes
Indonesia -17 No
Venezuela -17 No
Hong Kong -17 No
Guatemala -18 Yes
Denmark -20 No
Sweden -21 No
Bosnia and Herzegovina -21 Yes
Ukraine -21 Yes
Haiti -21 Yes
Canada -22 No
India -22 No
Gabon -22 Yes
Kyrgyzstan -22 No
Malaysia -22 No
Uganda -22 Yes
Belarus -22 No
Croatia -23 No
Bolivia -23 Yes
Mexico -24 Yes
Antigua and Barbuda -24 Yes
Kazakhstan -24 No
Costa Rica -25 Yes
Georgia -25 Yes
Oman -26 Yes
Colombia -26 Yes
Honduras -26 Yes
Lebanon -26 Yes
Norway -26 No
Dominican Republic -26 Yes
The Bahamas -27 Yes
North Macedonia -28 Yes
Moldova -28 No
Jamaica -28 Yes
Paraguay -28 Yes
Romania -29 No
Jordan -30 Yes
Poland -30 No
Latvia -31 No
Turkey -31 Yes
Panama -32 Yes
Spain -32 No
Argentina -32 No
Bulgaria -32 No
Barbados -33 Yes
Philippines -35 No
Uruguay -35 No
Finland -35 No
Cape Verde -35 Yes
Belgium -37 No
Cambodia -38 Yes
Switzerland -38 No
Germany -39 No
Netherlands -39 No
Slovenia -39 No
Luxembourg -40 No
Peru -41 Yes
France -42 No
Kuwait -42 No
Lithuania -42 No
Serbia -42 Yes
Chile -43 Yes
Reunion -43 No
Brazil -44 Yes
Ireland -44 Yes
Estonia -46 No
Hungary -46 No
Malta -46 No
Austria -47 No
Portugal -47 No
Italy -50 No
Slovakia -51 No
United Kingdom -51 Yes
Liechtenstein -54 No
Czechia -55 No
Greece -59 No
Myanmar (Burma) -77 No

I will update this list once a week until it stops being relevant or until Google stops publishing its mobility data.

make a single figure composed of several plot

I’ve to make a single figure composed of several plot but I can’t do it.
Can anyone help me?
Thank you all

Can’t figure out how to get results of an AppleScript to print to a text file

The code below works. It returns the list variable in the results tab of the script editor. I want to write that to a text file.

set A to text
set B to text
set C to text
set D to text
set E to text
set F to text
set G to text
set H to text
set I to text
set J to text
set K to text
set L to text
set M to text
set N to text
set O to text
set P to text
set Q to text
set R to text
set S to text
set T to text
set U to text
set V to text
set W to text
set X to text
set Y to text
set Z to text
set Alphabet1 to {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
set Alphabet2 to {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
set Alphabet3 to {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}

set IdleLoop2 to "set value of cell (µ∑†∏µ & LastRowCrypto + 1) to current¥Price"

set findText3 to "∑"
set findText4 to "†"
set findText5 to "∏"
set findText6 to "¥"
set ListOfExcel to {}
repeat with A from 1 to length of Alphabet1
    set replaceText4 to item A of Alphabet1
    set newText4 to do shell script "sed 's|" & quoted form of findText3 & ¬
        "|" & quoted form of replaceText4 & "|g' <<< " & quoted form of IdleLoop2
    copy newText4 to the end of ListOfExcel
end repeat

repeat with B from 1 to length of Alphabet2
    repeat with D from 1 to 26
        set IdleLoop3 to item D of ListOfExcel
        set replaceText5 to item B of Alphabet2
        set newText5 to do shell script "sed 's|" & quoted form of findText4 & ¬
            "|" & quoted form of replaceText5 & "|g' <<< " & quoted form of IdleLoop3
        copy newText5 to the end of ListOfExcel
    end repeat
end repeat
repeat with C from 1 to length of Alphabet3
    repeat with E from 27 to 53
        set IdleLoop4 to item E of ListOfExcel
        set replaceText6 to item B of Alphabet3
        set newText6 to do shell script "sed 's|" & quoted form of findText5 & ¬
            "|" & quoted form of replaceText6 & "|g' <<< " & quoted form of IdleLoop4
        copy newText6 to the end of ListOfExcel
    end repeat
end repeat

return ListOfExcel

I’ve tried this:

set the logFile to ((path to desktop) as text) & "DOG.txt"
set the logText to ListOfExcel
    open for access file the logFile with write permission
    write (logText & return) to file the logFile starting at eof
    close access file the logFile
on error
        close access file the logFile
    end try
end try

And tried this:

do shell script "echo " (I forgot the rest)

And tried this:

write ListOfExcel to textFile

But those ideas don’t seem to work.

I just don’t understand the things necessary to change the format of the list variable, how to call the text file into existence with permissions and have AppleScript write to that file.

limits – I’ve stumbled upon this analysis problem and I can’t figure it out from where to start

So basically I’ve stumbled upon this problem and I have no clue where to start its proof:

Let $f$ :->$mathbb{R}$ be a function such that has the two following properties:
(a) $lim limits_{x to infty}f(f(x)) = infty$

(b) $lim limits_{x to -infty}f(f(x)) = -infty$

(c) $f$ has Darboux (intermediate value property).
Prove that:
(i) the limits $lim limits_{x to infty}f(x)$ and $lim limits_{x to -infty}f(x)$ both exist
(ii) is it possible that both of those limits are finite?
I could gladly take a hint at the moment, as I’m fairly out of ideas, and I tried using lower bounds and upper bounds and using reductio et absurdum, but to no avail.

How can I figure out which App has created certain folders/files?

I searched a lot but couldn’t find any direct answer.
There must be a way to figure out from which App a certain folder or file within /storage/emulated/0/ was created.