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

A Few Minor Issues in the Tutorial #372

Open
kayween opened this issue Aug 17, 2024 · 0 comments
Open

A Few Minor Issues in the Tutorial #372

kayween opened this issue Aug 17, 2024 · 0 comments

Comments

@kayween
Copy link

kayween commented Aug 17, 2024

There are a few minor issues in the tutorial that is likely caused by interface changes in the last two years.

In the first cell, ax.grid(b=None) triggers an error from matplotlib.

ax.axis('off')
ax.grid(b=None)
ax.imshow(M.T, cmap=cm.Greys_r)

The error message is shown below.

ValueError: keyword grid_b is not recognized; valid keywords are ['size', 'width', 'color', 'tickdir', 'pad', 'labelsize', 'labelcolor', 'labelfontfamily', 'zorder', 'gridOn', 'tick1On', 'tick2On', 'label1On', 'label2On', 'length', 'direction', 'left', 'bottom', 'right', 'top', 'labelleft', 'labelbottom', 'labelright', 'labeltop', 'labelrotation', 'grid_agg_filter', 'grid_alpha', 'grid_animated', 'grid_antialiased', 'grid_clip_box', 'grid_clip_on', 'grid_clip_path', 'grid_color', 'grid_dash_capstyle', 'grid_dash_joinstyle', 'grid_dashes', 'grid_data', 'grid_drawstyle', 'grid_figure', 'grid_fillstyle', 'grid_gapcolor', 'grid_gid', 'grid_in_layout', 'grid_label', 'grid_linestyle', 'grid_linewidth', 'grid_marker', 'grid_markeredgecolor', 'grid_markeredgewidth', 'grid_markerfacecolor', 'grid_markerfacecoloralt', 'grid_markersize', 'grid_markevery', 'grid_mouseover', 'grid_path_effects', 'grid_picker', 'grid_pickradius', 'grid_rasterized', 'grid_sketch_params', 'grid_snap', 'grid_solid_capstyle', 'grid_solid_joinstyle', 'grid_transform', 'grid_url', 'grid_visible', 'grid_xdata', 'grid_ydata', 'grid_zorder', 'grid_aa', 'grid_c', 'grid_ds', 'grid_ls', 'grid_lw', 'grid_mec', 'grid_mew', 'grid_mfc', 'grid_mfcalt', 'grid_ms']

This error is likely due to the matplotlib upgrade.

In the fifth cell, the bash command also triggers an error.

%%bash --bg

aepsych_server --ip 0.0.0.0 --port 5555 database --db data_collection_analysis_tutorial.db

The following is the error message. This error can be fixed by simply removing "database" in the above command.

usage: aepsych_server [-h] [--port N] [--ip M] [-s STRATCONFIG] [--logs LOGS] [-d DB] [-r REPLAY] [-m]
aepsych_server: error: unrecognized arguments: database

Versions:

  • AEPsych 0.4.1
  • matplotlib 3.9.2

I can open a pull request to fix these if needed.

facebook-github-bot pushed a commit that referenced this issue Oct 14, 2024
Summary:
### PR Description:
This pull request fixes issue #372, which involves the use of the deprecated `ax.grid(b=None)` in the AEPsych tutorial. As per the [Matplotlib 3.9.0 API updates](https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.9.0.html), the `b=None` argument has been removed, causing a `ValueError` in recent versions (3.9.0 and above).

To address this, the `b=None` argument has been removed from two lines in the notebook, ensuring compatibility with Matplotlib 3.9.2 and higher.

The database-related error has already been resolved in PR #295, so no further changes are necessary regarding that.

This PR resolves the compatibility issue and ensures the tutorial runs correctly with the latest version of Matplotlib.

Pull Request resolved: #397

Reviewed By: crasanders

Differential Revision: D64153309

Pulled By: JasonKChow

fbshipit-source-id: 77051074797821901f9fa8e4b52ef2effed9a350
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

No branches or pull requests

1 participant