« first day (662 days earlier)      last day (3831 days later) » 

drN
2:59 PM
The town I live in gets about 7-8 months of heavy snow a year. The population of the town is quite small too (~7000) people. So the town goes about clearing snow off the roads in a generally inefficient manner. I was planning on suggesting, as an exercise, at the next town hall meeting that we should look at a PERT/CPM (network chart) approach for clearing snow. Has anyone done something like that with mathematica?
 
3:55 PM
7-8 months of heavy snow a year?! northern russia, canada, alaska, greenland or what?
 
@kirma Hehe, when someone from Finland says you have too much snow, that's when you know things are really bad :P
 
@rm-rf Yes :)
Let's say 7-8 months of snowing on level that demands clearing the roads regularly is pretty hard to find in Finland (but at the same time, Southern Finland is probably the warmest place at its' latitude - and not awfully rainy (compare with those places that get several meters of snow regularly).
I've been observing the problem that's common in Finland: sand dunes on highways. Just that those dunes are snow in Finland, and I eyed dunes in Oman...
 
hhh
4:50 PM
I cannot understand why the following loops -- for-loop and Table -- work totally differently.
I try to do the totally same thing, I only rewrote the looping below with Table but I am getting totally different output -- why?
@kirma kuinka kokenut Mathematican käyttäjä olet? Hieman jumisa yhdessä ongelmassa ja asun itsekin Espoossa, voisin tarjota kyl kahvit ja mul on auto käytössä, aikaa?
(just asked in Finnish whether Kirma around, he looks to live closeby and stucked to very simple Mathematica thing that I have already done in Matlab and now trying in Mathematica: now bug with the odd looping)
What is the difference between the following things For[ii=1,ii<100,ii++,Hello[ii]] and Table[Hello[ii],{ii,1,99}]?
Moved a question here about the For-looping and Table-looping.
 
5:06 PM
For will evaluate them and return Null. Table will evaluate them and return a list containing all 99 results.
 
hhh
@MichaelHale Yes but the example in the question shows vice versa: the Table returns nulls. I cannot understand the Null return.
 
Print returns Null. So a tabling Prints will get you a list of nulls.
 
hhh
@MichaelHale If "Print returns Null", why is the For-loop-print-example not returning Nulls?
 
If it is just a single Null outside of a list that is returned, nothing is shown, which is what happens in the For.
It is returning Null, but it is printing results before it returns Null. If you passed that For into another function it would only get Null. It would not see the numbers that were printed.
Table[Print@i; i, {i, 10}]
That prints them as it does each iteration and returns the list of results.
Monitor might be more appropriate for what you want though.
 
5:37 PM
@hhh Lähinnä leikin sillä... tällä hetkellä olen kylläkin Dubaissa...
 
hhh
@kirma Okei sit menee kyl ens kertaan, en ole kyl itsekään Suomessa kauaa :D
 
@hhh OK...
 
6:15 PM
@hhh oh, o.k.
 
Is there a way to change the base font for graphics one and for all? "From now on, please only use Helvetica, not Times".
SetOptions[Graphics, BaseStyle->{FontFamily -> "Helvetica"}] will only affect Graphics when used directly, not when generated e.g. through Plot.
*once
 
hhh
@YvesKlett Genau :)
I always forget simple things: "What was the way to select Nth column?"

Not working for the 1st col, A = IdentityMatrix[10]; A[[: , 1]], I have done this many times earlier but cannot find how -- I am able to select rows but not certain columns.
 
hhh
7:20 PM
(ERR solved A[[All,1]] -- too much thinking in Matlab...)
 
@Szabolcs TicksStyle overrides BaseStyle, I think. Assuming that's what looks wrong with Plot.
 
@MichaelE2 Thanks! Actually just Plot's BaseStyle will override Graphic's BaseStyle, and I also want to change all other fonts, including axes labels, frame labels, frame ticks, any Text[] primitives, etc. It's possible to do it by adding the appropriate styles to each plotting functions, but I was hoping for a simple one-time solution.
But it's not a big deal.
Does anyone know what method options are available for FindRoot for multivariate numerical blackbox functions, and what is the default for this case?
Hm, there's more info on this here: reference.wolfram.com/mathematica/tutorial/…
In fact pretty much everything about FindRoot methods is documented there.
 
7:51 PM
@Szabolcs See if this does what you want:
    $DisplayFunction =  Show[#, BaseStyle -> {FontFamily -> "Helvetica"},
         DisplayFunction -> Identity] &
Might do too much, I suppose. I don't play with the system settings very much.
 
Clever! :-)
 
 
1 hour later…
9:08 PM
@Szabolcs why did you remove your question about ListPlot3D? You found a solution?
@Szabolcs Did it work the way you wanted just by tweaking the RegionFunction?
 
@PlatoManiac Yes, I found the same solution rm posted in a comment, and though the question too simple ... It's not an ideal solution, and it doesn't give me very nice plots, but it's quick and it's good enough for now.
@PlatoManiac Do you need me to undelete it so you can post an answer?
 
I missed that comment. What is it?
 
Eventually I might post a proper solution using a constrained Delaunay triangulation
@PlatoManiac Interpolation + Plot3D
(+ RegionFunction)
 
Another possibility will be to modify the triangualtion mma is creating. I was going in that direction.
 
the regionfunction in my case is based on testing whether a point is in a polygon
 
9:16 PM
Yep I also thought so
 
OK, I'll undelete it, let me just find it again ..
@PlatoManiac here you go
 
Thats good. I cant promise when I will have the solution I am thinking of but you can later also post yours
with modified Delaunay triangulation
bye for now!
 
10:08 PM
@Szabolcs Cell[StyleData["Graphics"],
FontFamily->"Helvetica",
FontSize->16,
FontWeight->"Plain",
FontColor->RGBColor[1,0,0]] will style all your `Graphics` head output, including `Plot`
 
@MikeHoneychurch Thank you!
 
Note that inseting BaseStyle in GraphicsBoxOptions doesn't work. I think this is because the Core style has fonts specified and must override. ...and using stylesheets to customize your notebook appearance is a more conventional way of doing it
 
@MikeHoneychurch I tried it and it's impossible to insert BaseStyle there. Your suggestion is very useful, it also affects graphics Exported from that notebook. Maybe it would be useful to make a question/answer out of it
 
You can type GraphicsBoxOptions->{BaseStyle->Directive[FontFamily->"Helvetica"]} but like i said because the font type is explicitly specified in the parent style in core.nb I think this is taking precedence. Stylesheets are very useful :)
 
@MikeHoneychurch Would you like to post that answer? I would have a make a note of this anyway, so I'll have it handy in the future. I might as well do it here on M.SE.
 
10:17 PM
ok I'll post and answer. easier to do it there in more detail
 
I guess you can just say, "put this in the stylesheet: ..."
 
i thought i might explain a bit about why SetOptions wasn;t working for you. it is certainly not obvious why it isn;t working. ...actually maybe you could make that part of the question
 
@MikeHoneychurch Sure, if you have time, that would be great. I'll mention in the question that I tried that.
 
10:36 PM
@Szabolcs ok posted. let me know if you want me to clarify anything in the answer.
 
11:14 PM
@Szabolcs The problem with the dataset seems to be that you're using the convex hull for a non-convex region
Finding the correct polygon (somehow) will give you a nicer plot. This is the closest I can get to...
 
@rm-rf the points I sent should be in a convex region ... but when I do the x -> x^2, y -> y transformation on them, they're not any more.
 
@Szabolcs Right, and that's what you're plotting in the first DensityPlot image, right?
 
@rm-rf Yes, in both actually.
 
I haven't been able to untangle the crossings towards the narrow end
 
I didn't have a problem with crossings ... wait a min ...
 
11:17 PM
@Szabolcs In the first, the density plot seems to be restricted to this non convex region
 
Taking the set of points I sent, this is the region I want to restrict the density plot to:
hull = ConvexHull[points]; Graphics[GraphicsComplex[({Sqrt[#1], #2} & @@@ points), Polygon[hull]], AspectRatio -> 1]
hm
 
@Szabolcs Which is essentially the non-convex region above (minus the crossings)
This is not the convex hull of the original set of points, nor the convex hull of the transformed set.
 
Yes, exactly. THat's why ListDensityPlot won't work.
Practically I'd like to have what ListDensityPlot gives me, clipped to that black region.
 
@Szabolcs It will work if you give it the right polygon... this is what I was trying to do above. I think the crossings can be avoided by coding up a custom distance function
It's all about the ordering... I have the set of points for the polygon, but the ordering is a little messy.
 

« first day (662 days earlier)      last day (3831 days later) »