我是颤振的新手。有人知道如何在 flutter 中绘制图形网络吗?
下面是使用 d3js 的示例。我对不使用 d3js 的解决方案感兴趣,因此它可以在手机上运行。
谢谢
是否有任何 Jupyter 小部件可以在时间序列图上可视化与播放头同步的音频?
我想可视化从音频样本(例如频谱图和各种计算信号)导出的数据,聆听音频样本,同时看到播放头在绘图上移动。
我发现这个旧要点https://gist.github.com/deeplycloudy/2152643它在 Python 后端使用 pyaudio 来播放声音。有没有什么好一点的解决方案,例如,理想情况下完全基于 JavaScript 并且完全在浏览器中运行播放?
当我使用seaborn绘制点图时,x轴上的日期变成了这种奇怪的格式2020-01-06T00:00:00.000000000。在绘制此图形之前,“当前年份周结束”列中的日期将转换为 DateTime 对象。我的其他图表(线图)使用类似的输入和格式,但它没有这个问题,日期就像2020-01-06.
有谁知道如何解决这个问题?
*我在图中使用的total_us数据框和数据框是同一数据集的子集。sub在创建这两个子集之前,我转换了该大数据集的日期。total_us因此,和的“当前年份周结束”列中的值sub应具有相同的日期时间格式。
#create a pointplot to capture the variability
plt.figure(figsize = (8, 6))
sns.pointplot(x = 'Current Year Week Ending',
y = 'ASP Current Year',
hue ='Type',
data = sub,
markers=["o", "x"],
linestyles=["-", "--"])
plt.xticks(rotation=45, horizontalalignment='right', fontweight='light', fontsize='medium')
plt.ticklabel_format(style='plain', axis='y')
Run Code Online (Sandbox Code Playgroud)
#create a lineplot
plt.figure(figsize=(10,7))
sns.lineplot(x='Current Year Week Ending',
y='Total Bulk and Bags Units',
hue='Type',
data = total_us);
plt.xticks(rotation=45, horizontalalignment='right', fontweight='light', fontsize='medium')
plt.ticklabel_format(style='plain', axis='y')
Run Code Online (Sandbox Code Playgroud)
这就是sub看起来的样子,因此“当前年份周结束”列中的值类似于“2020-01-06”。我不知道为什么当我绘制点图时它会改变。

我正在尝试使用plotly 绘制甘特图。重要的是水平泳道可以有多个在时间上分开的条。
我找到了一个使用日历日期 (YYYY-MM-DD) 的示例,并尝试使用时间 (HH:MM:SS) 进行转换。但是当我使用时间戳时,所有内容都会聚集在一起,没有间隙。
import plotly.express as px
import pandas as pd
df = pd.DataFrame([
dict(Start='00:01:12', Finish='00:01:59', Resource="Alex"),
dict(Start='00:04:51', Finish='00:05:28', Resource="Alex"),
dict(Start='00:02:12', Finish='00:04:34', Resource="Max")
])
fig = px.timeline(df, x_start="Start", x_end="Finish", y="Resource", color="Resource"
)
fig.update_layout(xaxis=dict(
title='Timestamp',
tickformat = '%H:%M:%S',
))
fig.show()
Run Code Online (Sandbox Code Playgroud)
我想使用 ggplot按组获得镜像直方图,如下图所示。
library(ggplot2)
data2 <- data.frame(
type = c( rep("Top 1", n_segment),
rep("Top 2", n_segment),
rep("Bottom 1", n_segment),
rep("Bottom 2", n_segment)),
value = c( rnorm(n_segment, mean=5),
rnorm(n_segment, mean=12),
rnorm(n_segment, mean=-5),
rnorm(n_segment, mean=-12))
)
# Represent it
data2 %>%
ggplot( aes(x=value, fill=type)) +
geom_density( color="#e9ecef", alpha=0.6)
Run Code Online (Sandbox Code Playgroud)
现在我得到这个:
有人知道如何创建像 Vega-lite 中那样的 Sankey 图吗?
https://observablehq.com/@d3/sankey-diagram

输入将是这样的数据
From | To | Amount
如何设置条形标签的格式以删除科学记数法?
highest_enrollment = course_data.groupby(
"course_organization")["course_students_enrolled"].sum().nlargest(10)
ax = sns.barplot(x=highest_enrollment.index,
y=highest_enrollment.values,
ci=None,
palette="ch: s=.5, r=-.5")
ax.ticklabel_format(style='plain', axis="y")
plt.xticks(rotation=90)
ax.bar_label(ax.containers[0])
plt.show()
Run Code Online (Sandbox Code Playgroud)
我有一个包含 10 亿行的数据集。数据存储在 Hive 中。另外,我将 Impala 作为 Hive 和 Superset 之间的一层。在 Superset 中运行的查询具有最大行限制。100.000。我需要更改它,没有行限制。此外,我需要对从 SQL 实验室返回的查询结果进行可视化,但这是无法完成的,因为也存在超时缓存限制。因此,如果我更改/增加 SQL 实验室中的行限制和可视化中的超时缓存,那么我想,不会有问题。

我有 PyCharm Comunity 2019,我用它来开发主要用于机器学习的 Python 脚本。
在使用 1D/2D 数组时,我喜欢View as Arra y 功能,它在调试时对我有很大帮助。
我想知道是否存在诸如“查看绘图”之类的功能,而无需在我的脚本中编写 matplotlib 代码,例如,它将帮助我查看时间序列数据。
我正在尝试使用视觉 keras 可视化我的深度学习模型,但我收到一个我不确定我理解的错误。这是我第一次使用视觉 keras,我不知道该怎么做。举个例子
!pip install visual keras
import visualkeras
import tensorflow as tf
tf.keras.utils.plot_model(model, show_shapes=True)
input = tf.keras.Input(shape=(100,), dtype='int32', name='input')
x = tf.keras.layers.Embedding(output_dim=512, input_dim=10000, input_length=100)(input)
x = tf.keras.layers.LSTM(32)(x)
x = tf.keras.layers.Dense(64, activation='relu')(x)
x = tf.keras.layers.Dense(64, activation='relu')(x)
x = tf.keras.layers.Dense(64, activation='relu')(x)
output = tf.keras.layers.Dense(1, activation='sigmoid', name='output')(x)
model = tf.keras.Model(inputs=[input], outputs=[output])
visualkeras.layered_view(model, legend=True, draw_volume=False)
Run Code Online (Sandbox Code Playgroud)
错误看起来像这样TypeError: 'int' object is not iterable。任何帮助都感激不尽。
visualization ×10
python ×6
plot ×2
seaborn ×2
arrays ×1
audio ×1
dart ×1
flutter ×1
gantt-chart ×1
ggplot2 ×1
histogram ×1
hive ×1
impala ×1
json ×1
jupyter ×1
keras ×1
matplotlib ×1
pandas ×1
plotly ×1
pycharm ×1
r ×1
sql ×1
statistics ×1
tensorflow ×1
tidyverse ×1
timestamp ×1
vega ×1
vega-lite ×1