Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widgets code shows up during the commandline #1976

Open
wkerzendorf opened this issue Apr 25, 2022 · 2 comments
Open

Widgets code shows up during the commandline #1976

wkerzendorf opened this issue Apr 25, 2022 · 2 comments

Comments

@wkerzendorf
Copy link
Member

It should be disabled when running on the commandline.

VBox(children=(FigureWidget({█▏                                                            119918/500000 [00:12<00:38, 9986
    'data': [{'type': 'scatter', 'uid': 'a781058b-c248-4e8b-a41f-c9232fc3fe15', 'xaxis': 'x', 'yaxis': 'y'},
             {'type': 'scatter', 'uid': '1bed6058-4acd-4c65-b2e0-cd0062fc8e29', 'xaxis': 'x2', 'yaxis': 'y2'}],
    'layout': {'height': 450,
               'legend': {'title': {'text': 'Iterations'}, 'traceorder': 'reversed'},
               'margin': {'b': 25, 'l': 10, 'pad': 0, 'r': 135, 't': 25},
               'template': '...',
               'xaxis': {'anchor': 'y',
                         'domain': [0.0, 0.45],
                         'tickformat': 'g',
                         'title': {'text': '$\\text{Velocity}~[\\text{km}~\\text{s}^{-1}]$'}},
               'xaxis2': {'anchor': 'y2',
                          'domain': [0.55, 1.0],
                          'matches': 'x',
                          'tickformat': 'g',
                          'title': {'text': '$\\text{Velocity}~[\\text{km}~\\text{s}^{-1}]$'}},
               'yaxis': {'anchor': 'x',
                         'domain': [0.0, 1.0],
                         'nticks': 15,
                         'tickformat': 'g',
                         'title': {'text': '$T_{\\text{rad}}\\ [\\text{K}]$'}},
               'yaxis2': {'anchor': 'x2',
                          'domain': [0.0, 1.0],
                          'nticks': 15,
                          'tickformat': 'g',
                          'title': {'text': '$W$'}}}
@shreyas3156
Copy link
Member

Hi @wkerzendorf, if the display() method is called from the command-line, would it be better to print a message like "Please run the widget inside a notebook" or raise an error instead?

@mohakmalviya
Copy link

hello sir! i would like to work on this issue can you please elaborate it??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants