Skip to content

fixing issue 162 + issue 233 - #270

Closed
benaliabderrahmane wants to merge 6 commits into
masterfrom
isse162_V3
Closed

benaliabderrahmane wants to merge 6 commits into
masterfrom
isse162_V3

Conversation

@benaliabderrahmane

Copy link
Copy Markdown
Contributor

plotly now support when one or both data vectors are Datetime or Duration objects.

@benaliabderrahmane benaliabderrahmane linked an issue Aug 2, 2021 that may be closed by this pull request
Comment thread plotly/plotly_aux/getuserdir.m Outdated
% - For other OSs uses java to retrieve the user.home directory

if ispc
% userDir = winqueryreg('HKEY_CURRENT_USER',...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to keep these comments? I don't understand if they are helpful?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which one ?

% case 2
% param = oauth.percentEncodeString(params{i});
% value = oauth.percentEncodeString(params{i+1});
% header = http_getContentTypeHeader(1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacing

end
function [str,header] = http_paramsToString(params,encodeOption)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are these entire files being recommitted? It doesn't look like they have changed at all? This makes it very difficult to review your code.

if isnumeric(axis_data.XLim)
xaxis.range = axis_data.XLim;

elseif isduration(axis_data.XLim)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

if strcmp(axis_data.YTickLabelMode,'auto')

%-xaxis range-%
if isnumeric(axis_data.YLim)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way that you can make this more DRY? It seems like you have essentially the same code for the X and Y access. Can you put this into a function that works for both axes for example? https://en.wikipedia.org/wiki/Don%27t_repeat_yourself

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually a lot of field are changed and we're not changing the same field each time so it won't be optimal to write everything in a function don't you think

@@ -0,0 +1,26 @@
function [converted,type] = convertDuration(duration)
if (strcmpi(duration.Format,'s'))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be using a switch/case statement?

@benaliabderrahmane
benaliabderrahmane requested review from VolKa79 and jackparmer and removed request for jackparmer August 3, 2021 14:43
@jackparmer
jackparmer requested a review from xarico10 August 3, 2021 19:13
@xarico10

xarico10 commented Aug 3, 2021

Copy link
Copy Markdown
Contributor

It's supporting DataTime and Duration objects.
Captura de Pantalla 2021-08-03 a la(s) 3 22 04 p  m
Captura de Pantalla 2021-08-03 a la(s) 3 22 15 p  m

Next step is to make X-axis ticks match!. I guess you could ask @jackparmer to create a separate issue so it counts as multiple fixed issues for you.

@jackparmer

Copy link
Copy Markdown
Contributor

Yeah, the x-axis range looks different in the 2 figures. Please solve that within this pull request.

@benaliabderrahmane benaliabderrahmane changed the title fixing issue 162 fixing issue 162 + issue 233 Aug 4, 2021
@benaliabderrahmane
benaliabderrahmane marked this pull request as draft August 4, 2021 14:59
@benaliabderrahmane benaliabderrahmane linked an issue Aug 4, 2021 that may be closed by this pull request
@benaliabderrahmane benaliabderrahmane self-assigned this Aug 4, 2021
@benaliabderrahmane
benaliabderrahmane removed the request for review from harshpurwar August 4, 2021 20:09
@jackparmer

Copy link
Copy Markdown
Contributor

@benaliabderrahmane what is the status of this?

Are you ready for another review?

@benaliabderrahmane benaliabderrahmane left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no I changed the statut to draft, actually I'm re-writing all the updateAxes code to make it more DRY, and this pull request is going to close 3 issue at a time. I'm going to update the code tomorrow

if strcmp(axis_data.YTickLabelMode,'auto')

%-xaxis range-%
if isnumeric(axis_data.YLim)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually a lot of field are changed and we're not changing the same field each time so it won't be optimal to write everything in a function don't you think

@benaliabderrahmane

Copy link
Copy Markdown
Contributor Author

@benaliabderrahmane what is the status of this?

Are you ready for another review?
no I changed the statut to draft, actually I'm re-writing all the updateAxes code to make it more DRY, and this pull request is going to close 3 issue at a time. I'm going to update the code tomorrow

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Datetime/duration format not supported

3 participants