Skip to content

TypeError: _set_format() missing 2 required positional arguments: 'vmin' and 'vmax' #1

Description

@windowshopr

Any idea why I might be getting this error, and how to rectify it? It comes after the:

Percentiles for the distribution of analytic
       5%-ile:  9711.9$
      15%-ile:  11049.9$
      30%-ile:  14245.6$
      50%-ile:  20620.1$
      70%-ile:  27399.7$
      85%-ile:  33241.4$
      95%-ile:  48859.0$

There is 70% chance that the initial investment after 10 years is superior to 14245.6$

There is 70% chance that the initial investment after 10 years is in the range ]11049.9,33241.4]
Traceback (most recent call last):
  File "Main.py", line 152, in <module>
    plot_histograms_figure2(models, Matrix_results, colors, save_fig)
  File "C:\Users\windowshopr\Desktop\Stock Trading\Monte Carlo\buy_hold_mc\Post_processing.py", line 209, in plot_histograms_figure2
    plt.savefig('Hists_fig2.pdf', dpi = 300, bbox_inches='tight')
  
File "C:\Users\windowshopr\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\pyplot.py", line 729, in savefig
    res = fig.savefig(*args, **kwargs)
  
File "C:\Users\windowshopr\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\figure.py", line 2180, in savefig
    self.canvas.print_figure(fname, **kwargs)
  
File "C:\Users\windowshopr\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\backend_bases.py", line 2065, in print_figure
    **kwargs)
  
File "C:\Users\windowshopr\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\backends\backend_pdf.py", line 2503, in print_pdf
    self.figure.draw(renderer)
  
File "C:\Users\windowshopr\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\artist.py", line 38, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
  
File "C:\Users\windowshopr\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\figure.py", line 1709, in draw
    renderer, self, artists, self.suppressComposite)
  
File "C:\Users\windowshopr\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\image.py", line 135, in _draw_list_compositing_images
    a.draw(renderer)
  
File "C:\Users\windowshopr\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\artist.py", line 38, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
  
File "C:\Users\windowshopr\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\axes\_base.py", line 2607, in draw
    self._update_title_position(renderer)
  
File "C:\Users\windowshopr\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\axes\_base.py", line 2549, in _update_title_position
    bb = ax.xaxis.get_tightbbox(renderer)
  
File "C:\Users\windowshopr\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\axis.py", line 1162, in get_tightbbox
    ticks_to_draw = self._update_ticks()
  
File "C:\Users\windowshopr\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\axis.py", line 1080, in _update_ticks
    major_labels = self.major.formatter.format_ticks(major_locs)
  
File "C:\Users\windowshopr\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\ticker.py", line 259, in format_ticks
    self.set_locs(values)
  
File "C:\Users\windowshopr\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\ticker.py", line 689, in set_locs
    self._set_format()

TypeError: _set_format() missing 2 required positional arguments: 'vmin' and 'vmax'

I'm assuming it's because matplotlib has been upgraded and now your code needs some kind of addition, but just hoping you can shed some light on it as I'd love to get this working 100%. Thanks!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions