Only half of the graph is shown when rendering from image-charts URL - image-charts

When using image-charts with the URL below - only half the graph is being drawn. This used to work a few days ago just fine - did something recently change?

Missed this important information from the documentation https://documentation.image-charts.com/reference/chart-axis/#custom-axis-labels
Note: Do not place a pipe after the final label in the chxl parameter
In the half graph version, I had one trailing pipe in the chxl parameter:
https://image-charts.com/chart?cht=lc
&chd=t:17.7,17.7,17.6,17.5,17.4,17.3,17.3,17.2,17.1,17.3,17.6,17.4,17.2,17.1,16.9,16.8,16.8,16.7,16.6,16.5,16.4,16.4,16.3,16.3,16.2,16.2,16.1,16.1,16,16,16,16,16,15.9,15.9,15.9,15.9,15.9,15.9,15.9,15.8,15.8,15.8,16.7,16.9,16.6,16.5,16.4,16.2,16.1,16.1,16.1,16,16,16,16,16.6,16.7,16.6,16.5,16.4,16.4,16.4,16.4,16.4,16.6,17.3,17.3,17.2,17.1,17,16.8,16.8,16.7,17,16.9,16.8,16.7,16.6,16.5,16.4,16.3,16.2,16.2,16.3,16.3,16.2,16.2,16.3,16.3,16.3,16.2,16.4,16.3,16.5,16.7|66.6,64.8,62,60.9,60.5,60.7,60.6,60.4,60.4,62.9,61,60.2,60.1,60.2,60.2,60.1,60.1,60.2,60.3,60.3,60.3,60.3,60.5,60.6,60.5,60.6,60.9,60.9,60.9,61.2,61.5,61.6,61.8,62.2,62.4,62.5,62.7,62.7,62.8,62.6,63.2,63,63.1,62.3,62.4,63.9,63.8,63.2,61.8,62.9,64.8,61.5,60.1,58.3,59.7,59.8,62,62.5,59.8,58,56.9,56.3,56.3,56,55.6,59.8,63.1,56.1,53.9,52.7,52,51.4,51.8,52.4,53.2,53.1,53.4,53.8,54.3,54.6,54.9,55.2,55.5,61.7,61.6,59.2,58.8,59.4,61.8,60.2,59.8,59.3,66.7,64.2,74.4,76.3
&chds=a
&chof=.png
&chs=999x800
&chdl=Temperature|Humidity
&chg=20,4
&chco=2196F3,FF5722
&chtt=Temperature Humidity Chart
&chxt=x,y
&chxl=0:|21:15||||22:15||||23:15||||00:15||||01:15||||02:15||||03:15||||04:15||||05:15||||06:15||||07:15||||08:15||||09:15||||10:15||||11:15||||12:15||||13:15||||14:15||||15:15||||16:15||||17:15||||18:15||||19:15||||20:15|
&chls=3|3
&chdlp=b
&chf=bg,s,FFFFFF
Changing this so there is no trailing pipe in the chxl parameter fixed the issue:
https://image-charts.com/chart?cht=lc
&chd=t:17.7,17.7,17.6,17.5,17.4,17.3,17.3,17.2,17.1,17.3,17.6,17.4,17.2,17.1,16.9,16.8,16.8,16.7,16.6,16.5,16.4,16.4,16.3,16.3,16.2,16.2,16.1,16.1,16,16,16,16,16,15.9,15.9,15.9,15.9,15.9,15.9,15.9,15.8,15.8,15.8,16.7,16.9,16.6,16.5,16.4,16.2,16.1,16.1,16.1,16,16,16,16,16.6,16.7,16.6,16.5,16.4,16.4,16.4,16.4,16.4,16.6,17.3,17.3,17.2,17.1,17,16.8,16.8,16.7,17,16.9,16.8,16.7,16.6,16.5,16.4,16.3,16.2,16.2,16.3,16.3,16.2,16.2,16.3,16.3,16.3,16.2,16.4,16.3,16.5,16.7|66.6,64.8,62,60.9,60.5,60.7,60.6,60.4,60.4,62.9,61,60.2,60.1,60.2,60.2,60.1,60.1,60.2,60.3,60.3,60.3,60.3,60.5,60.6,60.5,60.6,60.9,60.9,60.9,61.2,61.5,61.6,61.8,62.2,62.4,62.5,62.7,62.7,62.8,62.6,63.2,63,63.1,62.3,62.4,63.9,63.8,63.2,61.8,62.9,64.8,61.5,60.1,58.3,59.7,59.8,62,62.5,59.8,58,56.9,56.3,56.3,56,55.6,59.8,63.1,56.1,53.9,52.7,52,51.4,51.8,52.4,53.2,53.1,53.4,53.8,54.3,54.6,54.9,55.2,55.5,61.7,61.6,59.2,58.8,59.4,61.8,60.2,59.8,59.3,66.7,64.2,74.4,76.3
&chds=a
&chof=.png
&chs=999x800
&chdl=Temperature|Humidity
&chg=20,4
&chco=2196F3,FF5722
&chtt=Temperature Humidity Chart
&chxt=x,y
&chxl=0:|21:15||||22:15||||23:15||||00:15||||01:15||||02:15||||03:15||||04:15||||05:15||||06:15||||07:15||||08:15||||09:15||||10:15||||11:15||||12:15||||13:15||||14:15||||15:15||||16:15||||17:15||||18:15||||19:15||||20:15||||21:15
&chls=3|3
&chdlp=b
&chf=bg,s,FFFFFF
Great that I have managed to fix it moving forward 😀 but not great for all the hundreds of half charts 😔

Related

How can I increase the line length in Atom with prettier-atom?

When my lines run a bit too long, saving the file auto-formats the code into multiple lines. I've spent more than I care to admit figuring out how to increase the line length to avoid multiple lines yet nothing seems to work. It seems like Atom doesn't want to pick up any of my config files. I have a ~./prettierrc file that's not recognized. And is printWidth the right option to use?
What's the easiest way to do this?
I had to restart Atom for the changes to take effect. https://github.com/prettier/prettier-atom/issues/489

How does one use a CDSView with MultiLine on GMAPPlot?

(First Question so apologies)
Bokeh 1.3.4
Situation:
I am trying top map a Bokeh MultiLine using a CDSView and all the existing examples seem to use the "figure" object which has a helper (multi_line) which accepts a view as an argument. I am doing this on top of a GMAPPlot which does not support multi_line (only MultiLine) (see below). The commented out line throws an error saying GMAPPlot does not support multi_line.
plot = GMapPlot(
x_range=Range1d(), y_range=Range1d(), map_options=map_options, sizing_mode='scale_height'
)
.
.
.
sel_sa1s = []
v_bf = [True if sa1_val in sel_sa1s else False for sa1_val in v_source.data['SA1']]
v_view = CDSView(source=v_source, filters=[BooleanFilter(v_bf)])
v_ml = MultiLine(xs="xs",ys="ys",line_color="black", line_width="w")
#v_rend = plot.multi_line(xs="xs",ys="ys",line_color="black", line_width="w", source=v_source, view=v_view)
v_rend = plot.add_glyph(v_source, v_ml, name='votes')
The snippet shown above works and maps the entire network (very crowded) because there is no filter. What I want to have happen is for the filter to be initialised to hide everything then when the user clicks on an area (SA1) it will display the network related to that SA1.
Actually I can do that but only one area at a time and it would be much more efficient to be able to load the whole map and use a filtered view to control which sub-networks are displayed.
It seems that GMAPPlot only likes the pattern:
create glyph
add glyph
So, my question is - how does one use a CDSView in this environment (how does one add it to the renderer?)
Screenshot of unfiltered data set
It seems that GMAPPlot only likes the pattern:
create glyph
add glyph
That has not been true for some time. There is a higher level bokeh.plotting.gmap function that creates and configures GMapPlot instances with deafult axes, etc, and also has all the same methods and conveniences as figure (e.g. multi_line). It will be much less work to go this route than assembling everything by hand from low-level objects.

Dimension value_format callback not working properly

This is a new question related to a previous question I asked:
holoviews can't find flexx when using a Dimension value_format callback
Thanks to downgrading my version of flexx, I am no longer getting the warning message. However, the callback function is not working. Here is the code:
%%output size=200
%%opts Curve [width=600 height=250] {+framewise}
%%opts Curve.Load.Ticket (color='red')
def xformat(x):
# update the default tick label to append an 'a'
new = x + 'a'
return(new)
kdims=hv.Dimension('Day Section', label='Week Day and Hour', value_format=xformat)
tload = hv.Curve(simple_pd,vdims=[('Max Ticket Load', 'Maxiumum Ticket Load')],kdims=kdims,group='Load',label='Ticket')
tload
When I run with the above code, I expect to see the same amount of x axis tick labels, however, each label should have an 'a' appended to the end. However, what I am seeing is no rendering of the element at all in my notebook. I have tried a number of variations of modifying the value, and the same thing happens.
Strangely, the issue appears to be the use of the variable name new in the xformat function. If I change the name of the variable it works fine. It doesn't appear as though new is a reserved work in python though, so I am not sure why its causing a problem.
Note that using the matplotlib extension does not have the same problem, only Bokeh.

Making a TIME SERIES graph THAT SCROLLS WITH THE DATA in R

I need to do exactly the graph that has been made on this page (the second one)
http://www.animatedgraphs.co.uk/line.html
Here is my actual code :
timemax<-151737 # number of frames (and observations - so no interpolation needed)
setwd("C:/Users/victo/Downloads/ffmpeg/ffmpeg/bin/")
vis<-100 # how many time points are on the screen at one time
gdata<-data.frame('Temps'= data$time,'RH_Xacc'= data$RH_Xacc)
gname<-paste("g",1:timemax,".tif", sep="") # holds the names of the picture files
right<-(((1:timemax)<=vis)*100)+(((1:timemax)>vis)*1:timemax) # rightmost time on screen
left<- right-vis+2 # leftmost time on screen
leftlab<-200*ceiling((left-1)/200) # leftmost x label
rightlab<-200*floor(right/200) # rightmost x label
# draw graphs
for (i in 1:timemax) {
tiff(gname[i],width=480)
plot(gdata$Temps[right[i]:left[i]],gdata$RH_Xacc[right[i]:left[i]],col="red",type="l",ylim=c(-100,200),xlim=c(right[i],left[i]),xaxt="n",ylab="",xlab="time")
axis(1,at=seq(from=rightlab[i],to=leftlab[i],by=12))
lines(gdata$Temps[right[i]:i],gdata$RH_Xacc[right[i]:i])
dev.off(dev.cur())
}
# call FFMPEG and make the video
shell("C:/Users/victo/Downloads/ffmpeg/ffmpeg/bin/ffmpeg.exe -codecs -i g%d.tif -b:v 2048k gdata.mpg",mustWork=FALSE)
My code seems to work until the shell function. I don't get an error. The code just never stops running. I am not able to get the video with all the data. Can someone tell me where is the problem ? How can I get the video or if there is an other to get the same result ? I've tried the library gganimate but i didn't succeed either... I am doing this in Rstudio and using sweave.
Thanks a lot
Actually, the first thing you should do is probably run the command :
C:/Users/victo/Downloads/ffmpeg/ffmpeg/bin/ffmpeg.exe -codecs -i g%d.tif -b:v 2048k gdata.mpg directly and not with a calling shell from RStudio. You would have a more verbose output.
Original post
Do you have any CPU performance profiling tool ? I suspect that the shell command might take a lot of time to run on your computer since in your example : timemax<-151737 whereas the example has a shorter timemax timemax<-1000
Try your program with a low value of timemax (=1000) and time the execution of the code. I guess you could extrapolate the total time needed to execute multiplying by 150 (I am not an expert of ffmpeg, it might actually be longer)

Directions API overview_polyline doesn't have correct points

Has anyone had an issue with the points returned by the Google Directions API? The overview_polyline doesn't seem to match the directions I've asked for.
The Directions API gives the example:
http://maps.googleapis.com/maps/api/directions/json?origin=Toronto&destination=Montreal&sensor=false
In the JSON response I see includes:
"overview_polyline" : {
"points" : "e`miGhmocNaN~DiBiNe#gEkEek#kNez#cJqq#sk#pGos#v]_}#aF_y#qm#qDe~#w]g~#gZ_Jo_#m_#yNsFgUpMov#~QebBrJq`BjTsx#w#kOqbEq_#qkCcf#}}Dej#yzCuf#o{Ba]m~EtVewAnBa`#sNmm#}dDufGqwA_|D_z#g~CmtBkuOrBmtCyG_yCam#{`Ee]qkB}d#ucDmDe|A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ding this using the Interactive Polyline Encoder Utility shows a path starting in Toronto as expected but going a different direction with an end point nowhere near Montreal.
Any ideas?
For background, I'm trying to use the polyline to generate a static map. The static map API allows passing encoded polylines.
I have had success using Mark McClure's tools:
http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/
on archive.org
Your polyline works for me when I use this tool to decode it:
http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/decode.html
on archive.org
and this to display the results:
http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/encodeForm.html
on archive.org
Encoded polylines often have issues with "\" escaping the next character.
See this example [1] (can't seem to get it to display as a link)
with each '\' changed to a single '\'
From this issue where it does display as a link.
[1] http://maps.googleapis.com/maps/api/staticmap?size=400x400&path=weight:3|color:blue|enc:cyrdIzsee#dOiBpG~j#bA%60t#mGxu#y#xl#pDdTtOnrAtRg#~J|AdHcI~Dpn#dIbwAhY%60Yde#rxBld#d%60B~LpkAzXvtB%60]rt#n_#bqAlo#vw#|NxrApYv{#%60R%60o#hHvqA|i#blE|iArhDdaAvwFz[vkCfsAl{Ei#f_#gYb}#aNtq#rAfv#nRx_Ajg#xbBnQtXnh#%60d#jz#xe#p\pt#pVrY|e#pO%60vAjwAxhAj%60Bj_AzcEvG~c#[ht#yMfz#tIhlDnv#nwIvDfmCiPlrCj#%60sCf]%60vEtVnvCfYzcAfYt_#zUlNtbArWbb#nm#fR~pAsBhqClGjlBj]zxCjo#lbD~a#%60gAzc#ft#lf#faBt]jhAluAjfCntAjlBjk#jWbZvEn^nRxTdWldArsAxWjz#zHhoBuEryCkWrbAwIn_A%60SbhBx\tbBbZpz#hy#pdBzNfm#|Cdq#fKtjAbM~Xf_#dXh}#tArv#h[|pAbb#%60_#nKf_#pYxb#bx#bh#hbAlkAr_BrNjJ|d#dE~|#jJ%60iBfWjhBgs#jr#rEbvAbhAdUfQdU%60Ete#iCrk#aWlXiN%60%60#wFl\dIzVdUz\ls#hw#|fAh|#|pAfiAbnAp|#v{A~[rhAzUhQpf#pG~r#lSdo#te#~T|\bv#jwApf#tsAvj#l~Bfh#fyA|v#nhBdmA~dBdy#vdBz%60#hlB~[~oBbo#znAxsCzbC%60%60#bs#pm#zo#nq#ly#dm#peApi#rr#lo#pXzl#jm#vh#~_A|}AboBle#lh#|_#rOzh#yQfb#oR%60k#%60#lf#nV~p#~u#nl#xpAvnAdgBpq#~\~n#bD%60%60A_A||#fKlzCre#x|BcHbo#hPff#ze#hYbsAps#pgA~p#pgAvYlt#b~#|kDzThe#%60b#%60^zeAntBv%60#%60dAxSvrBhm#hyFfTriA~DjkA~\%60fClo#jeDnS~b#zZfcA|k#j_Cv%60AznCrv#fnAjl#vt#fcAl|#pl#%60dApb#~o#~Mb\zUbUxf#zJtXHf_#g[j\sa#hg#cP%60nAsM%60_BmBpk#_Kz_#sOft#{G~a#%60C~f#cGjj#mTlc#sKl^hGdn#bv#na#pRni#vNzf#re#~qAngAr}Al{#l~#hIt_AfLpyBzvArcAvjAdkBndAtt#faA~x#jv#dkAhy#%60h#hr#jZjWpv#t\bd#xIr\rGrZc%60#d[ad#rIa%60#dT{KhQdLnKfTnOvUdUBje#qQdYrPlRnU%60HbANrGaNbu#jR|jDvAzhChEnUjJtbA}Af[l#|\lKvQMtLtFhh#fHlh#_DZ_BmO&sensor=false
Here is your line on a static map (after changing \\ to \):
http://maps.googleapis.com/maps/api/staticmap?size=400x400&path=weight:3|color:blue|enc:e%60miGhmocNaN~DiBiNe#gEkEek#kNez#cJqq#sk#pGos#v]_}#aF_y#qm#qDe~#w]g~#gZ_Jo_#m_#yNsFgUpMov#~QebBrJq%60BjTsx#w#kOqbEq_#qkCcf#}}Dej#yzCuf#o{Ba]m~EtVewAnBa%60#sNmm#}dDufGqwA_|D_z#g~CmtBkuOrBmtCyG_yCam#{%60Ee]qkB}d#ucDmDe|Aha#e}At]{v#xD}e#yf#aeIm^{rEgp#ahBiZu%60BkVueH}gDwuXu%60Fi__#yZecHgoAgyIl[ybCo^sgD_n#akBaJmeBog#yyAe%60#ayB~FifCjNkmAzTwpAgf#cpFy~#{lJsg#ojHyi#e_Fq}#o%60Dog#}tBoYmz#y%60#sf#qf#ohCkLugBuv#seAg[ul#mMowBqc#iiC}eAcwCqm#_fBmuAypFyIiqA}BwyBy%60#ogAwt#ypBezC{dIahBwxJgb#ytCw~AwvJkQwu#{t#yrCg{#s{Fgb#ehDzKsdAxO}vAiRmpCwcAorNuwAgdS_r#imJq[orAk]wrA_TyzAnFefAa\guB_OmwAwF{tCwMcbDcr#m}_#}Qo_RgMo|A|d#kpAne#u{Brb#wnDzNkuB_D{v#eSgf#w\ieAyb#guCii#ifCga#i_Amc#m]urAyoD}o#kiIsr#opQuLkhAc_#q%60Bq\}bEeEyi#iE}t#pHi|#tBmlBebB{qHq_BinFoWgpBoDuqEob#k{ConAedC}L}h#yd#yfAgz#}gAaZi_#m}#mcBwyAaj#_bBg|#csBm_Bo|BkaC{iBqsB_YqyBxEmtBks#aoB{RgLa~#bCcr#cLyoAemBeg#gt#_}#e%60#on#uu#etA}vCqp#ubAklDgeGmxFiqHaqFoeHa[wbBu]}gAuoDeeG{uAooB_uAsy#om#ugAu_L{xSshEe_KieDm|KcfIcuWeUcOwy#aP{QuUg%60BipF{P_l#klAgaEmjEs}NsvAiyFs}#izFjwAqrGtHkbCeB{cEql#g~CgSk|#mB}oAqNekEgw#cmDo_BgjFqqC}gH}%60CwvG}cA{cB}nFowQ_t#an#efBmpE_oAsvCka#mwBk_CqbGuu#qfB{uAmrDivDw|E{nAqbDmpCyaJgdCejHk~#owAsw#adAm_#abA}Ven#qCou#cKeiBca#_cBmlAyjAsn#_kCk}#smDkVg{Bk}#gcHox#_sEaPwdC~KazF{EcpCrEmeGl]auBeEi~#yiAovCwwAgsC{i#oSsbAu~Ay_AmaBk_#iKak#mh#_BmBk#wHvG#dBvA&sensor=false
The Google APi have a parameter now: path=enc:
"https://maps.googleapis.com/maps/api/staticmap?
size=300x300&key=YOUR_KEY&path=enc:" + direction.routes[0].overview_polyline
Focus on offical guides

Resources