emilopezcano / SixSigma

SixSigma R package
15 stars 12 forks source link

Further customization in ss.pMap #16

Closed k-tatgenhorst closed 1 year ago

k-tatgenhorst commented 1 year ago

ss.Pmap does not include methods to change the following attributes:

Text Color Background Color

These would be useful for organizations with branding requirements.

Additionally, document output size.

Are the elements drawn proportionally to the document size? ie.. if I add many more steps, will they be drawn smaller or overflow the document? <- I am guessing that this would probably need it's own issue if it does not currently scale.

emilopezcano commented 1 year ago

Thanks for the suggestions Karl. If you have some ideas about how to implement the colours customisation in ss.Pmap, please feel free to push a pull request. Otherwise I will try to implement that when I have some time.

As for the document size, I think the units of the elements in ss.Pmap are proportions. If there are a lot (or large) graphical elements they overlap. To overcome this, you can always rescale the output size. For example, if creating the plot in a RMarkdown or Quarto document, set the fig.with and fig.heigh to larger than the default values, e.g. 10x12 (they are expected in inches). The same if you use devices with functions as pdf(), png() and friends. If exporting from RStudio plots tab, you can change the size in pixels in order to have the same effect. If this is not enough to overcome the problem, please open another issue and let us see what can be done.

k-tatgenhorst commented 1 year ago

Emilio,

I am going to make a pull request for the background colors. Additionally, I had been puzzled that ss.col[5] was not changing anything and found that the color variables were not being passed in the initial page setup. I have made changes in the following two files: R/auxf.R <- the .ss.prepCanvas function ss.pMap

ss.col[5] which was not being passed controls the color of the frame. ss.col[6] (newly added pending approval) controls the background of the canvas.

Text Color is not addressed in these changes, but the background color changes are made in my fork:

k-tatgenhorst/SixSigma-kt

and they have been tested successfully using remote install.

At the moment, these changes will affect ss.ceDiag and ss.ca

I will verify if they affect any others and make the changes so they can use it as well.

k-tatgenhorst commented 1 year ago

Four other modules are affected by this change, plus that will change the ss.col list for those four modules which should be documented. Apologies for nearly rushing this. I had also prepped the changes for text color change and thinking it would be minor was going to make that a separate edit. I will complete both sets of changes on my fork and attempt to update the documentation properly as well and let you know when all of those steps are complete.

Karl

emilopezcano commented 1 year ago

Karl: thank you very much for improving the package! As soon as the changes are merged in the GitHub repo I will add you as a contributor in the DESCRIPTION file.

k-tatgenhorst commented 1 year ago

Emilio:

As I am going through your book and learning the functions, the other four functions that are affected are ones I am not yet proficient in. I think that sincethe only difference is the auxf function ss.prepCanvas now has eight elements in the expected ss.col list, rather than make the changes in those functions I am not familiar with I will check the length of the ss.col list that is passed and if it is less than eight use the default elements.

As I learn the other functions, I will make the changes then. In this way, I will avoid avoid unexpected consequences due to unfamiliarty with the code. The ramification of that is that if someone is using customization in one of those four areas, they will either need to accept the default or use the current unchanged version. Is this an acceptable resolution?

I think learning the other four functions may be 30 days or more based on my schedule and learning rate.

Anyone following along in this discussion, here is a sample of the new customizations available in ss.pMap

Rplot01.pdf

emilopezcano commented 1 year ago

Not sure whether pr #19 closes this issue or there is something pending

k-tatgenhorst commented 1 year ago

This issue was to expand existing customization options. All functions that had existing customization options have been addressed. The Gauge R&R function had all colors hard coded and I will open a separate issue later to address that one.

k-tatgenhorst commented 1 year ago

All planned work for this issue is complete and PRs submitted.