如何从T-SNE或Umap中找到你想要的点?

1.找到对应的json文件

2.打开网址

Examples - Apache ECharts

3.输入代码


$.get(ROOT_PATH + '/data/asset/data/life-expectancy.json', function (data) {
  var itemStyle = {
    opacity: 0.8
  };

  // Schema:
  var schema = [
    { name: 'x', index: 0, text: '图中位置x' },
    { name: 'y', index: 1, text: '图中位置y' },
    { name: '经纬度', index: 2, text: '经纬度' },
    { name: '基站index', index: 3, text: '基站index' }
    
  ];
  option = {
    baseOption: {
      title: [
        {
          textAlign: 'center',
          left: '63%',
          top: '55%',
          textStyle: {
            fontSize: 100
          }
        },
        {
          text: '基站时间序列特征提取',
          left: 'center',
          top: 10,
          textStyle: {
            fontWeight: 'normal',
            fontSize: 20
          }
        }
      ],
      tooltip: {
        padding: 5,
        borderWidth: 1,
        formatter: function (obj) {
          var value = obj.value;
          // prettier-ignore
          return schema[3].text + ':' + value[3] + '<br>'
                        + schema[1].text + ':' + value[1]  + '<br>'
                        + schema[0].text + ':' + value[0] + '<br>'
                        + schema[2].text + ':' + value[2] + '<br>';
        }
      },
      grid: {
        top: 100,
        containLabel: true,
        left: 30,
        right: '110'
      },
      xAxis: {
        type: 'log',
        name: '人均收入',
        max: 100000,
        min: 300,
        nameGap: 25,
        nameLocation: 'middle',
        nameTextStyle: {
          fontSize: 18
        },
        splitLine: {
          show: false
        },
        axisLabel: {
          formatter: '{value} $'
        }
      },
      yAxis: {
        type: 'value',
        name: '平均寿命',
        max: 100,
        nameTextStyle: {
          fontSize: 18
        },
        splitLine: {
          show: false
        },
        axisLabel: {
          formatter: '{value} 岁'
        }
      },
      
      series: [
        {
          type: 'scatter',
          itemStyle: itemStyle,
          data: data.series[0],
        }
      ],
     
    },
    options: []
  };
  for (var n = 0; n < data.timeline.length; n++) {
    option.options.push({
      series: {
        name: data.timeline[n],
        type: 'scatter',
        itemStyle: itemStyle,
        data: data.series[n],

      }
    });
  }
  myChart.setOption(option);
});

4.打开json文件,替换掉代码中的data数据

5.在网页上运行代码

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值