1

I am using python 3.8 on Windows 10; trying to make a plot with about 700M points in it, sound wave analysis. Here: Interactive large plot with ~20 million sample points and gigabytes of data

Vaex was highly recommended. I am trying to use examples from the Vaex tutorial but the graph does not appear. I could not find a good example on Internet.

import vaex
import numpy as np
df = vaex.example()
df.plot1d(df.x, limits='99.7%');

The Vaex documents don't mention that pyplot.show() should be used to display. Plot1d plots a histogram. How to plot just connected points?

1 Answers1

1

I am pretty sure that the vaex documentation explains that the (now deprecated) method .plot1d(...) is a wrapper around matplotlib plotting routines.

If you would like to create custom plots using the binned data, you can take this approach (I also found it in their docs)

import vaex
import numpy as np
import pylab as plt

# Load example data
df = vaex.example()

# Do the binning yourself
counts = df.count(binby=df.x, shape=64, limits='99.7%')

# Take care of the x-axis
limits = df.limits_percentage(df.x, percentage=99.7)
xvals = np.linspace(limits[0], limits[1], num=64)

# Create your custom plot via matplotlib, plotly or your favorite tool
p.plot(xvals, counts, marker='o', ms=5);
Joco
  • 803
  • 4
  • 7