X-Y Plot Region

X-Y Plot Region - Extends SMath Studio with a X-Y Plot Region. - Messages

#201 Posted: 3/17/2018 1:10:33 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Quote

I just downloaded 0.99 and it didn't work out.


Tell me more about what's wrong.

2018-03-17_09-09-45.png
Russia ☭ forever, Viacheslav N. Mezentsev
#202 Posted: 3/19/2018 9:14:00 AM
Pumonte

Pumonte

0 likes in 2 posts.

Group: User

Hi Uni,

I downloaded your zip file, then copied the two dll files into the plugin folder of smath. When I then start smath I get an error message saying "The remote server returned an error: (407) Proxy Authentication Required".
error.PNG

Sorry I am a newbee. I am not familiar with the procedure for installing plugins. I had used mathcad in the past, and I started working a bit with smath about a year ago. I was looking for a WYSIWYG option, next to python. I do found smath rather convenient but was not so happy with the plotting options so I was curious to see how it would turn out with that plugin.

Thanks for your help.
#203 Posted: 3/19/2018 10:12:42 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

You need to use the Extension Manager (from SMath Studio main menu) to install plugins.
Russia ☭ forever, Viacheslav N. Mezentsev
#204 Posted: 3/19/2018 10:23:44 AM
Davide Carpi

Davide Carpi

1415 likes in 2872 posts.

Group: Moderator

Before using the Extensions Manager please remove any plugin you have manually installed.

Wrote

You need to use the Extension Manager (from SMath Studio main menu) to install plugins.



This is under Tools > Plugins... > Online gallery

2018-03-19 14_21_24-SMath Studio - [Page1].png

2018-03-19 14_21_43-SMath Studio - [Page1].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 users liked this post
Вячеслав Мезенцев 3/19/2018 11:57:00 AM
#205 Posted: 3/28/2018 11:50:28 AM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Going to my heat transfer sheet ...
I was plotting the curves and started filling in the table information. The title stuck, but the X and Y labels did not.
I have tried several times, including creating a new graph, to fix these labels and the plugin freezes SMath. I need to enter task manager to end the program. Essentially, the "pop-up" associated with this plugin is not showing up.
XY-Plot Crash.sm (115 KiB) downloaded 74 time(s).

PS, I created a new sheet and inserted a zed graph, pop up came up. I created another new sheet and inserted a blank X-Y graph, it crashed.
#206 Posted: 3/28/2018 1:14:46 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

... it crashed.


Quite OK here.
Are you doing something wrong or bug wrt your Smath version ? ?

ElsidX_Y.PNG

#207 Posted: 3/28/2018 1:22:08 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Wrote

Are you doing something wrong or bug wrt your Smath version?


My sheet has the app version. I'm on 0.99.6654. Looks like that may be the problem
#208 Posted: 3/28/2018 1:53:16 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

My sheet has the app version.
I'm on 0.99.6654.Looks like that may be the problem



Conclusively, Maxima X_Y is affected by the Smath version.
#209 Posted: 3/29/2018 1:04:16 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

I can't reproduce the issue. Can you make a screenshot or save crash dump?
Russia ☭ forever, Viacheslav N. Mezentsev
#210 Posted: 3/29/2018 9:31:38 AM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Issue was with SMath 0.99.6654. Andrey updated Smath to 0.99.6661 yesterday and the plugin works
#211 Posted: 4/13/2018 2:42:37 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Wrote

Found the issue(s). See revamped file. Still having issues in that X-Y plot Labels for the legend *zap*Quick Sound Loss.smz (142 KiB) downloaded 82 time(s).
Edit: Two bugs

  1. X-Y Plot. If functions crash, *Zap* to the legend titles. All other titles OK. Legend is empty due to laziness after last 5 crashes
  2. solve(4) did not like trying to cancel units in the denominator of the final function (#dist). As I was adding units to x:0-100 FT and dividing the units meters in the function, the function crashed in the solve block (Just the function, with all values plugged in except for x = vector, so it's a solve(4) issue).
This is one of those sheets where UNITS are huge! The equations are all based off of SI/metric references. Major issue

There is additional documentation and function definition updates. Sanity check the graph x scale (adjusted for feet since I'm in the US). Should be good now

#212 Posted: 6/1/2018 3:02:40 PM
Alexander O. Melnik

Alexander O. Melnik

127 likes in 494 posts.

Group: Moderator

Hi Uni,

Is XY plot still being actively developed?

I was hoping you can address the image quality when printed to PDF.

XYIQ1.png

I wonder if this is because in onpaint() you convert all the draw calls to bitmap which is further stored displayed and printed. In image region, for a windows native vector EMF file, i draw the EMF directly within onpaint() which makes sure that image looks sharp on both the screen (94 dpi) and printer (300 DPI)

Regards,

AM
#213 Posted: 6/3/2018 8:55:35 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

I was hoping you can address the image quality when printed to PDF.



PDF quality depends only upon the PDF creator. For free, CutePDF is acceptable.
No idea how it renders hard print because I don't have printer.

TESLA.pdf (59 KiB) downloaded 82 time(s).
#214 Posted: 6/4/2018 7:07:17 PM
Alexander O. Melnik

Alexander O. Melnik

127 likes in 494 posts.

Group: Moderator

Wrote

Wrote

I was hoping you can address the image quality when printed to PDF.



PDF quality depends only upon the PDF creator. For free, CutePDF is acceptable.
No idea how it renders hard print because I don't have printer.

TESLA.pdf (59 KiB) downloaded 82 time(s).



You are not using "X-Y Plot Region" but "2D Plot" in attached PDF; my comment was regarding the "X-Y Plot Region"

#215 Posted: 6/4/2018 11:57:02 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

You are not using "X-Y Plot Region" but "2D Plot" in attached PDF; my comment was regarding the "X-Y Plot Region"


No matter X_Y region or QuickPlot ... totally identical from CutePDF.

Doublet.pdf (28 KiB) downloaded 58 time(s).
#216 Posted: 6/5/2018 12:02:37 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

No matter X_Y region or QuickPlot ... totally identical from CutePDF.



Image of the CutePDF as rendered by Adobe Reader DC.

Doublet.PNG
#217 Posted: 6/5/2018 9:12:23 AM
Arie

Arie

93 likes in 285 posts.

Group: User

Jean, looked at zoomed image below from your pdf.

the function text is nice and clear, the plot is pixelated. This is what the issue here.

Untitled.png
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#218 Posted: 6/5/2018 12:19:48 PM
Alexander O. Melnik

Alexander O. Melnik

127 likes in 494 posts.

Group: Moderator

Wrote

I wonder if this is because in onpaint() you convert all the draw calls to bitmap which is further stored displayed and printed.



It does look that bitmap is being displayed / printed instead of draw calls


        public override void OnPaint( PaintEventArgs e ) {

            base.OnPaint( e );

            if ( this.InEvaluation ) return;

            Image image = new Bitmap( e.ClipRectangle.Width, e.ClipRectangle.Height );

            Rectangle Rect = new Rectangle( new Point( 0, 0 ), image.Size );

            Graphics g = Graphics.FromImage( image );

            g.FillRectangle( new SolidBrush( Color.White ), Rect );

            cs.ChartArea = Rect;

            cs.AddChartStyle( g, ca, xa, ya, y2a, gd, lb, tl );
            dc.AddCurves( g, cs, xa, ya, y2a );
            lg.AddLegend( g, dc, cs );

            e.Graphics.DrawImage( image, e.ClipRectangle );

            g.Dispose();

        }

Uni, if you have time at some point, could you either supersample bitmap, or draw directly in onPaint() similar to what was done in PieChart:
https://smath.info:8443/!/#public/view/head/plugins/PieChartRegion/PieChartCanvas.cs

Thank you,

Alex M.

#219 Posted: 6/5/2018 2:41:39 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Jean, look at zoomed image below from your pdf.

the function text is nice and clear, the plot is pixelated. This is what the issue here.



PDF creators recognize what is coded [text, glyphes like in equation editors ...].
The graphs are not codable and treated as image raster. When you zoom up the PDF
documents, the images are simply pixelated. If you zoom up 400%, each pixel is
quadruplated side by side thus the poor looking. If the graph could be interpreted
as an RGB image, then the PDF reader would have to process/zoom the image from
some type of image subprocessor. That simply does not exist with Adobe Reader.
I'm not aware of PDF creator/reader that process images.
In short: Smath is of no concern in there.
From recollection, my "Nuance PDF creator/reader" would zoom up like an image.

Page1 zoom Doublet.sm (109 KiB) downloaded 53 time(s).


#220 Posted: 6/6/2018 3:58:22 AM
Davide Carpi

Davide Carpi

1415 likes in 2872 posts.

Group: Moderator

Wrote

I wonder if this is because in onpaint() you convert all the draw calls to bitmap which is further stored displayed and printed.



Yes this is the cause. Try the following (drag&drop the zip in the canvas - just for testing purposes):

XYPlotRegion.zip (69 KiB) downloaded 49 time(s).


2018-06-06 19_21_47-test.pdf - Adobe Acrobat Reader DC.png

code committed
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 users liked this post
Alexander O. Melnik 6/7/2018 5:59:00 PM
  • New Posts New Posts
  • No New Posts No New Posts