问题描述
C ++标准是否保证以下代码正确?
import plotly.graph_objects as go
import numpy as np
np.random.seed(42)
y0 = np.random.randn(50)
y1 = np.random.randn(50) + 1
y2 = np.random.randn(50) + 2 # shift mean
x0 = 'Sample A'
x1 = 'Sample B'
x2 = 'Sample C'
fig = go.figure()
fig.add_trace(go.Scatter(
y=[x0]*len(y0),x=y0,mode='markers',name='Sample A',legendgroup='A',showlegend=False
))
fig.add_trace(go.Scatter(
y=[x1]*len(y1),x=y1,name='Sample B',legendgroup='B',showlegend=False
))
fig.add_trace(go.Scatter(
y=[x2]*len(y2),x=y2,name='Sample C',legendgroup='C',showlegend=False
))
fig.add_trace(go.Box(
x=y0,marker_color = 'indianred',Boxpoints=False,yaxis='y2'
))
fig.add_trace(go.Box(
x=y1,marker_color = 'lightseagreen',yaxis='y2'
))
fig.add_trace(go.Box(
x=y2,marker_color = 'orange',yaxis='y2'
))
fig.update_layout(
yaxis2=dict(
matches='y',layer="above traces",overlaying="y",showticklabels=False
))
fig.show()
(至少它与同时具有#include <iostream>
#include <vector>
std::vector<int>::iterator i = {};
int main()
{
if (i == std::vector<int>::iterator{})
{
std::cout << "it is empty" << std::endl;
}
return 0;
}
和std::vector<int>
的MSVC2017一起使用)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)