Skip to content

How to plot log curves? #748

Answered by nick-shaw
priikone asked this question in Q&A
Discussion options

You must be logged in to vote

The main code for generating those plots was:

def plot_multi_log_encoding_curves(curves, **kwargs):
    figure, axes = colour.plotting.artist(**kwargs)

    x = np.linspace(-10, 10, 1000)
    for curve, label in curves:
        y = colour.log_encoding_curve(0.18 * 2**x, curve=curve)
        axes.plot(x, y, label=label)

    settings = {
        'title': 'Log Encoding Curves',
        'bounding_box': (-10, 10, 0, 1),
        'x_label': 'Stops Above/Below 18% grey',
        'y_label': 'Log',
        'legend': True,
    }
    settings.update(kwargs)

    return colour.plotting.render(**settings)

FIGURE, AXES = plot_multi_log_encoding_curves(
    [('ALEXA Log C', 'ALEXA LogC'), ('Canon Log 3…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by KelSolaar
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #608 on January 16, 2021 23:00.