« first day (920 days earlier)      last day (3554 days later) » 

2:13 AM
Hi all!
Does anyone know how to mix map backgrounds in v10?
Take e.g. the coordinates pos = GeoPosition[{44.544000000000004, -110.421`}];`
Then GeoGraphics[{Point[pos]}] shows the lake, river and road. GeoGraphics[{Point[pos]}, GeoBackground -> GeoStyling["ContourMap"]] shows the contour map. What I want is all of lakes, rivers, roads, elevation contours and contour labels.
 
2:28 AM
@Szabolcs Idea: Instead of just one point, select two points and use them to create a rectangular region. This polygon can be drawn twice as in the example in GeoStyling with the description "Specify different geo styles for different regions with partial overlaps"
 
@Pickett I'm trying to do something like that, by extracting the GeoRange and making a rectangle now. The Rectangle doesn't get styled correctly though. I'm trying with polygons now instead of a Rectangle.
 
ok
 
@Pickett Have you worked with TimeSeries objects in v10? I'm a bit lost.
@Pickett GeoStyling just doesn't seem to work for Rectangle. Can you reproduce?
{a, b, c,
d} = {{-110.65212795831836`,
44.378706059881495`}, {-110.65212795831836`,
44.70928997027006`}, {-110.18987204168164`,
44.378706059881495`}, {-110.18987204168164`, 44.70928997027006`}}
GeoGraphics[{GeoStyling["ContourMap"], Rectangle[a, c]}]
 
@Szabolcs Haven't tried TimeSeries yet no, but I agree about Rectangle.
 
@Pickett What does the above give you? First it gave me a black one. Now it gives me a transparent rectangle. Weird.
 
2:41 AM
@Szabolcs I get that image, the problem being that it doesn't matter what GeoStyling I choose.
So transparent I guess, yes.
 
@Pickett Sorry, it was my fault. It should be Rectangle[a,d], not Rectangle[a,c].
 
OK, now I get the black square.
But all their examples use Polygon, I don't know if it's intended to work with Rectangle. For example in order to get a disk we don't use Disk[], we use GeoDisk[].
 
I think that's because GeoDisk might not look circular depending on the location and the projection. OK, it makes sense, but it's confusing.
@Pickett You're right, it's documented that it only works with certain primitives: reference.wolfram.com/language/ref/GeoStyling.html
ahh, kernel keeps crashing randomly for no reason
even if I don't touch Mathematica
 
So GeoGraphics[{GeoStyling["ContourMap"], Opacity[0.5], Polygon[{a, c, d, b}]}] is probably the right way to go about it, but the background of the contour map must be fixed.
 
2:57 AM
@Pickett I'm too frustrated with this, I'm going to post a question. GeoStyling fails on polygons if I change the projection.
 
@Szabolcs GeoGraphics[{GeoStyling["ContourMap", ContourShading -> None],
Polygon[{a, c, d, b}]}]
 
@Pickett Yes, that's what I have, but the projection breaks it ...
 
It's a little bit buggy like the rest of MMA :)
 
0
Q: Geographic background containing both outlines and contours: how?

SzabolcsI would like to create a map which will show lakes and rivers together with elevation contours and contour labels. What is the simplest way to do this with GeoGraphics in version 10? The solution I have (below) looks much too convoluted. I need to plot this point on the map: pos = WeatherDa...

 
 
2 hours later…
5:18 AM
@halirutan what is an elegant way to compare two vectors and generate a minimum vector?
 
6:00 AM
@xslittlegrass any ideas on efficient way to compare two vectors and generate the minimum vector?
 
 
3 hours later…
8:38 AM
Looks like this bug has been fixed in 10:
13
Q: How to embed an image into a string?

Vladimir ReshetnikovNote: The bug described in the post is in Mathematica 9, and has been fixed in 10.0. The documentation for String contains the following statements: Strings can contain any sequence of ordinary and special characters: … Strings preserve internal formatting: … Strings can have any exp...

 
 
6 hours later…
2:52 PM
@brama MapThread[Min, {v1, v2}], or perhaps Compile[{x, y}, Min[x, y], RuntimeAttributes -> {Listable}][v1, v2], if the vectors are real and long?
 
3:31 PM
Do we agree that this is a bug? I cannot see why selecting cell contents versus cell frame should change the format used by Save Selection As.
4
Q: Why do quote marks appear in output when saved with Save Selection As?

Mr.WizardUpdate: As Simon Woods astutely observed this problem only occurs when you select the cell contents rather than the entire cell via the bracket. Those two tested this and reported, please check again selecting only the contents and see if the behavior appears. In version 10 quote marks (i.e. ...

 
 
2 hours later…
5:24 PM
@MichaelE2 Thank you. I wrote it as a compiled function as you suggested earlier in a response (mathematica.stackexchange.com/a/50799/11116), but was wondering if it can be made listable any other way.
 
5:41 PM
@MichaelE2 and @Mr.Wizard: curious if one can formulate a Min like in mathematica.stackexchange.com/a/17087/11116
 
@Szabolcs Yep. I had include balphas pull request and rebuilt the rest.
 
 
1 hour later…
7:47 PM
@halirutan I know you merged the pull request, just wanted to let you know about the response on meta.
 
 
1 hour later…
8:52 PM
Hello people
 
@Rojo hi Rojo
 
@SjoerdC.deVries Hey Sjoerd, hows all?
 
@Rojo Fine. On vacation now.
And you?
 
@SjoerdC.deVries Ah, good. summer there
Im also ending a week vacation
Tough week, but all is normal now
@SjoerdC.deVries How are you using your days off?
 
@Rojo I'm just starting. Bretagne (Brittany) for two weeks.
Spent last week mostly oiling my wooden floor
Where did you go?
 
9:05 PM
@SjoerdC.deVries France, right? Never been ther
I stayed in buenos aires. My grandma passed away so
My brother had travelled far by car the previous 2 days, had to come back. My father had a week off planned too. We all stayed
 
@Rojo Yup, right. That's the part with the most moderate weather. My SO doesn't like it when temp>25 deg
@Rojo my condoleances
 
@SjoerdC.deVries Yeah, Id rather be a little cold than melt too
Thx
 
So, I guess it apparently happened rather unexpectedly?
 
@SjoerdC.deVries Yeah
@SjoerdC.deVries Woke up overhearing my grandfather leaving a message at about 7 am begging me to go because she seemed dead. She was old, and had a chronic lung thing, but she had it for decades
 
@Rojo he couldnt reach your father then, or do you live in the neighborhood?
 
9:13 PM
@SjoerdC.deVries I live in the neighbourhood, and was there 10 mins later
He then called my father who was there about 40 mins, he lives some 30km away
 
@Rojo difficult this. I remember the time my uncle ( my father's last surviving brother) died and i just visited him in hospital with my parents on vacation at a day distance.
suddenly, there's so much to arrange
 
@SjoerdC.deVries So you visited him alive and then he died with yor parents away?
@SjoerdC.deVries Exactly. At a time when you couldn't care less, you need to focus on arranging stuff
that neither me or my father ever cared to look up beforehand
Until you don't arrange everything, throwing many in every direction, they don't come and take the body
 
@Rojo I just walked in ( he had pneumonia) and he died 15 minutes later. Not what i expected, and the first death I ever experienced.
 
@SjoerdC.deVries That's harsh. Same here, first time
 
@Rojo Was you close to her?
 
9:23 PM
@SjoerdC.deVries More or less. I saw her every 3 weeks more or less, and she was there all my life, specially as a kid. Lately I just visited to have lunch and left. I mean, we didn't talk that much
but, she was always there. And she was ok such a short time ago... Plus, first experience with death, with the additive of having to see her, to take care of the issues, and even help move her when they took her away. The regrets. And, the new responsibility to see how my grandpa is doing. Iḿ the one that lives nearby.
 
@Rojo Grandparents are often such a constant factor that you'll notice them most when they're gone. When we visited them when I was young, I usually read the whole day.
 
Anyway, nothing out of the ordinary, I don't think deaths of people close can get better.
@SjoerdC.deVries Exactly
@SjoerdC.deVries It was only a couple of weeks ago when I had visited and was trying to leave from their place politely
because they wanted me to stay longer.
and that was the last time I saw her
Anyway, we all go through stuff like that and it sucks. Given that it happened, it couldn't have gone better
 
@Rojo ouch. I can imagine that with hindsight you feel you ought to have stayed longer.
 
@SjoerdC.deVries Right
Fortunately I had my holidays
 
My memories of my grandparents are fading a bit. I can hardly imagine their voices now. their passing is quite some time ago now.
Grandmother about 23 years ago, and my grandfather already more than 30 years. Never knew my father's parents. One died when i was 3 and the other died 3 months after my father was born.
 
9:34 PM
@SjoerdC.deVries I see. And both after your uncle
@SjoerdC.deVries How old where you when your uncle passed?
 
@Rojo Well, not really. That was much later. I may have been unclear about that. My uncle was the first one I actually saw dying, not the first death in my family in my experience.
I must have been around 35 or so.
 
@SjoerdC.deVries Ah, ok
 
@Rojo so, nearing adulthood ;)
 
@SjoerdC.deVries Welcome to reality, hehe.
Well, let's not make your hollidays creepy
@SjoerdC.deVries Thanks for the talk
 
@Rojo No let's not
 
9:41 PM
I'll go find some question to answer :D
 
Have to go to bed, indeed.
 
@SjoerdC.deVries See you around
 
10:37 PM
@brama I don't think I understand the question. What operation are you seeking to perform? If you are targeting performance I don't expect anything will beat Min in its direct application.
 
@Mr.Wizard I have to compare vectors/matrices and get a min vector/matrix. e.g. Min[{1,2,3},{3,1,5}] = {1,1,3}
@Mr.Wizard right now, Min function on vectors/matrices gives a scalar
 
10:58 PM
@Mr.Wizard I already explored the options of MapThread and a compiled function
 
@brama I see. I think that may have already been asked on the site. If I find it I'll let you know. If I don't I'll see what I can come up with.
 
@Mr.Wizard That will be great!! Thanks
@Mr.Wizard Can you better this ? UnitStep[(a - b)] b + UnitStep[(b - a)] a
 
@brama That should be fast. However you could improve it a bit by using explicit Subtract; see:
62
Q: Why are numeric division and subtraction not handled better in Mathematica?

Mr.WizardThere is something that has been troubling me for a while. At least in version 7, the performance of a / b and a - b is not equivalent to, and significantly inferior to, Divide[a, b] and Subtract[a, b], despite the fact that these are treated as equivalent in the documentation. As a terse code ...

 
@Mr.Wizard I was looking at mine..I think it is not working for reals..only integers
 
11:14 PM
@brama Ah, I suppose that's right. I haven't tested it yet as I'm working on a different problem. I will take a look at it later.
 
@Mr.Wizard I will read the post. Need to go out now...but will be back in a couple of hours. Will post my response then.
 
@brama Okay, see you later. :-)
 
11:44 PM
@brama I found it:
8
Q: Elementwise, compilable min function

Alex D.I am trying to implement efficiently a transfer-matrix like algorithm. On each iteration, I have two vectors $x=\{x_1,\dots,x_n\}$, $y=\{y_1,\dots,y_n\}$ with real numbers and I need to compute the vector $\{\min(x_1,y_1),\dots,\min(x_n,y_n)\}$. I tried four approaches for computing it: Uncompi...

As you can see I answered that question, and I used essentially the same method you did. At that time I did not know that Subtract[a, b] would be faster than a - b (who could guess) but otherwise I think I would do it the same way now.
 

« first day (920 days earlier)      last day (3554 days later) »