Itach111 2022-10-15 17:50 采纳率: 33.3%
浏览 29
已结题

python matplotlib作图无法铺满qt5界面

matplotlib.pyplot.figure(1)
for i in range(0,int(code_num)):
    j = 1 +2i
    k = 2+2
i
    stock_code = input('请输入第%s个代码:'%(i+1))    
            data1 = data_sec(stock_code,date,begin_time,end_time)
            names[f'ax{j}'] = matplotlib.pyplot.subplot(2code_num,1,j)
            names[f'ax{j}'].plot( data1.index, data1['fPrice'],color = 'g',linewidth = 1)
            names[f'ax{k}'] = matplotlib.pyplot.subplot(2
code_num,1,k)
            names[f'ax{k}'].bar( data1.index, data1['total_amount'],color = 'r')
            names[f'ax{k}'].plot(data1.index,data1['0'],linewidth = 0.5)
无需在意data_sec,只是为啥这样循环做出来的图始终无法铺满整个界面

  • 写回答

1条回答 默认 最新

  • Ko-walski 2022-10-16 08:05
    关注

    放完整代码

    评论

报告相同问题?

问题事件

  • 系统已结题 10月23日
  • 创建了问题 10月15日

悬赏问题

  • ¥15 UE5.1局部变量对蓝图不可见
  • ¥15 一共有五道问题关于整数幂的运算还有房间号码 还有网络密码的解答?(语言-python)
  • ¥20 sentry如何捕获上传Android ndk 崩溃
  • ¥15 在做logistic回归模型限制性立方条图时候,不能出完整图的困难
  • ¥15 G0系列单片机HAL库中景园gc9307液晶驱动芯片无法使用硬件SPI+DMA驱动,如何解决?
  • ¥15 nasm x86 变量归零
  • ¥65 Tree 树形控件实现单选功能,可以使用element也可以手写一个,实现全选为全选状态
  • ¥60 寻抓云闪付tn组成网页付款链接
  • ¥16 寻字节跳动内部人员帮推简历
  • ¥20 如何通过sentry收集上传Android ndk的崩溃?