Skip to content

Not including first rows of dataset, row shifting, incorrectly annotating row as left-hand labels, whereas labels on the right are correct #81

Description

@rmaarle

review_example.csv
plot

importforestplotasfpimportpandasaspddf=pd.read_csv("review_example.csv",sep=";") # companion example datafp.forestplot(df, # the dataframe with results dataestimate='PCSA_Men_mean', # col containing estimated effect size ll='PCSA_Men_Lower', hl='PCSA_Men_Upper', # columns containing conf. int. lower and higher limitsvarlabel='Abbreviation', # column containing variable labelcapitalize="capitalize", # Capitalize labelsannote=["Source", "Image modality", 'Sample_size',"Method", 'Position'], # columns to report on left of plotannoteheaders=["Ref", "Modality", 'N',"PCSA", 'Pose'], # ^corresponding headersrightannote=['Age', 'Height', 'Weight', 'Fiber_length', 'Pennation', "Info"], # columns to report on right of plot right_annoteheaders=['Age[y]', 'Height[cm]', 'Weight[kg]', 'Fiber_length[cm]', 'Pennation[Deg]', "Note"], #corresponding headersgroupvar="Agegroup", # column containing group labelsgroup_order=["Reference","Young Adults","Adults"], xlabel="PCSA Ratio", # x-label titlexticks=[0,30,60], # x-ticks to be printedtable=True, # Format as a tablecolor_alt_rows=True, # Gray alternate rows# Additional kwargs for customizations**{"marker": "D", # set maker symbol as diamond"markersize": 35, # adjust marker size"xtick_size": 12, # adjust x-ticker fontsize
})
#plt.savefig("plot.jpg", bbox_inches="tight")

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions