LoginSignup
1
1

More than 3 years have passed since last update.

Jupyter + Matplotlib > triangular van der Corput sequenceの描画 > v0.1: 数点打つだけ

Last updated at Posted at 2017-10-16
動作環境
GeForce GTX 1070 (8GB)
ASRock Z170M Pro4S [Intel Z170chipset]
Ubuntu 16.04 LTS desktop amd64
TensorFlow v1.2.1
cuDNN v5.1 for Linux
CUDA v8.0
Python 3.5.2
IPython 6.0.0 -- An enhanced Interactive Python.
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)

参考: Jupyter | Matplotlib > 2次元データの可視化 > imshow() | scatter()

code v0.1

上記のリンク先のコードを変更し、単色の点を打つコードにしてみた。

triangularVanDerCorput_171017.ipynb
%matplotlib inline

# v0.1 Oct. 17, 2017
#  - branched from [test_scatter_170812.ipynb]

import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm


def get_value(ax, ay):
    return ax + ay

# 1. get data
NUM_DATA = 10
x = np.random.rand(NUM_DATA)
y = np.random.rand(NUM_DATA)
#color = get_value(x, y)
color = [10 for idx in range(NUM_DATA)]

# 2. draw data
size = 25  # arbitrary
plt.scatter(x, y, size, color, cmap=cm.jet)
plt.colorbar()

qiita.png

単色にすると中央の色の緑になり見えにくい。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1