0

In an old standalone plotting package (sm) there was a style available for scatter plots which I found more appealing to the general style. It appears as each point looking almost like a histogram which stretches to the next point.

An example of a scatter plot using this style: Example

Matplotlib does have this style for histograms, but I'm wondering if there's a way to cheat the system to allow the style to work for scatter plots.

1 Answer 1

1

I think some of the confusion comes from the fact that the desired plot is not a scatter plot. It's a line plot with lines in form of a step-like function.

You may plot step functions with pyplot.step(x,y) or plot(x,y, drawstyle="steps").

import matplotlib.pyplot as plt import numpy as np; np.random.seed(42) x = np.linspace(0,1) y = np.random.rand(len(x)) fig, ax = plt.subplots() ax.step(x,y) # or # ax.plot(x,y, drawstyle="steps") plt.show() 

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

Ah, see. It would appear my vocabulary is lacking. Thanks for the help!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.