html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/788#issuecomment-196236838,https://api.github.com/repos/pydata/xarray/issues/788,196236838,MDEyOklzc3VlQ29tbWVudDE5NjIzNjgzOA==,22805,2016-03-14T10:09:45Z,2016-03-14T10:09:45Z,NONE,"Fantastic, thanks both. Hoping next time I can contribute a fix as well as an issue ticket! ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,139863868 https://github.com/pydata/xarray/issues/788#issuecomment-195499002,https://api.github.com/repos/pydata/xarray/issues/788,195499002,MDEyOklzc3VlQ29tbWVudDE5NTQ5OTAwMg==,22805,2016-03-11T19:00:27Z,2016-03-11T19:00:27Z,NONE,"I think the axes on the pdf are wrong as I used integers in the coordinate definition and Python 2 to generate the example. Redefining time as [1.0, 2,0, 3.0] gives a better plot. I should have done this in my example, sorry about that. I can do this in matplotlib and will do so, I guess I was little surprised that (a) it worked at all, and (b) it only worked in one orientation. I would expect the plots to look exactly like time vs. x, except the time axis is normalised by 'r'. My hope was that this would work, so I could do something like: temp.plot(x='rtime', y='x', col='r') and get an array of plots, each with their own timescales along the x-axis. For my analysis, time is seconds is not really that interesting, it's how it maps to the rotation timescale that matters. I realise this is probably not a normal use case, so thanks to both of you for taking the time to reply to my question! > On 11 Mar 2016, at 16:58, Stephan Hoyer notifications@github.com wrote: > > Honestly I'm a little surprised this doesn't error: dat.temperature.sel(r=2).mean(’y’).plot(x=’x’, y=’rtime’). The plot from your PDF doesn't seem to have the right y labels (rtime ranges from 0 to 2, but the highest label on the plot is 1). > > What would you expect these plots to look like? Can you do this in pure matplotlib instead of xarray plotting? I would guess the result you're looking for may be possible but it's not immediately obvious to me what plot should result from this code. > > — > Reply to this email directly or view it on GitHub. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,139863868 https://github.com/pydata/xarray/issues/788#issuecomment-195301004,https://api.github.com/repos/pydata/xarray/issues/788,195301004,MDEyOklzc3VlQ29tbWVudDE5NTMwMTAwNA==,22805,2016-03-11T09:52:09Z,2016-03-11T09:52:09Z,NONE,"That works, thanks. You say that it only worked by chance, is there a ""proper"" xarray-way that I should be doing this? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,139863868 https://github.com/pydata/xarray/issues/788#issuecomment-194904488,https://api.github.com/repos/pydata/xarray/issues/788,194904488,MDEyOklzc3VlQ29tbWVudDE5NDkwNDQ4OA==,22805,2016-03-10T15:26:53Z,2016-03-10T15:26:53Z,NONE,"yes, in some sense, but it doesn't need to infer. I'm explicitly telling the plot command I want to use 'x' and 'rtime' as the axial coordiates in both examples in my notebook. It does the right thing when y=rtime; it gives an error when x=rtime. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,139863868 https://github.com/pydata/xarray/issues/788#issuecomment-194860550,https://api.github.com/repos/pydata/xarray/issues/788,194860550,MDEyOklzc3VlQ29tbWVudDE5NDg2MDU1MA==,22805,2016-03-10T14:09:15Z,2016-03-10T14:09:15Z,NONE,"my use case is that `rtime` is kind of like normalised time. `rtime` is implicitly linked to temperature via `time` and `r`, no? I'm running many simulations with varying rotation period `r`. `time` is just clock time in seconds; what I want to plot is time in terms of revolutions i.e. time/r. It works just fine with `rtime` along the y-axis, but I would like it along the x and there it fails as the length of the coordinate seems to have changed. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,139863868