Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Attached is a Prime 4 file that allows you to plot text in a graph, like:
Of course it runs in Prime Express...
Enjoy!
Luc
Solved! Go to Solution.
Thank u
@ttokoro wrote:
in my sheet I set Origin =1 so I can't use her. Could you convert for me for Origin=1?
Thank u
Nice, but I would write your 3D functions as:
There's no need to add an additional NaN bar at the top, because there is already one.
It's also fully ORIGIN aware.
Besides this function also works in Prime Express (The 3D plot unfortunately not 😞 ).
Success!
Luc
Thanks Luc. I try to change ORIGIN=1 then Prime 7 shows error. May be your function below corresponds. T.Tokoro.
You're right. There's an error in one of my functions. I'll try to find a solution today.
Thanks!
Luc
Corrected errors that prevented it from working with ORIGIN values other than 0.
Success!
Luc
Great @LucMeekes both 2D &3D.big thank
maybe this last question hahaha. how to convert from Number to Text in Prime for Plot Number?
Best regards SPRSTRUCTURE
Use the num2str() function:
Success!
Luc
With angle q+Ctrl G.
I just noticed some annoying extra points (which don't show when no Symbol is selected as they are separated by NaN's.
Especially the one at the lower left is a problem when trying to determine the width and height of a text in an attempt to center it because its independent from the text's starting point. It also may interfere with Primes autoscaling of plots.
I stumbled upon this when using text at starting positions very large and wondered why my attempt to determine the width of the text failed and returns much too large values (centering then throws the text way off the left margin of course).
I guess that the first two pair of values (scaling and starting position) are necessary when the data structure it used as an input to modifiers like Bold or Italic.
Probably the only solution is to cut off the first four or five rows and maybe also the last two after all modifiers are applied.
Hi Werner,
Thanks for pointing that out. I think it's corrected now.
Luc
That's sure better, but Primes plot auto-scaling would still consider the values in the first column even though the corresponding y-values are NaNs.
But I doubt that dealing with this minor problem would justify the big effort to change the data structure completely, e.g. to a 3 column matrix.
Nonetheless functions VCenter and HCenter (or maybe even HJustify with argument for left, center, right) would be welcome 😉
My way for horizontally center text which I used in the thread Drawing a vertical line in plot was using filterNaN which is not available in Express and I also did not keep the scaling value stored in the text data structure at the top.
Following on from using your excellent plotting toolbox in another thread, and revisiting your worksheet, I was wondering if I had missed a version that contains Greek (and Cyrillic) upper & lower case letters?
Stuart
Over on the other thread, not realizing that Tetsuro had done some work on the 3D rotation, but thinking Express, the subject of a general 2D rotation came up. Has this already been addressed?
If not, ...
The attached Mathcad Prime 10 worksheet uses programming, but only, AFAICT, for the examples and only because I didn't have my Express repcol and Concat to hand.
" I was wondering if I had missed a version that contains Greek (and Cyrillic) upper & lower case letters"
The version with Greeks and Cyrillics doesn't exist yet. I've been occupied with other (more?) interesting tasks...
Luc
@LucMeekes wrote:
" I was wondering if I had missed a version that contains Greek (and Cyrillic) upper & lower case letters"
The version with Greeks and Cyrillics doesn't exist yet. I've been occupied with other (more?) interesting tasks...
Luc
😄
Isn't that always the case?
Stuart
@LucMeekes wrote:
" I was wondering if I had missed a version that contains Greek (and Cyrillic) upper & lower case letters"
The version with Greeks and Cyrillics doesn't exist yet. I've been occupied with other (more?) interesting tasks...
I don't know if you've heard of Hershey Fonts, Luc, but ...
https://paulbourke.net/dataformats/hershey/
I had a quick play, but no brain cells were hurt during or, indeed, involved in the playing of said game.
Clearly, I (or someone else) needs to calculate an appropriate set of offset and scaling factors to convert the Hershey fonts to your scale ... or rewrite your string plotting functions accordingly. I had to modify the method of indexing a character, as a simple subtraction of 32 from a character's code doesn't suffice for a minimal set of character vectors
Image from my import worksheet ...
Rest are from your worksheet with character vectors copy-pasted from the import worksheet.
Not Mathcad Express friendly at the moment, I'm afraid. Nor reader friendly, either!
Stuart