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

Add new graphical representations to LanguageModel #8

Merged
merged 5 commits into from
May 10, 2021
Merged

Conversation

VicenteAR
Copy link
Contributor

Added new methods to represent the lattice (using holoviews). A few problems are in order:

  • method _plot() inside run is not properly called (plot is not returned)
  • I can't get the desired layout. The idea is showing a composition 2 cols + 1 col (is the solution presented here?)

Signed-off-by: VicenteAR vicente.arjona@hotmail.com

Signed-off-by: VicenteAR <vicente.arjona@hotmail.com>
@VicenteAR VicenteAR requested a review from Guillemdb May 4, 2021 14:43
@VicenteAR VicenteAR self-assigned this May 4, 2021
VicenteAR added 3 commits May 4, 2021 16:46
Signed-off-by: VicenteAR <vicente.arjona@hotmail.com>
Signed-off-by: VicenteAR <vicente.arjona@hotmail.com>
Signed-off-by: VicenteAR <vicente.arjona@hotmail.com>
@VicenteAR
Copy link
Contributor Author

VicenteAR commented May 6, 2021

Fixed problems:

  • method _plot() inside run is not properly called (plot is not returned) => inside _plot, used return display(...). This correctly shows the image.
  • I can't get the desired layout. The idea is showing a composition 2 cols + 1 col => used panel.Column() and panel.Row() combination.

==================================================================
Style problem: command display is not recognize. Which module is needed?

Copy link
Member

@Guillemdb Guillemdb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the matplotlib imports before merging.

@@ -1,14 +1,21 @@
"""Module containing custom classes to study different language competition models."""
from typing import Optional, Tuple, Union

from bokeh.models import FixedTicker
import holoviews as hv
from holoviews import opts
import matplotlib as mpl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import matplotlib as mpl

@@ -1,14 +1,21 @@
"""Module containing custom classes to study different language competition models."""
from typing import Optional, Tuple, Union

from bokeh.models import FixedTicker
import holoviews as hv
from holoviews import opts
import matplotlib as mpl
import matplotlib.pyplot as plt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import matplotlib.pyplot as plt

import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import panel as pn

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from IPython.core.display import display

Signed-off-by: VicenteAR <vicente.arjona@hotmail.com>
@VicenteAR VicenteAR changed the title [WIP] Add new graphical representations to LanguageModel Add new graphical representations to LanguageModel May 10, 2021
@VicenteAR VicenteAR requested a review from Guillemdb May 10, 2021 08:27
@VicenteAR
Copy link
Contributor Author

VicenteAR commented May 10, 2021

Fixed problems. Removed matplotlib libraries. Changed _repr_: moved from matplotlib to holoviews.

@VicenteAR VicenteAR merged commit 53c46b0 into master May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants