@@ -309,24 +309,25 @@ end subroutine add_plot
309309 subroutine add_hist (me , x , label , xlim , ylim , xscale , yscale , bins , normed , cumulative )
310310
311311 class(pyplot), intent (inout ) :: me ! ! pyplot handler
312- real (wp), dimension (:), intent (in ) :: x ! ! x values
312+ real (wp), dimension (:), intent (in ) :: x ! ! array of data
313313 character (len=* ), intent (in ) :: label ! ! plot label
314314 real (wp),dimension (2 ), intent (in ), optional :: xlim ! ! x-axis range
315315 real (wp),dimension (2 ), intent (in ), optional :: ylim ! ! y-axis range
316316 character (len=* ), intent (in ), optional :: xscale ! ! example: 'linear' (default), 'log'
317317 character (len=* ), intent (in ), optional :: yscale ! ! example: 'linear' (default), 'log'
318- integer , intent (in ), optional :: bins ! !
319- logical , intent (in ), optional :: normed
320- logical , intent (in ), optional :: cumulative
318+ integer , intent (in ), optional :: bins ! ! number of bins
319+ logical , intent (in ), optional :: normed ! ! boolean flag that determines whether bin counts are normalized
320+ logical , intent (in ), optional :: cumulative ! ! boolean flag that determines whether histogram represents the cumulative density of dataset
321+
322+ character (len= :), allocatable :: xstr ! ! x values stringified
323+ character (len= :), allocatable :: xlimstr ! ! xlim values stringified
324+ character (len= :), allocatable :: ylimstr ! ! ylim values stringified
325+ character (len=* ), parameter :: xname = ' x' ! ! x variable name for script
326+ character (len= :), allocatable :: extras ! ! optional stuff
327+ character (len= 5 ) :: normedstr= ' ' ! !
328+ character (len= 5 ) :: cumulativestr= ' ' ! !
329+ character (len= max_int_len) :: binsstr ! !
321330
322- character (len= :), allocatable :: xstr ! ! x values stringified
323- character (len= :), allocatable :: xlimstr ! ! xlim values stringified
324- character (len= :), allocatable :: ylimstr ! ! ylim values stringified
325- character (len= max_int_len) :: binsstr ! !
326- character (len=* ), parameter :: xname = ' x' ! ! x variable name for script
327- character (len= :), allocatable :: extras ! ! optional stuff
328- character (len= 5 ) :: normedstr= ' '
329- character (len= 5 ) :: cumulativestr= ' '
330331
331332 if (allocated (me% str)) then
332333
@@ -367,13 +368,6 @@ subroutine add_hist(me, x, label, xlim, ylim, xscale, yscale, bins, normed, cumu
367368 ' cumulative=' // trim (cumulativestr)// ' ,' // &
368369 ' normed=' // trim (normedstr)// ' )' )
369370
370- ! write the plot statement:
371- ! call me%add_str('CS = ax.'//contourfunc//'('//xname_//','//yname_//','//zname_//','//&
372- ! 'label="'//trim(label)//'",'//&
373- ! 'linestyles="'//trim(adjustl(linestyle))//'"'//&
374- ! extras//')')
375-
376-
377371 ! axis limits:
378372 if (allocated (xlimstr)) call me% add_str(' ax.set_xlim(' // xlimstr// ' )' )
379373 if (allocated (ylimstr)) call me% add_str(' ax.set_ylim(' // ylimstr// ' )' )
0 commit comments