plot graph
Component: cr-action:plot graph (v1.0.0)
Added by: gfursin (2019-10-16 07:55:50)
Authors: Grigori Fursin
License: BSD 3-clause (code) and CC BY-SA 4.0 (data)
Source: GitHub
Creation date: 2014-12-06 15:37:32
CID: 081173242a88bc94:5d22d74304ba51c8cr-action:plot graph  )

Sign up here to be notified when new results are reproduced or new CodeReef components are shared!

How to get and run stable version (under development):
  pip install codereef
  cr download module:graph --version=1.0.0 --all
  ck plot graph --help

How to get and run development version:
  pip install ck
  ck pull repo:ck-analytics
  ck plot graph --help

How to run from Python:
   import ck.kernel as ck

   r=ck.access({'action':'plot',
                'module_uoa':'graph',
                ... See JSON API below ...
               })
   if r['return']>0: return r
   ...
Info about the CK module with this action: graph
Workflow framework: CK
Development repository: ck-analytics
Module description: universal graphs for experiments
Workflow:
API Python code: Link
JSON API:
        "
    Input:  {
              (load_table_from_file)                     - load table directly from file
                         or
              Select entries or table:
                 (repo_uoa) or (experiment_repo_uoa)     - can be wild cards
                 (remote_repo_uoa)                       - if remote access, use this as a remote repo UOA
                 (module_uoa) or (experiment_module_uoa) - can be wild cards
                 (data_uoa) or (experiment_data_uoa)     - can be wild cards

                 (repo_uoa_list)                       - list of repos to search
                 (module_uoa_list)                     - list of module to search
                 (data_uoa_list)                       - list of data to search

                 (search_dict)                         - search dict
                 (ignore_case)                         - if 'yes', ignore case when searching

                       OR 

                 table                                 - experiment table (if drawing from other functions)
                 (table_info)                          - point description


              (flat_keys_list)                      - list of flat keys to extract from points into table
                                                      (order is important: for example, for plot -> X,Y,Z)

              (flat_keys_list_separate_graphs)      - [ [keys], [keys], ...] - several graphs ...

              (sort_index)                          - (int) dimension to sort 

              (labels_for_separate_graphs)          - list of labels for separate graphs

              (flat_keys_index)                     - add all flat keys starting from this index 
              (flat_keys_index_end)                 - add all flat keys ending with this index (default #min)

              (customize_dots)                      - if 'yes' and MPL engine, customize color and size from table_info

              (out_to_file)                         - save picture or html to file, if supported 
                                                        (will be preserved and not replotted - useful to have a copy of an original image
                                                         when replotting graphs in interactive papers)

              (out_repo_uoa)                        - repo uoa where to save file (when reproducing graphs for interactive articles)
              (out_module_uoa)                      - module uoa where to save file (when reproducing graphs for interactive articles)
              (out_data_uoa)                        - data uoa where to save file (when reproducing graphs for interactive articles)

              (out_id)                              - graph ID in the created graph entry
              (out_common_meta)                     - graph common meta in the created graph entry
              (out_graph_extra_meta)                - graph extra meta (parameters and description)

              (save_table_to_json_file)             - save table to json file
              (save_info_table_to_json_file)        - save info table (mtable) to json file
              (save_table_to_csv_file)              - save table to csv file (need keys)

              (save_to_html)                        - if interactive or html-based graph, save to html
              (save_to_style)                       - if interactive or html-based graph, save to style (if needed)

              (display_x_error_bar)                 - if 'yes', display error bar on X axis (using next dim)
              (display_y_error_bar)                 - if 'yes', display error bar on Y axis (using next dim)
              (display_z_error_bar)                 - if 'yes', display error bar on Z axis (using next dim)

              Graphical parameters:
                plot_type                  - mpl_2d_scatter
                point_style                - dict, setting point style for each separate graph {\"0\", \"1\", etc}

                x_ticks_period             - (int) for bar graphs, put periodicity when to show number 

                xmin
                xmax
                ymin
                ymax

                bound_lines           - if 'yes', plot lines bounding all points ...
                 bound_style          - ':' by default
                 bound_color          - 'r' by default

                skip_colorbar         - if 'yes', do not show colorbar in heatmaps
                colorbar_pad          - (default = 0.15) - pad colorbar

                h_lines               - list of X for horizontal lines
                h_lines_style
                h_lines_color

                v_lines               - list of Y for vertical lines
                v_lines_style
                v_lines_color

                  If density graph:
                (bins)                - number of bins (int, default = 100)
                (cov_factor)          - float covariance factor

                d3_div                - div ID (ck_interactive). \"body\" if empty
            }

    Output: {
              return       - return code =  0, if successful
                                         >  0, if error
              (error)      - error text if return > 0

              (html)       - html, if HTML generator such as d3
              (style)      - style for html, if HTML generator such as d3
            }

"
       


All versions:


Comments:

    Please log in to add your comment!


If you notice inapropriate content that should not be here, please report us as soon as possible and we will try to remove it within 48 hours!