vega

How to render Altair / Vega in a PyQt widget

不羁的心 提交于 2021-01-27 22:07:18
问题 Is it possible to have Altair or Vega(-Lite) render to a PyQt widget, similar to Matplotlib supporting multiple backends? I know I can use a Qt WebView widget to render a web page with Vega-embed, but I want to prevent the overhead of having to serve this, even if locally. 回答1: The best option to visualize a plot with Altair is to use QWebEngineView since altair what is to create javascript code based on the instructions you set. IMHO the best solution is to obtain the html of the chart and

Altair Ridgeline doesn't create a plot with nominal groups

徘徊边缘 提交于 2021-01-27 17:30:44
问题 I try to create a Ridgeline plot in altair. Let's assume my dataframe consists of str and float columns: a object b float64 dtype: object with values like a b 0 25 2303.0 1 29 2676.0 2 18 2983.0 3 16 1489.0 4 21 3468.0 I used code from Altair gallery to create my chart: https://altair-viz.github.io/gallery/ridgeline_plot.html. My code with changed data and column names: import pandas as np import numpy as np source = pd.DataFrame(columns=list('ab')) source['a'] = np.random.randint(0,17,size

Correlation matrix not working in new version of Vega?

人走茶凉 提交于 2021-01-07 06:31:53
问题 I was using Elastic 6.6.0 and kibana 6.6.0, vega and vega-lite were not experimental, every thing works good. Now updated to elastic 7.6.0 and kibana 7.6.0 were vega and vega-lite showing experimental, also in version elastic 7.9.3 and kibana 7.9.3. First question, whether experimental can be used for production integration, because don't want that to be dropped out or something after integration. Second, I created a correlation matrix in kibana 6.6.0 Used following code { "$schema": "https:/

Can you dynamically set a color scheme and/or range in Vega-lite?

爱⌒轻易说出口 提交于 2021-01-05 06:29:38
问题 Is it possible dynamically define the color scheme range. For example, I have the below Vega-lite JSON for my color configuration. I would like to input the range below or an entirely different range depending on some condition on the data passed in. Is it possible to set a color range for a variable and dynamically select which one to use? Also if possible, how would you define the logic to select the appropriate color scheme. The logic is whether some condition on the data (value is present

Can you dynamically set a color scheme and/or range in Vega-lite?

你。 提交于 2021-01-05 06:28:47
问题 Is it possible dynamically define the color scheme range. For example, I have the below Vega-lite JSON for my color configuration. I would like to input the range below or an entirely different range depending on some condition on the data passed in. Is it possible to set a color range for a variable and dynamically select which one to use? Also if possible, how would you define the logic to select the appropriate color scheme. The logic is whether some condition on the data (value is present

TensorFlow2.4可以在MacBook Pro/Mac Pro上利用GPU做机器学习训练了

允我心安 提交于 2020-11-24 12:46:29
田海立@CSDN 2020-11-21 之前MacBook上TensorFlow只能利用CPU做训练,TF2.4开始可以利用GPU做训练了,并且不管是M1的MacBook Pro,还是Intel架构的MacBook Pro还是Mac Pro都是支持的。 Apple披露这一信息,并且po出性能对比数据 。 MacBook Pro上利用GPU训练 看下面的性能数据,对比了CPU数据、Intel架构的MacBook Pro以及M1架构的MacBook Pro: 结果显示:M1架构的训练性能比CPU提升了7倍;Intel架构的没那么明显。 其中的机器及软件配置: CPU是13-inch Intel架构的Macbook Pro,跑的是TF2.3 Intel架构的GPU加速机器以及M1芯片的GPU加速机器跑的是TF2.4 prerelease Intel架构的13-inch Macbook Pro的配置:1.7GHz 4核 i7 CPU + Intel Iris Plus Graphics 645 GPU + 16GB内存 + 2TB SSD硬盘 M1芯片的13-inch Macbook Pro的配置:M1(4核高性能+4核高效能CPU + 8核GPU + 16核Neural Engine)+ 16GB内存 + 256GB SSD硬盘 只是,M1里有NPU,这个有利用NPU吗,还是仅仅GPU