![]() ![]() Vmin, vmax = _view_interval()įile "/Library/Frameworks/amework/Versions/3.10/lib/python3.10/site-packages/matplotlib/axis.py", line 1987, in getter Labels = axis.get_majorticklabels() axis.get_minorticklabels()įile "/Library/Frameworks/amework/Versions/3.10/lib/python3.10/site-packages/matplotlib/axis.py", line 1201, in get_majorticklabelsįile "/Library/Frameworks/amework/Versions/3.10/lib/python3.10/site-packages/matplotlib/axis.py", line 1371, in get_major_ticksįile "/Library/Frameworks/amework/Versions/3.10/lib/python3.10/site-packages/matplotlib/axis.py", line 1277, in get_majorticklocsįile "/Library/Frameworks/amework/Versions/3.10/lib/python3.10/site-packages/matplotlib/ticker.py", line 2113, in _call_ Self._apply_axis_properties(ax.xaxis, rot=self.rot, fontsize=self.fontsize)įile "/Library/Frameworks/amework/Versions/3.10/lib/python3.10/site-packages/pandas/plotting/_matplotlib/core.py", line 614, in _apply_axis_properties Self._post_plot_logic_common(ax, self.data)įile "/Library/Frameworks/amework/Versions/3.10/lib/python3.10/site-packages/pandas/plotting/_matplotlib/core.py", line 526, in _post_plot_logic_common Return plot_ot(data, kind=kind, **kwargs)įile "/Library/Frameworks/amework/Versions/3.10/lib/python3.10/site-packages/pandas/plotting/_matplotlib/_init_.py", line 71, in plotįile "/Library/Frameworks/amework/Versions/3.10/lib/python3.10/site-packages/pandas/plotting/_matplotlib/core.py", line 335, in generate Pydev_imports.execfile(file, globals, locals) # execute the scriptįile "/Users/danieltclark/Library/Application Support/JetBrains/Toolbox/apps/P圜harm-P/ch-0/213.7172.26/P圜harm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfileĮxec(compile(contents "\n", file, 'exec'), glob, loc)įile "/Users/danieltclark/Documents/GitHub/OBVTrader2/main.py", line 22, in įile "/Library/Frameworks/amework/Versions/3.10/lib/python3.10/site-packages/pandas/plotting/_core.py", line 972, in _call_ This worked: data = įile "/Users/danieltclark/Library/Application Support/JetBrains/Toolbox/apps/P圜harm-P/ch-0/213.7172.26/P圜harm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1483, in _exec As a test, this simple code plotted successfully. When you tested the code, did you use a Mac M1 system? If not, I'm wondering if the issue is specifically related to subplots on M1 Macs. Rerunning the test code above generated the error below when it hit: # df.set_index("name").plot(ax=ax1)I changed to code to split the set_index and plot to two different statements: df.set_index("name")ĭf.plot(ax=ax1)It errored on the df.plot(ax=ax1) statement. After that, I cleaned out $PATH and reset it to the default "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin". And then deleted and reinstalled Python, P圜harm, and VS Code. As I mentioned above, I deleted Anaconda. I'd therefore recommend you use () since it is more concise and easy to use.I don't understand what the conda code does. The code above can be condensed with a loop, but it is still considerably more tedious to use. ![]() Or you can also use built-in method of fig: ax1 = fig.add_subplot(231) # now you have to create each subplot individually This means it will require several lines of code to achieve the same result as () did in a single line of code above: # first you have to make the figure In contrast, () creates only a single subplot axes at a specified grid position. For example, the code below will return both fig which is the figure object, and axes which is a 2x3 array of axes objects which allows you to easily access each subplot: fig, axes = plt.subplots(nrows=2, ncols=3) ![]() That means you can use this single function to create a figure with several subplots with only one line of code. This utility wrapper makes it convenient to create common layouts of subplots, including the enclosing figure object, in a single call. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |