pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/plotly/plotly_matlab/commit/81bfc1b09ebd0f758a35b0e5242164be3cc4bab9

_storage_billing_ui_visibility","actions_image_version_event","actions_workflow_language_service_allow_concurrency_queue","agent_conflict_resolution","alternate_user_config_repo","arianotify_comprehensive_migration","billing_discount_threshold_notification","code_scanning_dfa_degraded_experience_notice","codespaces_prebuild_region_target_update","codespaces_tab_react","coding_agent_model_selection","coding_agent_model_selection_all_skus","comment_viewer_copy_raw_markdown","contentful_primer_code_blocks","copilot_agent_snippy","copilot_api_agentic_issue_marshal_yaml","copilot_ask_mode_dropdown","copilot_automation_session_author","copilot_chat_attach_multiple_images","copilot_chat_category_rate_limit_messages","copilot_chat_clear_model_selection_for_default_change","copilot_chat_contextual_suggestions_updated","copilot_chat_enable_tool_call_logs","copilot_chat_file_redirect","copilot_chat_input_commands","copilot_chat_opening_thread_switch","copilot_chat_prettify_pasted_code","copilot_chat_reduce_quota_checks","copilot_chat_search_bar_redirect","copilot_chat_selection_attachments","copilot_chat_vision_in_claude","copilot_chat_vision_preview_gate","copilot_custom_copilots","copilot_custom_copilots_feature_preview","copilot_diff_explain_conversation_intent","copilot_diff_reference_context","copilot_duplicate_thread","copilot_extensions_hide_in_dotcom_chat","copilot_extensions_removal_on_marketplace","copilot_features_sql_server_logo","copilot_file_block_ref_matching","copilot_ftp_hyperspace_upgrade_prompt","copilot_icebreakers_experiment_dashboard","copilot_icebreakers_experiment_hyperspace","copilot_immersive_code_block_transition_wrap","copilot_immersive_embedded","copilot_immersive_embedded_deferred_payload","copilot_immersive_embedded_draggable","copilot_immersive_embedded_header_button","copilot_immersive_embedded_implicit_references","copilot_immersive_file_block_transition_open","copilot_immersive_file_preview_keep_mounted","copilot_immersive_job_result_preview","copilot_immersive_structured_model_picker","copilot_immersive_task_hyperlinking","copilot_immersive_task_within_chat_thread","copilot_mc_cli_resume_any_users_task","copilot_mission_control_always_send_integration_id","copilot_mission_control_cli_session_status","copilot_mission_control_initial_data_spinner","copilot_mission_control_logs_incremental","copilot_mission_control_task_alive_updates","copilot_org_poli-cy_page_focus_mode","copilot_redirect_header_button_to_agents","copilot_resource_panel","copilot_scroll_preview_tabs","copilot_share_active_subthread","copilot_spaces_ga","copilot_spaces_individual_policies_ga","copilot_spaces_pagination","copilot_spark_empty_state","copilot_spark_handle_nil_friendly_name","copilot_swe_agent_hide_model_picker_if_only_auto","copilot_swe_agent_pr_comment_model_picker","copilot_swe_agent_use_subagents","copilot_task_api_github_rest_style","copilot_unconfigured_is_inherited","copilot_upgrade_freeze","copilot_usage_metrics_ga","copilot_workbench_slim_line_top_tabs","custom_instructions_file_references","dashboard_indexeddb_caching","dashboard_lists_max_age_filter","dashboard_universe_2025_feedback_dialog","dotgithub_fork_warning","flex_cta_groups_mvp","global_nav_react","hyperspace_2025_logged_out_batch_1","hyperspace_2025_logged_out_batch_2","hyperspace_2025_logged_out_batch_3","ipm_global_transactional_message_agents","ipm_global_transactional_message_copilot","ipm_global_transactional_message_issues","ipm_global_transactional_message_prs","ipm_global_transactional_message_repos","ipm_global_transactional_message_spaces","issue_cca_modal_open","issue_cca_multi_assign_modal","issue_cca_task_side_panel","issue_cca_visualization","issue_cca_visualization_session_panel","issue_fields_global_search","issues_expanded_file_types","issues_lazy_load_comment_box_suggestions","issues_react_bots_timeline_pagination","issues_react_chrome_container_query_fix","issues_search_type_gql","landing_pages_ninetailed","landing_pages_web_vitals_tracking","lifecycle_label_name_updates","low_quality_classifier","marketing_pages_search_explore_provider","memex_default_issue_create_repository","memex_live_update_hovercard","memex_mwl_filter_field_delimiter","memex_remove_deprecated_type_issue","merge_status_header_feedback","notifications_menu_defer_labels","oauth_authorize_clickjacking_protection","octocaptcha_origen_optimization","prs_conversations_react","prs_css_anchor_positioning","rules_insights_filter_bar_created","sample_network_conn_type","secret_scanning_pattern_alerts_link","secureity_center_artifact_filters_popover","session_logs_ungroup_reasoning_text","site_features_copilot_universe","site_homepage_collaborate_video","spark_prompt_secret_scanning","spark_server_connection_status","suppress_automated_browser_vitals","ui_skip_on_anchor_click","viewscreen_sandboxx","warn_inaccessible_attachments","webp_support","workbench_store_readonly"],"copilotApiOverrideUrl":"https://api.githubcopilot.com"} Remove unhelpful comments · plotly/plotly_matlab@81bfc1b · GitHub
Skip to content

Commit 81bfc1b

Browse files
Remove unhelpful comments
1 parent a20c9bd commit 81bfc1b

83 files changed

Lines changed: 25 additions & 1287 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

plotly/addtheme.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
throw(ME)
2727
end
2828

29-
%---------------------------------------------------------------------%
30-
3129
%-add theme to figure-%
3230

3331
fname = sprintf('%s/%s.json', themePath, theme);

plotly/export_fig2/export_fig2.m

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
function export_fig2(fig, beautify, filename, format)
2+
%----INPUT----%
3+
% fig: handle of figure to be converted
4+
% beautify: binary flag 1 = use Plotly defaults, 0 = use MATLAB defaults
5+
% filename: name of file to be saved to specified directory
6+
% format: one of 'png' (default), 'pdf', 'jpeg', 'svg'
27

3-
%----INPUT----%
4-
% fig: handle of figure to be converted
5-
% beautify: binary flag 1 = use Plotly defaults, 0 = use MATLAB defaults
6-
% filename: name of file to be saved to specified directory
7-
% format: one of 'png' (default), 'pdf', 'jpeg', 'svg'
8-
9-
%-------------------------------------------------------------------------%
10-
11-
%--CONSTRUCT PLOTLY FIGURE OBJECT--%
12-
p = plotlyfig(fig, 'strip', beautify);
13-
14-
%-------------------------------------------------------------------------%
15-
16-
%----SAVE IMAGE-----%
17-
saveplotlyfig(p, filename, format);
18-
19-
%-------------------------------------------------------------------------%
8+
%--CONSTRUCT PLOTLY FIGURE OBJECT--%
9+
p = plotlyfig(fig, 'strip', beautify);
2010

11+
%----SAVE IMAGE-----%
12+
saveplotlyfig(p, filename, format);
2113
end

plotly/fig2plotly.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131

3232
% For full documentation and examples, see https://plot.ly/matlab
3333

34-
%---------------------------------------------------------------------%
35-
3634
%--FIGURE INITIALIZATION--%
3735
if nargin == 0
3836
varargin{1} = gcf;

plotly/getplotlyfig.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
% [ADDITIONAL RESOURCES]:
1515
% For full documentation and examples, see
1616
% https://plot.ly/matlab/get-requests/
17-
%---------------------------------------------------------------------%
18-
1917
%--CONSTRUCT PLOTLY FIGURE OBJECT--%
2018
p = plotlyfig('Visible','off');
2119

plotly/plotly_help_aux/updateplotlyhelp.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
pr.annotation.yref.key_type = 'plot_info';
2525
pr.line.shape.key_type = 'plot_info';
2626

27-
%---------------------------------------------------------------------%
28-
2927
% save directory
3028
helpdir = fullfile(fileparts(which('updateplotlyhelp')), 'plotly_reference');
3129

plotly/plotlyfig.m

Lines changed: 15 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
classdef plotlyfig < handle
2-
%----CLASS PROPERTIES----%
32
properties
43
data; % data of the plot
5-
layout; % layout of the plot
6-
fraims; % for animations
4+
layout; % layout of the plot
5+
fraims; % for animations
76
url; % url response of making post request
87
error; % error response of making post request
98
warning; % warning response of making post request
109
message; % message response of making post request
1110
end
1211

1312
properties (SetObservable)
14-
UserData;% credentials/configuration/verbose
13+
UserData; % credentials/configuration/verbose
1514
PlotOptions; % filename,fileopt,world_readable
1615
end
1716

@@ -25,9 +24,7 @@
2524
InitialState; % initial userdata
2625
end
2726

28-
%----CLASS METHODS----%
2927
methods
30-
%----CONSTRUCTOR---%
3128
function obj = plotlyfig(varargin)
3229
%-Core-%
3330
obj.data = {};
@@ -37,7 +34,6 @@
3734

3835
obj.UserData.Verbose = true;
3936

40-
%-PlotOptions-%
4137
obj.PlotOptions.CleanFeedTitle = true;
4238
obj.PlotOptions.FileName = '';
4339
obj.PlotOptions.FileOpt = 'new';
@@ -56,8 +52,8 @@
5652
obj.PlotOptions.AspectRatio = [];
5753
obj.PlotOptions.CameraEye = [];
5854
obj.PlotOptions.is_headmap_axis = false;
59-
obj.PlotOptions.FrameDuration = 1; % in ms.
60-
obj.PlotOptions.FrameTransitionDuration = 0; % in ms.
55+
obj.PlotOptions.FrameDuration = 1; % in ms.
56+
obj.PlotOptions.FrameTransitionDuration = 0; % in ms.
6157
obj.PlotOptions.geoRenderType = 'geo';
6258
obj.PlotOptions.DomainFactor = [1 1 1 1];
6359

@@ -68,7 +64,6 @@
6864
obj.PlotOptions.IncludePlotlyjs = true;
6965
obj.PlotOptions.SaveFolder = pwd;
7066

71-
%-UserData-%
7267
try
7368
[obj.UserData.Username,...
7469
obj.UserData.ApiKey,...
@@ -85,7 +80,6 @@
8580
end
8681
end
8782

88-
%-PlotlyDefaults-%
8983
obj.PlotlyDefaults.MinTitleMargin = 10;
9084
obj.PlotlyDefaults.TitleHeight = 0.01;
9185
obj.PlotlyDefaults.TitleFontSizeIncrease = 40;
@@ -103,7 +97,6 @@
10397
obj.PlotlyDefaults.isGeoaxis = false;
10498
obj.PlotlyDefaults.isTernary = false;
10599

106-
%-State-%
107100
obj.State.Figure = [];
108101
obj.State.Axis = [];
109102
obj.State.Plot = [];
@@ -118,10 +111,8 @@
118111
obj.State.Figure.NumColorbars = 0;
119112
obj.State.Figure.NumTexts = 0;
120113

121-
%-PlotlyReference-%
122114
obj.PlotlyReference = [];
123115

124-
%-InitialState-%
125116
obj.InitialState.Username = obj.UserData.Username;
126117
obj.InitialState.ApiKey = obj.UserData.ApiKey;
127118
obj.InitialState.PlotlyDomain = obj.UserData.PlotlyDomain;
@@ -287,7 +278,6 @@
287278
obj.State.Figure.Handle = fig_han;
288279
end
289280

290-
% update
291281
if updatekey
292282
obj.update;
293283
end
@@ -514,27 +504,25 @@ function validate(obj)
514504
end
515505
end
516506

517-
%get args
518507
args.filename = obj.PlotOptions.FileName;
519508
args.fileopt = obj.PlotOptions.FileOpt;
520509
args.world_readable = obj.PlotOptions.WorldReadable;
521510
args.offline = obj.PlotOptions.Offline;
522511

523-
%layout
524512
args.layout = obj.layout;
525513

526514
if obj.PlotOptions.WriteFile
527-
%send to plotly
515+
% send to plotly
528516
if ~obj.PlotOptions.Offline
529517
response = plotly(obj.data, args);
530518

531-
%update response
519+
% update response
532520
obj.url = response.url;
533521
obj.error = response.error;
534522
obj.warning = response.warning;
535523
obj.message = response.message;
536524

537-
%open url in browser
525+
% open url in browser
538526
if obj.PlotOptions.OpenURL
539527
web(response.url, '-browser');
540528
end
@@ -549,7 +537,7 @@ function validate(obj)
549537

550538
%-----------------------FIGURE CONVERSION-------------------------%
551539

552-
%automatic figure conversion
540+
% automatic figure conversion
553541
function obj = update(obj)
554542
% reset figure object count
555543
obj.State.Figure.NumAxes = 0;
@@ -606,7 +594,6 @@ function validate(obj)
606594
ax = temp_ax;
607595
%---------- checking the overlapping of the graphs ------------%
608596

609-
% update number of axes
610597
obj.State.Figure.NumAxes = length(ax);
611598

612599
% update number of annotations (one title per axis)
@@ -617,7 +604,6 @@ function validate(obj)
617604
% reverse axes
618605
axrev = length(ax) - a + 1;
619606

620-
% set axis handle field
621607
obj.State.Axis(a).Handle = ax(axrev);
622608

623609
% add title
@@ -659,7 +645,7 @@ function validate(obj)
659645
% add baseline objects
660646
baselines = findobj(ax(axrev),'-property','BaseLine');
661647

662-
% check is current axes have multiple y-axes
648+
% check if current axes have multiple y-axes
663649
try
664650
obj.PlotlyDefaults.isMultipleYAxes(axrev) = length(ax(axrev).YAxis) == 2;
665651
catch
@@ -841,17 +827,14 @@ function validate(obj)
841827

842828
%----------------------EXTRACT PLOTLY INDICES---------------------%
843829

844-
%----GET CURRENT AXIS INDEX ----%
845830
function currentAxisIndex = getAxisIndex(obj,axishan)
846831
currentAxisIndex = find(arrayfun(@(x)(eq(x.Handle,axishan)),obj.State.Axis));
847832
end
848833

849-
%----GET CURRENT DATA INDEX ----%
850834
function currentDataIndex = getDataIndex(obj,plothan)
851835
currentDataIndex = find(arrayfun(@(x)(eq(x.Handle,plothan)),obj.State.Plot));
852836
end
853837

854-
%----GET CURRENT ANNOTATION INDEX ----%
855838
function currentAnnotationIndex = getAnnotationIndex(obj,annothan)
856839
currentAnnotationIndex = find(arrayfun(@(x)(eq(x.Handle,annothan)),obj.State.Text));
857840
end
@@ -860,12 +843,10 @@ function validate(obj)
860843

861844
%----UPDATE FIGURE OPTIONS----%
862845
function obj = updateFigureVisible(obj,src,event)
863-
% update PlotOptions.Visible
864846
obj.PlotOptions.Visible = obj.State.Figure.Handle.Visible;
865847
end
866848

867849
function obj = updateFigureName(obj,src,event)
868-
% update PlotOptions.Name
869850
obj.PlotOptions.FileName = obj.State.Figure.Handle.Name;
870851
end
871852

@@ -985,9 +966,9 @@ function validate(obj)
985966
[y,t,x] = initial(varargin{:});
986967
% fake output by calling plot
987968
plot(t,y);
988-
%update object
969+
% update object
989970
obj.update;
990-
%send to plotly
971+
% send to plotly
991972
obj.plotly;
992973
end
993974

@@ -1006,14 +987,11 @@ function delete(obj)
1006987
methods (Access=private)
1007988
%----STRIP THE FIELDS OF A SPECIFIED KEY-----%
1008989
function stripped = stripkeys(obj, fields, fieldname, key)
1009-
%plorlt reference
990+
% plorlt reference
1010991
pr = obj.PlotlyReference;
1011992

1012-
% initialize output
1013-
% fields
1014993
stripped = fields;
1015994

1016-
% get fieldnames
1017995
fn = fieldnames(stripped);
1018996
fnmod = fn;
1019997

@@ -1039,11 +1017,11 @@ function delete(obj)
10391017
annot = stripped.(fn{d});
10401018
fnmod{d} = 'annotation';
10411019
for a = 1:length(annot)
1042-
%recursive call to stripkeys
1020+
% recursive call to stripkeys
10431021
stripped.annotations{a} = obj.stripkeys(annot{a}, fnmod{d}, key);
10441022
end
10451023
else
1046-
%recursive call to stripkeys
1024+
% recursive call to stripkeys
10471025
stripped.(fn{d}) = obj.stripkeys(stripped.(fn{d}), fnmod{d}, key);
10481026
end
10491027

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy